diff options
author | Georg Brandl <georg@python.org> | 2011-09-17 18:40:35 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2011-09-17 18:40:35 (GMT) |
commit | 902e8955784698a3b2f2d83f9a349cc8b9f0416c (patch) | |
tree | 7702cee8487f3c1cf918f087e2b6c969cf59c88c /Doc/library/random.rst | |
parent | e30186bf4bfde9415229e58d25e467a5c6561239 (diff) | |
parent | 73dd7c71f69b234fb1f3944efa1f08969b3ae3cc (diff) | |
download | cpython-902e8955784698a3b2f2d83f9a349cc8b9f0416c.zip cpython-902e8955784698a3b2f2d83f9a349cc8b9f0416c.tar.gz cpython-902e8955784698a3b2f2d83f9a349cc8b9f0416c.tar.bz2 |
merge doc fixes from 3.2
Diffstat (limited to 'Doc/library/random.rst')
-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 3040411..2b10e6e 100644 --- a/Doc/library/random.rst +++ b/Doc/library/random.rst @@ -169,6 +169,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 @@ -197,6 +198,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) |