--- original_random.py 2010-12-28 17:35:14.391227658 +0100 +++ random.py 2010-12-28 17:42:15.027819418 +0100 @@ -489,7 +489,16 @@ """Gamma distribution. Not the gamma function! Conditions on the parameters are alpha > 0 and beta > 0. - + + Mean is alpha*beta + Variance is alpha * ( beta ** 2 ) + The exact formula for this distribution is + def f ( x , alpha , beta ) : + return ( + ( ( x ** ( alpha - 1 ) ) * math.exp( - x / beta ) ) + / + ( math.gamma( alpha ) * ( beta ** alpha ) ) + ) """ # alpha > 0, beta > 0, mean is alpha*beta, variance is alpha*beta**2