diff options
author | Georg Brandl <georg@python.org> | 2011-09-17 20:36:28 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2011-09-17 20:36:28 +0200 |
commit | 21c69b1043d510d29928c15cb9e3e2c1c23f1d0a (patch) | |
tree | c3b5abd39b165dcd32c80ec9e7e4b22d0312b050 | |
parent | 1549bac6bac601502f9a3647a67fe549d3a05a4d (diff) | |
download | cpython-git-21c69b1043d510d29928c15cb9e3e2c1c23f1d0a.tar.gz |
Add info from the docstring for random.gammavariate() to the docs.
-rw-r--r-- | Doc/library/random.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/library/random.rst b/Doc/library/random.rst index e18b217c90..de98c040d4 100644 --- a/Doc/library/random.rst +++ b/Doc/library/random.rst @@ -196,6 +196,7 @@ be found in any statistics text. The end-point value ``b`` may or may not be included in the range depending on floating-point rounding in the equation ``a + (b-a) * random()``. + .. function:: triangular(low, high, mode) Return a random floating point number *N* such that ``low <= N <= high`` and @@ -226,6 +227,12 @@ be found in any statistics text. Gamma distribution. (*Not* the gamma function!) Conditions on the parameters are ``alpha > 0`` and ``beta > 0``. + The probability distribution function is:: + + x ** (alpha - 1) * math.exp(-x / beta) + pdf(x) = -------------------------------------- + math.gamma(alpha) * beta ** alpha + .. function:: gauss(mu, sigma) |