diff options
author | Raymond Hettinger <python@rcn.com> | 2011-03-22 22:56:41 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2011-03-22 22:56:41 (GMT) |
commit | 27f870982fe4fefb2e877a101a219915e620421b (patch) | |
tree | d11e5e72d95d0079890056141703f07b63f0c1bf /Lib | |
parent | f047164f64f573621d2851087f6ddd1110c6bcff (diff) | |
parent | a8e4d6eb6e386dc12fa586bd4a920546b505f17b (diff) | |
download | cpython-27f870982fe4fefb2e877a101a219915e620421b.zip cpython-27f870982fe4fefb2e877a101a219915e620421b.tar.gz cpython-27f870982fe4fefb2e877a101a219915e620421b.tar.bz2 |
Issue 10787: Document the probability density function for random.gammavariate.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/random.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/random.py b/Lib/random.py index 7f63388..7e0de4f 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -465,6 +465,12 @@ class Random(_random.Random): 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 + """ # alpha > 0, beta > 0, mean is alpha*beta, variance is alpha*beta**2 |