diff options
author | Raymond Hettinger <python@rcn.com> | 2011-03-22 15:52:46 -0700 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2011-03-22 15:52:46 -0700 |
commit | 7e68583d2e0f3d22daacca3f861bcaac0e7a7f3f (patch) | |
tree | 6d895615c2e5b99cf502110bec14306eb04a7a89 /Lib | |
parent | 01b1ad3ed6f3f499c75eb0dd968c6efcf828f831 (diff) | |
download | cpython-7e68583d2e0f3d22daacca3f861bcaac0e7a7f3f.tar.gz |
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 01e1420df6..dcc79d1fff 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 |