diff options
author | Raymond Hettinger <python@rcn.com> | 2011-03-22 22:55:51 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2011-03-22 22:55:51 (GMT) |
commit | a8e4d6eb6e386dc12fa586bd4a920546b505f17b (patch) | |
tree | 41a5ad32e3d91851e14c3b5569c42ad73b5d686f /Lib/random.py | |
parent | b199b2262cb37235447b9ab88e6479e227004d3c (diff) | |
download | cpython-a8e4d6eb6e386dc12fa586bd4a920546b505f17b.zip cpython-a8e4d6eb6e386dc12fa586bd4a920546b505f17b.tar.gz cpython-a8e4d6eb6e386dc12fa586bd4a920546b505f17b.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 592e4b8..49f5859 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -470,6 +470,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 |