diff options
author | Georg Brandl <georg@python.org> | 2011-09-17 18:36:28 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2011-09-17 18:36:28 (GMT) |
commit | 73dd7c71f69b234fb1f3944efa1f08969b3ae3cc (patch) | |
tree | 27c64f498436b3541c0fcf2b7c42d9dc1ef20a10 /Doc | |
parent | 755460694e88abbb90f78cb19c86f4e40b6d0388 (diff) | |
download | cpython-73dd7c71f69b234fb1f3944efa1f08969b3ae3cc.zip cpython-73dd7c71f69b234fb1f3944efa1f08969b3ae3cc.tar.gz cpython-73dd7c71f69b234fb1f3944efa1f08969b3ae3cc.tar.bz2 |
Add info from the docstring for random.gammavariate() to the docs.
Diffstat (limited to 'Doc')
-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 f0c4add..31cb945 100644 --- a/Doc/library/random.rst +++ b/Doc/library/random.rst @@ -163,6 +163,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 @@ -191,6 +192,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) |