Statistics Quest

Chi-square distribution

The chi-square distribution with k degrees of freedom is the distribution of a sum of k squared independent standard normals; it is right-skewed and non-negative.

χk2=Z12+⋯+Zk2,E⁡=k,Var⁡=2k\chi^2_k = Z_1^2 + \dots + Z_k^2, \qquad \E = k, \qquad \Var = 2k
Definition, mean and variance
ZiZ_i
independent standard normal variables
kk
degrees of freedom
(n−1)s2σ2∼χn−12\frac{(n-1)s^2}{\sigma^2} \sim \chi^2_{n-1}
Sampling distribution of a variance (normal population)
s2s^2
sample variance (divisor n−1n - 1)
σ2\sigma^2
population variance

When to use

  • Reference distribution for goodness-of-fit and independence tests (always the upper tail), likelihood-ratio tests and the Kruskal–Wallis approximation.
  • Intervals for a variance from normal data.

How to interpret

  • Right-skewed; becomes more symmetric as df grows. Mean equals df, so a statistic near its df is unremarkable.
  • Chi-square tests of fit use only the upper tail: large values mean poor agreement.

Common mistakes

  • Doubling the tail for a chi-square test of fit; the p-value is P(χ2≥X2)P(\chi^2 \ge X^2).
  • Wrong df: goodness of fit uses k−1k - 1 (minus estimated parameters); an r×cr \times c table uses (r−1)(c−1)(r-1)(c-1).
  • Using the variance interval for non-normal data: it is very sensitive to non-normality.

Example

With df =3= 3, the 5% critical value is χ0.95,32=7.8147\chi^2_{0.95,3} = 7.8147; an observed X2=9.2X^2 = 9.2 has p-value P(χ32≥9.2)=0.0267P(\chi^2_3 \ge 9.2) = 0.0267. For df =9= 9, the central 95% lies between 2.7004 and 19.0228.