diff options
author | Raymond Hettinger <python@rcn.com> | 2011-03-22 22:57:03 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2011-03-22 22:57:03 (GMT) |
commit | 09cbadd0057a74d79f0df0ac5aa1f49d3384e2f6 (patch) | |
tree | c8388065315ab1242d358bf7f029fe7a13ebbcfe /Lib/random.py | |
parent | 1aa8743d1c0a054ac2dfbcd8ca8896fdd06e1b8b (diff) | |
parent | 27f870982fe4fefb2e877a101a219915e620421b (diff) | |
download | cpython-09cbadd0057a74d79f0df0ac5aa1f49d3384e2f6.zip cpython-09cbadd0057a74d79f0df0ac5aa1f49d3384e2f6.tar.gz cpython-09cbadd0057a74d79f0df0ac5aa1f49d3384e2f6.tar.bz2 |
Issue 10787: Document the probability density function for random.gammavariate.
Diffstat (limited to 'Lib/random.py')
-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 f29803e..3d2af24 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 |