Skip to main content

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.

ByHoang TruongUpdated

See it move

Loading infographic...

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.

Where it fits
SubjectData Analysis & StatisticsAdvancedTopicEstimation & Sampling DistributionsAdvanced

The formula

LaTeX
χ2=(OiEi)2Ei\chi^2 = \sum \frac{(O_i - E_i)^2}{E_i}

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

PracticeCORE

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?

Select an answer to check your understanding.