Chi-square goodness-of-fit test
Test whether a population’s colour shares match a claim, and state a conclusion in context.
It opens on
Blue/orange/green/yellow/red/brown are claimed to be 24/20/16/14/13/13%; observed counts are 34/54/28/26/36/22. Are the gaps unusually large?
Why it matters
A sample can differ from a company’s claim by chance; this test helps judge whether the gaps are unusually large.
Good to know first
- Carrying out and concluding a test for a population proportion: state H₀ and Hₐ, find the p-value, reject H₀ when p ≤ α
Step by step
Expected counts
State the hypotheses and calculate counts predicted by the candy claim.
In the count table, with n = 200, the blue expected bar is E = 200(0.24) = 48; orange 200(0.20) = 40.
A common mix-up
Observed counts are the company’s predictions.
In fact: The claim predicts 48 blue, not the observed 34.
Measure gaps
Calculate the test statistic and locate its p-value.
Blue contributes (34 − 48)²/48 = 196/48 ≈ 4.083.
A common mix-up
Percentages give the same χ², or df = 199.
In fact: Use counts and six categories, giving df = 5.
Check and decide
Check conditions, conclude in context, and identify the largest contributors.
Candy sample random; if production has at least 2,000 candies, 200 ≤ 10%; every E ≥ 26 ≥ 5.
A common mix-up
Failing to reject proves the die fair.
In fact: p ≈ 0.26 gives insufficient evidence of unfairness, not proof.
Try it
With the same claim and n = 400, find expected brown.Answer
52 (hint: multiply 400 by 0.13).
With n = 300, brown E = 39 and O = 45. Find its component.Answer
36/39 ≈ 0.923 (hint: square O − E first).
A random 200-candy sample from production exceeding 2,000 has p ≈ 0.71. Decide at 0.05.Answer
Fail to reject H₀; insufficient evidence the shares differ (hint: compare p with α).
Change only n to 300; write brown’s expected-count line.Answer
E = 300(0.13) = 39.
In a new n = 300 sample, brown has E = 39 and O = 33. Write its component.Answer
(33 − 39)²/39 ≈ 0.923.
