Gamma distribution

We now describe a family of distributions that can be used to model "quantity" variables — ones that can only take positive values such as the size of insurance claims and rainfalls. It is also occasionally used as a model for the lifetime of items.

The Gamma distribution is a generalisation of the \(\ErlangDistn(k,\; \lambda)\) distribution that allows non-integer values for the parameter \(k\). By convention, Erlang parameters \(k\) and \(\lambda\) are denoted by the symbols \(\alpha\) and \(\beta\) in Gamma distributions.

Definition

A random variable \(X\) is said to have a Gamma distribution with parameters \(\alpha \gt 0\) and \(\beta \gt 0\),

\[ X \;\;\sim\;\; \GammaDistn(\alpha,\; \beta) \]

if its probability density function is

\[ f(x) \;\;=\;\; \begin{cases} \dfrac {\beta^\alpha }{\Gamma(\alpha)} x^{\alpha - 1} e^{-x\beta}& \quad\text{if }x \gt 0 \\ 0 & \quad\text{otherwise} \end{cases} \]

Having two parameters gives this family of distributions considerable flexibility in shape.

Comparison of Gamma and Weibull distributions

Both the Gamma and Weibull distributions are generalisations of the exponential distribution — both become exponential distributions when \(\alpha = 1\). The main differences between them arise in the tails of the distributions, especially when \(\alpha\) is positive.

\(\WeibullDistn(\alpha,\; \lambda)\):        \(f(x) \propto x^{\alpha - 1} e^{-(\lambda x)^{\alpha}}\)
\(\GammaDistn(\alpha,\; \beta)\):        \(f(x) \propto x^{\alpha - 1} e^{-\beta x}\)

When \(\alpha \gt 1\), the Weibull distribution's upper tail decreases much faster than the Gamma distribution's upper tail, so the Gamma distribution has a longer upper tail (and is more skew).

In many applications, the Gamma distribution's longer tail matches what is seen (or expected) in sample data.

Shape of the Gamma distribution

The diagram below initially shows a Gamma distribution with \(\alpha = 2\) and \(\beta = 1\).

The parameter \(\alpha\) is a shape parameter of the distribution. Drag its slider to investigate the variety of distributional shapes that Gamma distributions can have for any fixed mean.

Now adjust the mean of the distribution with the second slider. The parameter \(\beta\) is a scale parameter of the distribution, so changing the mean only affects \(\beta\); it expands the pdf horizontally keeping the shape of the distribution unchanged.