Chi-Squared (χ²) Distribution

The distribution of the sum of squared standard normal deviates.

The "Goodness of Fit" Distribution

The Chi-Squared (χ²) distribution is a continuous probability distribution that is widely used in hypothesis testing. It arises as the distribution of a sum of squared independent standard normal random variables.

In finance and econometrics, it is the backbone of the Chi-Squared test, which is used to test the goodness of fit of a model, check for independence between categorical variables, and compare variances. For instance, a risk manager might use it to test if the observed frequency of portfolio losses matches the frequency predicted by their risk model.

Interactive χ² Distribution
Adjust the degrees of freedom to see how the shape of the distribution changes. Notice how it becomes more symmetric and bell-shaped as the degrees of freedom increase.
Mean (μ\mu): 5.00
Variance (σ2\sigma^2): 10.00

Core Concepts

Probability Density Function (PDF)
The PDF is defined by one parameter: the degrees of freedom (kk).
f(x;k)=12k/2Γ(k/2)xk/21ex/2f(x; k) = \frac{1}{2^{k/2}\Gamma(k/2)} x^{k/2-1} e^{-x/2}
  • x0x \ge 0 is the variable.
  • kk represents the degrees of freedom.
  • Γ(k/2)\Gamma(k/2) is the Gamma function.
Expected Value & Variance

Expected Value (Mean)

E[X]=kE[X] = k

Variance

Var(X)=2kVar(X) = 2k

Key Derivations

Deriving the Moments via the Gamma Distribution
The moments of the Chi-Squared distribution are most easily derived by recognizing it as a special case of the Gamma distribution.

Step 1: Connect Chi-Squared to Gamma

A Chi-Squared distribution with kk degrees of freedom, χ2(k)\chi^2(k), is equivalent to a Gamma distribution with shape parameter α=k/2\alpha = k/2 and rate parameter β=1/2\beta = 1/2.

We know from the Gamma Distribution page that for a Gamma distribution Gamma(α,β)\text{Gamma}(\alpha, \beta), the moments are:

  • E[X]=αβE[X] = \frac{\alpha}{\beta}
  • Var(X)=αβ2Var(X) = \frac{\alpha}{\beta^2}

Deriving the Expected Value (Mean)

Step 2: Substitute Gamma Parameters

Substitute α=k/2\alpha = k/2 and β=1/2\beta = 1/2 into the mean formula for the Gamma distribution.

E[X]=k/21/2E[X] = \frac{k/2}{1/2}

Step 3: Simplify

The 1/2 terms cancel out, leaving us with a remarkably simple result.

Final Mean Formula
E[X]=kE[X] = k

Deriving the Variance

Step 4: Substitute Gamma Parameters

Substitute α=k/2\alpha = k/2 and β=1/2\beta = 1/2 into the variance formula for the Gamma distribution.

Var(X)=k/2(1/2)2=k/21/4Var(X) = \frac{k/2}{(1/2)^2} = \frac{k/2}{1/4}

Step 5: Simplify

Multiplying by the reciprocal of 1/4 gives the final result.

Final Variance Formula
Var(X)=2kVar(X) = 2k