Chi-Square Test Examples: 45 Problems with Answers
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 hypothesis test that compares observed frequencies to expected frequencies using the chi-square statistic to assess independence or goodness of fit.
You expect a die to land on each face about 61 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 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:The chi-square test sums squared gaps between observed and expected category counts to test independence or goodness of fit.
Common stuck point:The procedure for chi-square test is the easy part; the trap is dividing by Observed instead of Expected. Asking "Are the data counts of cases falling into categories, being compared to expected counts (rather than means or continuous values)?" first is what keeps a correct-looking calculation from being attached to the wrong concept.
Sense of Study hint:Ask: Are the data counts of cases falling into categories, being compared to expected counts (rather than means or continuous values)?
Worked Examples
Example 1
medium
A die is rolled 60 times. Observed: 1→8, 2→12, 3→9, 4→11, 5→13, 6→7. Conduct a chi-square goodness-of-fit test at α=0.05.
Answer
χ2=2.8<11.07. Fail to reject H0. No evidence the die is unfair.
First step
1
Expected under H0 (fair die): E=60/6=10 for each outcome
See the full worked solution + why-it-works coaching
Setup·Key insight·Why it works·Common pitfall·Connection
A goodness-of-fit test: O=(60,40,50,50), claimed proportions (0.25,0.25,0.25,0.25), n=200. Find χ2.
Example 5
hard
Observed counts in a 2×2 table: (30201040). Find the expected count for the top-left cell.
Example 6
challenge
A genetics experiment expects ratio 9:3:3:1 in 160 plants. Observed: 84,33,30,13. Compute χ2.
Practice Problems
Try these problems on your own first, then open the solution to compare your method.
Example 1
easy
For a chi-square test with observed=15, expected=20 for one category, calculate that category's contribution to the χ2 statistic.
Example 2
hard
A survey of movie preferences across three age groups produces a 3×4 contingency table (3 age groups, 4 movie genres). State H0 and Ha, calculate degrees of freedom, and explain what a significant result would mean.
Example 3
easy
A category had observed count O=30 and expected count E=25. Compute its contribution E(O−E)2 to the chi-square statistic.
Example 4
easy
A fair die is rolled 600 times. What is the expected count for each face under the null hypothesis of fairness?
Example 5
easy
Chi-square tests are appropriate for which kind of data: categorical counts or continuous measurements?
Example 6
easy
A goodness-of-fit test has k=5 categories. How many degrees of freedom does the chi-square statistic have?
Example 7
easy
In a chi-square test, what condition must each expected count satisfy for the approximation to be reliable?
Example 8
easy
Two cells contribute E(O−E)2 values of 1.2 and 0.8. If these are the only cells, what is the chi-square statistic?
Example 9
easy
As the chi-square statistic gets larger, does the evidence against the null hypothesis get stronger or weaker?
Example 10
easy
A two-way table has 3 rows and 4 columns. How many degrees of freedom does the chi-square test of independence have?
Example 11
medium
A goodness-of-fit test compares observed counts O=(20,30,50) to expected counts E=(30,30,40). Compute the chi-square statistic.
Example 12
medium
A die rolled 600 times gives counts (90,110,100,105,95,100). The expected count per face is 100. Compute the chi-square statistic.
Example 13
medium
In a 2×2 table, the expected count for a cell is grand total(row total)(column total). If row total =40, column total =50, grand total =200, find the expected count.
Example 14
medium
A chi-square test of independence yields χ2=9.5 with df=4 and a p-value of 0.05. At α=0.05, what is the conclusion?
Example 15
medium
A goodness-of-fit test claims four candies should appear in ratio 1:1:1:1 among n=120. What is the expected count per color?
Example 16
medium
A claimed distribution is 50%,30%,20% over n=200. Find the expected counts for the three categories.
Example 17
medium
A test of independence and a test of homogeneity use the same chi-square formula. What distinguishes them?
Example 18
medium
A goodness-of-fit test gives χ2=1.2 on df=3, with a large p-value of 0.75. At α=0.05, what do you conclude?
Example 19
medium
One cell of a chi-square test has O=18, E=12. Compute that cell's contribution.
Example 20
challenge
A goodness-of-fit test on 4 categories gives χ2=7.81. The critical value for α=0.05 at df=3 is exactly 7.81. State the decision and explain the boundary case.
Example 21
challenge
In a 2×3 table the smallest expected count comes out to 4.2. All others exceed 5. Why might the chi-square p-value be unreliable, and what is one fix?
Example 22
challenge
A goodness-of-fit test on n=200 claims proportions 0.4,0.4,0.2. Observed: 90,70,40. Compute χ2 and state df.
Example 23
easy
For one cell of a chi-square test, O=24 and E=20. Compute E(O−E)2.
Example 24
easy
A goodness-of-fit test has 7 categories. Compute the degrees of freedom.
Example 25
easy
A spinner is spun 200 times with 4 equal sectors. Find the expected count per sector.
Example 26
easy
A 4×5 contingency table has how many degrees of freedom for independence?
Example 27
medium
A 2×2 table has row total 60, column total 40, grand total 120. Find the expected count for that cell.
Example 28
medium
For n=300 with claimed proportions 0.5,0.3,0.2, find expected counts.
Example 29
medium
A chi-square test produces χ2=12.3 with df=5, critical value 11.07 at α=0.05. State the decision.
Example 30
medium
A test gives χ2=3.0, df=4. Critical value 9.49 at α=0.05. State the decision.
Example 31
medium
A goodness-of-fit test on 4 candy colors with n=400, equal expected. Observed: 90,110,95,105. Compute χ2.
Example 32
medium
A 3×3 contingency table — how many degrees of freedom does the chi-square independence test have?
Example 33
medium
For n=240 split into 6 categories under uniform null. What is the expected count per category?
Example 34
hard
For a 2×3 table the chi-square statistic is 5.99 with df=2, critical value 5.99 at α=0.05. State the decision.
Example 35
hard
In a 2×2 table, the smallest expected count is 3.5. Is the chi-square approximation appropriate?
Example 36
hard
For the 2×2 table (30201040), compute the chi-square statistic.
Example 37
hard
A goodness-of-fit test with df=10 has critical value 18.31 at α=0.05. If observed χ2=14.0, what is the decision?
Example 38
challenge
A homogeneity test compares 3 separate samples on 4 categories. State the degrees of freedom.
Example 39
challenge
A claim says a coin is fair. In 400 flips you observe 220 heads. Compute χ2 for the goodness-of-fit test.