Gamma Random Variate



Gamma Random Variate

The probability density function for a gamma(a) distributed random variable X, f(x), is:
f(x) =
0for x < 0
[ 1 / Γ(a) ] x (a - 1)e- x for 0 ≤ x
where the shape parameter, a, must be positive.

Function List

  • double Gamma_Random_Variate( double shape )

    This function returns X where X is a random variate with the density given above. Note that shape must be positive.

Source Code

C source code is available for this routine: