Step by step
The question
Question: we saw the counts 90, 60, 50, and expected 50%, 25%, 25%: at the 1% level, do the data fit?
1 Write the hypotheses
H₀ is the "nothing new" idea.
Here: the data fit the expected parts.
Hₐ is what we want to show.
Here: the data do not fit.
2 Expected counts
If H zero is true, each cell expects n times its part.
A: 200 times 0.5 is 100.
B: 200 times 0.25 is 50.
C: 200 times 0.25 is 50.
Every expected count is at least 5, so the test works.
3 Each part
Chi-square adds up, for each cell, the observed minus the expected, squared, over the expected.
A table: each cell, what we saw, O, and what we expected, E.
90 minus 100 is −10.
Squared, 100.
Over 100: 1.
60 minus 50 is 10.
Squared, 100.
Over 50: 2.
50 minus 50 is 0.
Squared, 0.
Over 50: 0.
Careful!
We always divide by the expected count, not the observed one.
4 Add them
1 plus 2 plus 0 is 3.
5 The cut-off
df is the number of cells minus 1: 3 minus 1 is 2.
Chi-square is always a right-tail test: big means far from what we expected.
Row 2, column 0.01.
Row 2, column .01: the cut-off is 9.210.
6 Decide
The chi-square curve for df 2.
Past the cut-off, 9.210, is the reject part.
3 is not past the cut-off.
So we do not reject H zero.
7 Say it in words
In words: at the 1% level, there is not enough evidence that the data do not fit.
This does not prove H zero is true.
We just cannot rule it out.
8 Check
Let's check: the expected counts add up to 200, like the observed ones.
And the differences O minus E add up to 0.
So it is right!
Let's look back.
First: write the hypotheses.
Then: expected counts.
Then: each part.
Then: add them.
Then: the cut-off.
Then: decide.
Then: say it in words.
Last: check.