Solved – What are the mean and variance for the Gamma distribution

gamma distribution

There are two forms for the Gamma distribution, each with different definitions for the shape and scale parameters. Rather than asking what the form is used for the gsl_ran_gamma implementation, it's probably easier to ask for the associated definitions for the mean and standard deviation in terms of the shape and scale parameters.

Any pointers to definitions would be appreciated.

Best Answer

If the shape parameter is $k>0$ and the scale is $\theta>0$, one parameterization has density function

$$p(x) = x^{k-1} \frac{ e^{-x/\theta} }{\theta^{k} \Gamma(k)}$$

where the argument, $x$, is non-negative. A random variable with this density has mean $k \theta$ and variance $k \theta^{2}$ (this parameterization is the one used on the wikipedia page about the gamma distribution).

An alternative parameterization uses $\vartheta = 1/\theta$ as the rate parameter (inverse scale parameter) and has density

$$p(x) = x^{k-1} \frac{ \vartheta^{k} e^{-x \vartheta} }{\Gamma(k)}$$

Under this choice, the mean is $k/\vartheta$ and the variance is $k/\vartheta^{2}$.