The Gamma and Chi-Square Distributions

STA 211 · Lecture 15

Introduction

The gamma family models positive, right-skewed quantities such as waiting times, lifetimes and aggregate durations. The exponential distribution is a gamma special case, while the chi-square distribution is a re-parameterised gamma distribution central to inference about variances.

Learning Objectives

You should be able to:

  • define and use the gamma function;
  • state the gamma density under a clear parameterisation;
  • calculate gamma probabilities, means, variances and MGFs;
  • explain exponential and chi-square special cases; and
  • use additivity within the gamma family.

Gamma Function

For α>0\alpha > 0,

Γ(α)=∫0∞xα−1e−xdx.\Gamma(\alpha) = \int_{0}^{\infty}x^{\alpha - 1}e^{- x}\, dx.

The recurrence relation is

Γ(α+1)=αΓ(α).\Gamma(\alpha + 1) = \alpha\Gamma(\alpha).

For positive integers nn,

Γ(n)=(n−1)!.\Gamma(n) = (n - 1)!.

Also,

Γ(12)=π.\Gamma\left( \frac{1}{2} \right) = \sqrt{\pi}.

Gamma Distribution: Shape-Rate Form

This course uses the shape-rate parameterisation. If X∼Gamma(α,β)X \sim Gamma(\alpha,\beta), where α>0\alpha > 0 is the shape and β>0\beta > 0 is the rate, then

fX(x)=βαΓ(α)xα−1e−βx,x>0.f_{X}(x) = \frac{\beta^{\alpha}}{\Gamma(\alpha)}x^{\alpha - 1}e^{- \beta x},\quad\quad x > 0.

Gamma probability density functions

Gamma probability density functions

The mean and variance are

E(X)=αβ,E(X) = \frac{\alpha}{\beta},

Var(X)=αβ2.Var(X) = \frac{\alpha}{\beta^{2}}.

The MGF is

MX(t)=(ββ−t)α,t<β.M_{X}(t) = \left( \frac{\beta}{\beta - t} \right)^{\alpha},\quad\quad t < \beta.

Shape-scale notation

Some texts use scale θ=1/β\theta = 1/\beta. Then

fX(x)=xα−1e−x/θΓ(α)θα,f_{X}(x) = \frac{x^{\alpha - 1}e^{- x/\theta}}{\Gamma(\alpha)\theta^{\alpha}},

E(X)=αθ,Var(X)=αθ2.E(X) = \alpha\theta,\quad\quad Var(X) = \alpha\theta^{2}.

The two parameterisations must not be mixed.

Exponential Distribution

When α=1\alpha = 1,

fX(x)=βe−βx,x>0,f_{X}(x) = \beta e^{- \beta x},\quad\quad x > 0,

which is the exponential distribution with rate β\beta. Its survival function is

P(X>x)=e−βx.P(X > x) = e^{- \beta x}.

Like the geometric distribution, the exponential distribution is memoryless:

P(X>s+t∣X>s)=P(X>t).P(X > s + t \mid X > s) = P(X > t).

Additivity

If Xi∼Gamma(αi,β)X_{i} \sim Gamma\left( \alpha_{i},\beta \right) are independent with a common rate β\beta, then

∑i=1nXi∼Gamma(∑i=1nαi,β).\sum_{i = 1}^{n}X_{i} \sim Gamma\left( \sum_{i = 1}^{n}\alpha_{i},\beta \right).

A common rate is required.

Example 15.1

If independent service stages have distributions Gamma(2,0.5)Gamma(2,0.5) and Gamma(3,0.5)Gamma(3,0.5), their total time has distribution

Gamma(5,0.5).Gamma(5,0.5).

Its mean is 5/0.5=105/0.5 = 10 and variance is 5/(0.5)2=205/(0.5)^{2} = 20.

Chi-Square Distribution

A chi-square variable with ν\nu degrees of freedom is a gamma variable with

α=ν2,β=12.\alpha = \frac{\nu}{2},\quad\quad\beta = \frac{1}{2}.

Thus,

X∼χν2⇔X∼Gamma(ν2,12).X \sim \chi_{\nu}^{2}\quad \Leftrightarrow \quad X \sim Gamma\left( \frac{\nu}{2},\frac{1}{2} \right).

Its density is

fX(x)=12ν/2Γ(ν/2)xν/2−1e−x/2,x>0.f_{X}(x) = \frac{1}{2^{\nu/2}\Gamma(\nu/2)}x^{\nu/2 - 1}e^{- x/2},\quad\quad x > 0.

Chi-square probability density functions

Chi-square probability density functions

The mean and variance are

E(X)=ν,E(X) = \nu,

Var(X)=2ν.Var(X) = 2\nu.

If Z1,…,ZνZ_{1},\ldots,Z_{\nu} are independent standard normal variables, then

∑i=1νZi2∼χν2.\sum_{i = 1}^{\nu}Z_{i}^{2} \sim \chi_{\nu}^{2}.

If X1,…,XnX_{1},\ldots,X_{n} are sampled independently from N(μ,σ2)N\left( \mu,\sigma^{2} \right), then

(n−1)S2σ2∼χn−12.\frac{(n - 1)S^{2}}{\sigma^{2}} \sim \chi_{n - 1}^{2}.

This result underlies confidence intervals and hypothesis tests for a normal population variance.

Post-Test

  1. State the gamma density under the shape-rate parameterisation.
  2. If X∼Gamma(4,2)X \sim Gamma(4,2), find its mean and variance.
  3. Identify the exponential distribution as a gamma special case.
  4. If X∼χ102X \sim \chi_{10}^{2}, find its mean and variance.
  5. If X∼Gamma(3,1/2)X \sim Gamma(3,1/2), express its distribution as chi-square.
  6. State the condition required for sums of independent gamma variables to remain gamma.

Selected answers: 2. 22 and 11; 4. 1010 and 2020; 5. χ62\chi_{6}^{2}; 6. a common rate, or equivalently a common scale.