Explanation
The chi-square distribution with \( k \) degrees of freedom arises from summing the squares of \( k \) independent standard normal variables: \( \chi^2_k = Z_1^2 + Z_2^2 + \cdots + Z_k^2 \). It only takes positive values, its mean is \( k \) and its variance is \( 2k \). With few degrees of freedom the distribution is strongly right-skewed; as \( k \) grows it approaches a normal distribution with mean \( k \) and standard deviation \( \sqrt{2k} \).
It is used in three main contexts of statistical inference: (1) goodness-of-fit tests, where the statistic measures how much the observed frequencies differ from the expected ones under a theoretical model; (2) independence tests in contingency tables, assessing whether two categorical variables are associated; and (3) inference about variances, where \( (n-1)S^2/\sigma^2 \) follows a chi-square distribution with \( n-1 \) degrees of freedom and allows building confidence intervals and tests for the population variance in normal samples.
Formula
\( f(x;k)=\frac{1}{2^{k/2}\Gamma(k/2)}x^{k/2-1}e^{-x/2},\quad x>0 \)
Parameters
- k (degrees of freedom): determines the shape and spread of the distribution.
- x: observed value of the chi-square statistic.
Worked example
Situation: In a goodness-of-fit test, the statistic \(\chi^2_{\text{obs}}\) is computed from observed and expected frequencies across 6 categories, giving \(\nu = 6 - 1 = 5\) degrees of freedom.
Question 1: What is the cumulative probability \(P(\chi^2 \leq 11.07)\) with \(\nu = 5\)?
Solution: Looking up the CDF of \(\chi^2_5\) at \(x = 11.07\): \[ P(\chi^2 \leq 11.07) \approx 0.95 \] Equivalently, the right tail is \(P(\chi^2 > 11.07) = 0.05\). If the observed statistic were exactly 11.07, the p-value would be 5%.
Question 2: What is the critical value \(\chi^{2*}\) for the test at level \(\alpha = 0.05\) with \(\nu = 5\)?
Solution: We need the 0.95 quantile of \(\chi^2_5\), i.e. the value that leaves 5% in the right tail: \[ \chi^{2*}_{0.05,\,5} = 11.07 \] If \(\chi^2_{\text{obs}} > 11.07\), we reject \(H_0\) at the 5% level.
Interpretation: A large \(\chi^2\) statistic indicates that the observed frequencies deviate from the expected ones under \(H_0\). The threshold 11.07 marks the boundary: only 5% of samples drawn from the hypothesized distribution would produce a statistic larger than that value by chance.