StatlectThe Digital Textbook
Index > Probability distributions

Gamma distribution

The Gamma distribution can be thought of as a generalization of the Chi-square distribution. If a random variable Z has a Chi-square distribution with n degrees of freedom and $h$ is a strictly positive constant, then the random variable X defined as: [eq1]has a Gamma distribution with parameters n and $h$.

Definition

Gamma random variables are characterized as follows:

Definition Let X be an absolutely continuous random variable. Let its support be the set of positive real numbers:[eq2]Let [eq3]. We say that X has a Gamma distribution with parameters n and $h$ if its probability density function is:[eq4]where $c$ is a constant:[eq5]and [eq6] is the Gamma function.

A random variable having a Gamma distribution is also called a Gamma random variable.

To better understand the Gamma distribution, you can have a look at its density plots.

Expected value

The expected value of a Gamma random variable X is:[eq7]

Proof

It can be derived as follows:[eq8]

Variance

The variance of a Gamma random variable X is:[eq9]

Proof

It can be derived thanks to the usual variance formula ([eq10]):[eq11]

Moment generating function

The moment generating function of a Gamma random variable X is defined for any $frac{n}{2h}$:[eq12]

Proof

Using the definition of moment generating function:[eq13]where the integral equals 1 because it is the integral of the probability density function of a Gamma random variable with parameters n and [eq14]. Thus:[eq15]Of course, the above integrals converge only if [eq16], i.e. only if $frac{n}{2h}$. Therefore, the moment generating function of a Gamma random variable exists for all $frac{n}{2h} $.

Characteristic function

The characteristic function of a Gamma random variable X is:[eq17]

Proof

Using the definition of characteristic function:[eq18]

Distribution function

The distribution function of a Gamma random variable is:[eq19]where the function[eq20]is called lower incomplete Gamma function and is usually evaluated using specialized computer algorithms.

Proof

This is proved as follows:[eq21]

More details

In the following subsections you can find more details about the Gamma distribution.

The Gamma distribution is a scaled Chi-square distribution

If a variable X has the Gamma distribution with parameters n and $h$, then:[eq22]where Z has a Chi-square distribution with n degrees of freedom.

Proof

This can be easily proved using the formula for the density of a function of an absolutely continuous variable ([eq23] is a strictly increasing function of Z, since $frac{h}{n}$ is strictly positive):[eq24]The density function of a Chi-square random variable with n degrees of freedom is:[eq25]where [eq26]Therefore,[eq27]which is the density of a Gamma distribution with parameters n and $h$.

Thus, the Chi-square distribution is a special case of the Gamma distribution, because, when $h=n$, we have:[eq28]

In other words, a Gamma distribution with parameters n and $h=n$ is just a Chi square distribution with n degrees of freedom.

A Gamma random variable times a strictly positive constant is a Gamma random variable

Multiplying a Gamma random variable by a strictly positive constant one obtains another Gamma random variable. If X is a Gamma random variable with parameters n and $h$, then the random variable Y defined as:[eq29]has a Gamma distribution with parameters n and $ch$.

Proof

This can be easily seen using the result from the previous subsection:[eq30]where Z has a Chi-square distribution with n degrees of freedom. Therefore:[eq31]In other words, Y is equal to a Chi-square random variable with n degrees of freedom, divided by n and multiplied by $ch$. Therefore, it has a Gamma distribution with parameters n and $ch$.

A Gamma random variable is a sum of squared normal random variables

In the lecture entitled Chi-square distribution we have explained that a Chi-square random variable Z with n degrees of freedom (n integer) can be written as a sum of squares of n independent normal random variables $W_{1}$, ...,$W_{n}$ having mean 0 and variance 1:[eq32]

In the previous subsections we have seen that a variable X having a Gamma distribution with parameters n and $h$ can be written as:[eq33]where Z has a Chi-square distribution with n degrees of freedom.

Putting these two things together, we obtain:[eq34]where we have defined:[eq35]But the variables $Y_{i}$ are normal random variables with mean 0 and variance $frac{h}{n}$. Therefore, a Gamma random variable with parameters $n $ and $h$ can be seen as a sum of squares of n independent normal random variables having mean 0 and variance $h/n$.

Solved exercises

Below you can find some exercises with explained solutions:

  1. Exercise set 1 (recognize Gamma distributions and derive their parameters).

The book

Most learning materials found on this website are now available in a traditional textbook format.