Chi-square distribution
The chi-square distribution is the right-skewed sampling distribution of a sum of squared standard normal variables, indexed by degrees of freedom, underlying goodness-of-fit and independence tests.
See it move
A shop expects 50 sales in each of 4 categories out of 200 total, but observes 60, 55, 45 and 40. Each category's (observed − expected)² ÷ expected contributes 2, 0.5, 0.5 and 2, summing to a chi-square statistic of 5.00, with 3 degrees of freedom, checked against the chi-square distribution to test the fit.
The formula
Variables
- Observed frequency of category i
- Expected frequency of category i
Gives the chi-square test statistic from a table of observed and expected category counts, compared against the chi-square distribution to test goodness-of-fit or independence.
Check yourself
A café expects customers to choose equally among 3 drink sizes, so out of 150 orders it expects 50 of each size. The observed counts are: small 65, medium 50, large 35. What is the chi-square test statistic?