Chi-Square Test Examples in Math
Start with the recap, study the fully worked examples, then use the practice problems to check your understanding of Chi-Square Test.
This page combines explanation, solved examples, and follow-up practice so you can move from recognition to confident problem-solving in Math.
Concept Recap
A family of hypothesis tests that use the chi-square statistic to compare observed frequencies to expected frequencies. The three main types are: goodness-of-fit (does data match a claimed distribution?), test of independence (are two categorical variables related?), and test of homogeneity (do different populations have the same distribution?).
You expect a die to land on each face about \frac{1}{6} of the time. You roll it 600 times and compare what you observed to what you expected. If the differences are small, the die is probably fair. If they're large, something is off. The chi-square statistic measures 'how far off are the observed counts from what we expected?'
Read the full concept explanation โHow to Use These Examples
- Read the first worked example with the solution open so the structure is clear.
- Try the practice problems before revealing each solution.
- Use the related concepts and background knowledge badges if you feel stuck.
What to Focus On
Core idea: Chi-square tests work with categorical (count) data, not numerical measurements. Large \chi^2 values mean the observed data deviates significantly from what was expected under H_0.
Common stuck point: Students struggle to distinguish the three types: goodness-of-fit tests one variable against a claimed distribution, independence tests the relationship between two variables in one sample, homogeneity tests the same variable across multiple populations.
Worked Examples
Example 1
mediumSolution
- 1 Expected under H_0 (fair die): E = 60/6 = 10 for each outcome
- 2 \chi^2 = \sum \frac{(O-E)^2}{E} = \frac{(8-10)^2}{10} + \frac{(12-10)^2}{10} + \frac{(9-10)^2}{10} + \frac{(11-10)^2}{10} + \frac{(13-10)^2}{10} + \frac{(7-10)^2}{10}
- 3 = \frac{4+4+1+1+9+9}{10} = \frac{28}{10} = 2.8
- 4 df = 6-1 = 5; critical value \chi^2_{0.05,5} = 11.07; since 2.8 < 11.07, fail to reject H_0
Answer
Example 2
hardPractice Problems
Try these problems on your own first, then open the solution to compare your method.
Example 1
easyExample 2
hardRelated Concepts
Background Knowledge
These ideas may be useful before you work through the harder examples.