Exam PContinuousFree to read

Chi-square distribution

A sum of k squared independent standard normals; the sampling distribution of a variance.

Parameters and support

kk
degrees of freedom - k>0k > 0
Support
x>0x > 0

The formulas

f(x)
f(x)=xk/2−1e−x/22k/2Γ(k/2)f(x) = \dfrac{x^{k/2-1}e^{-x/2}}{2^{k/2}\Gamma(k/2)}
F(x)
F(x)=γ(k/2, x/2)Γ(k/2)F(x) = \dfrac{\gamma(k/2,\, x/2)}{\Gamma(k/2)}
Mean
E[X]=kE[X] = k
Variance
Var⁡(X)=2k\operatorname{Var}(X) = 2k
MGF
M(t)=(1−2t)−k/2,t<12M(t) = (1-2t)^{-k/2}, \quad t < \tfrac{1}{2}
Memory hook. Mean k, variance 2k. It is exactly Gamma(α = k/2, λ = 1/2), so every gamma result transfers.

Where the moments come from

  1. If Z∼N(0,1)Z \sim N(0,1) then Z2Z^2 has MGF (1−2t)−1/2(1-2t)^{-1/2}, which is Gamma(12\tfrac12, 12\tfrac12).
  2. Summing kk independent copies multiplies the MGFs: (1−2t)−k/2(1-2t)^{-k/2}.
  3. That is the Gamma(α=k/2\alpha = k/2, λ=1/2\lambda = 1/2) MGF, so E[X]=k/21/2=kE[X] = \frac{k/2}{1/2} = k.
  4. Var⁡(X)=k/2(1/2)2=2k\operatorname{Var}(X) = \frac{k/2}{(1/2)^2} = 2k.

Worked example

X is chi-square with 12 degrees of freedom. Find its standard deviation.

  1. Var⁡(X)=2k=24\operatorname{Var}(X) = 2k = 24.
  2. SD(X)=24=4.899\text{SD}(X) = \sqrt{24} = 4.899.

Answer: 4.899

The mean, variance, CDF and moment generating function above are re-derived numerically from this distribution’s own density on every test run - summed over the support for a discrete distribution, integrated by quadrature for a continuous one - and compared with the closed forms printed here. A typo on this page fails that test run.

Traps

  • Using variance k instead of 2k.
  • Forgetting that the chi-square is a special gamma, and re-deriving results that already exist.

Related

Drill this: the Exam P question bank has original questions on this distribution, and the recall trainer builds its prompts from exactly the formulas above.