Educerie · AP · Statistics
AP Statistics 3.13
Carrying Out a Test for the Difference Between Two Population Proportions
How can we determine whether the difference between two groups is statistically significant?
What you will learn
- Know that the test statistic divides p-hat1 minus p-hat2 by the pooled standard error
- Understand that the p-value is found in the tail Ha points to and read assuming the proportions are equal
- Know that the decision compares the p-value with alpha
- Understand how to state a conclusion about Ha in context, matched to the design
You must be able to
- Calculate z with the pooled standard error and find the p-value
- Interpret the p-value in context
- Make a decision by comparing the p-value with alpha
- Write a conclusion in context in non-definitive language
- Carry out a complete two-proportion test on an experiment
- Say what the design allows: cause and effect or generalizing
In the exam. Section I multiple choice: find the test statistic or its standard error, read a p-value, or choose the right decision and conclusion. Section II: a two-proportion -test on a randomized experiment is the Question 3 in the course description's sample paper. The calculation, the p-value interpretation, the comparison with and the conclusion in context each carry a mark. Skills: calculate (3.E), interpret (4.F), justify a claim (4.G).
1The test statistic
The denominator is the standard error when is assumed. Both groups share the same , so it appears once.
This differs from the interval's standard error, where each group keeps its own . The reason is the logic of the test. The null says the proportions are equal, so we use the best single estimate of that common proportion. The test statistic has a standard normal distribution when is true and the conditions hold.
2A full test on an experiment
Use Example A from 3.12. A designer thinks a flashcard quiz format will help students finish an online module within a week more often than a reading format does. 150 students were randomly assigned: 75 to the quiz format and 75 to the reading format. 51 of the quiz students and 39 of the reading students finished. Test at .
Procedure. Two-sample -test for the difference between two population proportions.
Parameters and hypotheses.
- = the proportion of students like these who would finish the module within a week with the quiz format.
- = the proportion who would finish within a week with the reading format.
Conditions.
- Randomization: the students were randomly assigned to the two formats.
- 10%: not needed for a randomized experiment.
- Normality: . and for each group. All four are at least 10.
Calculation.
Figure 1 shows the null distribution on the scale of the difference. It is centered on 0, because says the proportions are equal. Its standard deviation is 0.08. The observed difference of 0.16 is twice that, and the shaded area to its right is the p-value.
Interpretation of the p-value. Assuming the proportion of students like these who finish within a week is the same with both formats, the probability of getting a difference in sample proportions (quiz minus reading) of 0.16 or more, by random assignment alone, is 0.023.
Decision. Since the p-value of 0.0228 is less than , we reject .
Conclusion. There is convincing evidence that the proportion of students like these who finish the module within a week is greater with the quiz format than with the reading format. Because the students were randomly assigned, the difference can be attributed to the study format. Because they were not randomly sampled, the conclusion applies to students like these, not to all students.
3A two-sided test on two samples
Use Example B from 3.12: independent random samples of 160 commuters in City M (44 bicycle commuters) and 200 in City N (62). Is there convincing evidence that the proportions of bicycle commuters differ? Test at .
The conditions were checked in 3.12 (independent random samples, each less than 10% of its population, all four expected counts at least 10).
Since the p-value of 0.47 is greater than 0.05, we fail to reject . The data do not provide convincing evidence that the proportion of all commuters in City M who commute by bicycle differs from the proportion in City N.
The sample proportions are different (0.275 and 0.310). That gap is small next to the sampling variability for samples of this size. A difference like it would be very common if the cities were the same.
Note what you may not say: "the two cities have the same proportion." The test failed to find a difference. It did not show there is none.
4Checking the answer against an interval
A 95% interval for in the City M and City N data uses the unpooled standard error, . It is . Zero is inside. That agrees with failing to reject the two-sided null at 5%.
The interval and the test use slightly different standard errors (separate for the interval, pooled for the test), so a result very close to the cut-off could differ. The interval has an advantage: it also shows how large the difference could be, which a bare decision does not.
5How and the sample size act
- Change and the same p-value can lead to a different decision. At , the quiz experiment's p-value of 0.0228 is greater than 0.01, so you would fail to reject. The is chosen before the data.
- Doubling both groups to 150, with the same sample proportions (0.68 and 0.52), makes the standard error smaller by a factor of . The would be about 2.83. The same observed gap is stronger evidence from a bigger sample.
Practice questions
30 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.