diff options
author | Raymond Hettinger <python@rcn.com> | 2011-03-22 22:52:46 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2011-03-22 22:52:46 (GMT) |
commit | 405a4717e1108b95d5af0e61dd304fe6407bd256 (patch) | |
tree | a5558d15cd972f97ebfee1a8121dc509f0acf39b /Lib/random.py | |
parent | b76f6200d299acec082879ce6e87e7de46627d39 (diff) | |
download | cpython-405a4717e1108b95d5af0e61dd304fe6407bd256.zip cpython-405a4717e1108b95d5af0e61dd304fe6407bd256.tar.gz cpython-405a4717e1108b95d5af0e61dd304fe6407bd256.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 01e1420..dcc79d1 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -490,6 +490,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 |