Step by step
The question
Question: in group 1, 256 of 400 say yes, and in group 2, 216 of 400: at the 1% level, is the first proportion different from the second?
1 Write the hypotheses
H₀ is the "nothing new" idea: it has the equal sign.
Here: the two proportions are the same, so the difference is 0.
Hₐ is what we want to show.
Here: the first proportion is different from the second.
Different from: two tails.
2 The two parts
Group 1: 256/400 is 0.64.
Group 2: 216/400 is 0.54.
3 Pool the groups
If H zero is true, the two groups are the same.
So we put them together: the pooled proportion.
All the yeses over everyone: 472/800 is 0.59.
Careful!
We pool the counts, not the two proportions.
And q c is 1 minus 0.59: 0.41.
4 Standard error
The standard error, the SD of the difference: the square root of p c times q c, times 1/n 1 plus 1/n 2.
0.59 times 0.41 is 0.2419.
1/400 plus 1/400 is 0.005.
Multiply, then the square root: about 0.0348.
5 The test number
z is the difference over the SE.
0.64 minus 0.54 is 0.1.
Divided by 0.0348: about 2.88.
6 The p-value
The p-value is the chance of getting a sample this far out, if H zero is true.
On the bell of H zero: 0 in the middle, our sample at z = 2.88.
Two tails: we shade both ends, as far out as our sample or more.
The z-table gives the area to the left of z.
Row 2.8, column .08.
For z = 2.88: the row 2.8 and the column .08 meet at 0.9980.
One end is 1 minus 0.9980: 0.0020.
Two ends: 2 times that is 0.0040.
7 Decide
The p-value, 0.0040, is less than alpha, 0.01.
Our sample would be rare if H zero were true.
So we reject H zero.
8 Say it in words
In words: at the 1% level, there is enough evidence that the first proportion is different from the second.
9 Check
Let's check the other way, with the cut-off.
0.01 split into two ends gives the cut-offs plus and minus 2.576.
z is 2.88: past the cut-off.
The same decision.
So it is right!
Let's look back.
First: write the hypotheses.
Then: the two parts.
Then: pool the groups.
Then: standard error.
Then: the test number.
Then: the p-value.
Then: decide.
Then: say it in words.
Last: check.