Issue 10787: Document the probability density function for random.gammavariate.

This commit is contained in:
Raymond Hettinger 2011-03-22 15:55:51 -07:00
parent b199b2262c
commit a8e4d6eb6e
1 changed files with 6 additions and 0 deletions

View File

@ -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