PyDocs

Nav

Numeric and Mathematical Modules

gammavariate

random

function (source)
  • gammavariate(alpha, beta)
Gamma distribution.  Not the gamma function!

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

The mean (expected value) and variance of the random variable are:

    E[X] = alpha * beta
    Var[X] = alpha * beta ** 2
0 Examples
No examples for random/gammavariate.
See Also
No see-alsos for random/gammavariate
0 Notes
No notes for gammavariate