Home page for accesible maths 3.4 Gamma Distribution: 𝖦𝖺𝗆(α,β)

Style control - access keys in brackets

Font (2 3) - + Letter spacing (4 5) - + Word spacing (6 7) - + Line spacing (8 9) - +

3.4.2 Gamma distribution

A random variable X has a gamma distribution with shape parameter α and rate parameter β if its pdf is given by

fX(x;𝜽)={βαΓ(α)xα-1exp(-βx)x00otherwise (3.1)

with 𝜽=(α,β), where α>0 and β>0. We write X𝖦𝖺𝗆(α,β).

Firstly, with α=1 the density is βexp(-βx) for x>0 and so the Exponential distribution is a special case of the Gamma distribution.

We next check that the above is a density. Firstly, f(x)0, and, secondly,

-fX(s)ds=βα-1Γ(α)0sα-1exp(-βs)βds.

Substituting βs=t, so that βds=dt gives,

-fX(s)ds=βα-1Γ(α)0tα-1βα-1exp(-t)dt=1.

Figure 3.3 (First Link, Second Link) and Figure 3.4 (First Link, Second Link) show the pdf for four different sets of parameters.

Figure 3.3: First Link, Second Link, Caption: Pdfs for two gamma random variables X with different parameter values.
Figure 3.4: First Link, Second Link, Caption: Pdfs for two more gamma random variables X with different parameter values.

Convolution property: When α is an integer the Gamma(α,β) distribution is the distribution of the length of time you have to wait until a total of α events have occurred where the time between each event follows an Exponential(β) distribution (see Chapter 8). More generally, the gamma distribution provides a flexible class of pdfs which may describe the distribution of a non-negative variable even when there is no strong probability based justification.

We cannot evaluate the cdf in closed form for a general (non-integer) value of α.

A short-cut method for evaluating the moments of the gamma distribution (as well as for the exponential and beta distributions, and others) is to use the unit integrability property of a suitable density; i.e. that -fY(y)=1, when fY(y) is a density.

To evaluate the r-th moment of a 𝖦𝖺𝗆(α,β) distribution we use the fact that fY(y)=βα+rΓ(α+r)yα+r-1e-βy is a density (of a 𝖦𝖺𝗆(α+r,β) random variable).

𝖤[Xr] =βαΓ(α)0xrxα-1exp(-βx)dx
=βαΓ(α+r)βα+rΓ(α)×βα+rΓ(α+r)0xr+α-1exp(-βx)dx
=Γ(α+r)βrΓ(α)×1.

So

  1. 𝖤[X]=Γ(α+1)βΓ(α)=αβ,

  2. 𝖤[X2]=Γ(α+2)β2Γ(α)=(α+1)αβ2,

  3. 𝖵𝖺𝗋[X]=(α+1)αβ2-α2β2=αβ2.

Example 3.4.1.

Lifetimes of batteries (in hours) are believed to independently follow an Exponential(1/10) distribution. You buy a pack of 4 batteries and use them sequentially. Find:

  1. (a)

    The distribution of the lifetime of the pack.

  2. (b)

    The expected lifetime of the pack.

  3. (c)

    The probability that the lifetime of the pack exceeds 40 hours.

Solution. 

  1. (a)

    Let X be the lifetime (in hours) of the pack. Then X is the sum of the 4 lifetimes of the batteries each of which has an Exponential(1/10) distribution, thus

    XGamma(4,1/10).
  2. (b)

    The expected lifetime (in hours) is: 𝖤[X]=41/10=40.

  3. (c)

    The probability that the lifetime exceeds 40 hours is 𝖯(X>40)=1-𝖯(X40), which can be evaluated in R:

    > 1-pgamma(40,4,1/10)
    [1] 0.4334701

    Thus 𝖯(X>40)0.4335.