In short
To compare two proportions, test (equivalently p₁ = p₂) against Hₐ: p₁ − p₂ > 0, < 0 or ≠ 0. Because H₀ says the proportions are equal, the test uses one pooled (combined) proportion to estimate the common value. Conditions: two independent random samples or random assignment, 10% for each sample, and large counts.
What you need to know
- Write hypotheses for a two-sample z-test for p₁ − p₂, defining both parameters.
- Calculate the pooled (combined) sample proportion and explain why it is used.
- Verify the conditions for a two-sample z-test.
- Distinguish settings with two samples from settings with one sample and two variables.
Hypotheses
A transport department suspects that adults in City A are more likely to cycle weekly than adults in City B. Independent random samples of 200 adults from each city find 84 cyclists in A and 60 in B.
where p_A and p_B are the proportions of all adults in City A and City B who cycle at least once a week. The null hypothesis says there is no difference; the alternative comes from the department's suspicion before collecting data. If the question had been 'Do the cities differ?', the alternative would be p_A − p_B ≠ 0.
The pooled proportion
A test calculates everything assuming H₀ is true. If p_A = p_B, both samples come from populations with the same proportion, so the best estimate of that common value combines the samples:
The pooled proportion replaces both p̂_A and p̂_B in the standard error of the test statistic (topic 3.13). It is not used for a confidence interval, which makes no assumption that the proportions are equal.
Conditions
- Random: independent random samples from the two cities (in an experiment: random assignment to two treatments).
- 10%: 200 is less than 10% of all adults in each city (not needed with random assignment).
- Large counts: with p̂_c = 0.36, n_A p̂_c = 72, n_A(1 − p̂_c) = 128, n_B p̂_c = 72 and n_B(1 − p̂_c) = 128 are all at least 10. Checking the observed counts 84, 116, 60 and 140 is also accepted.
Use this test when there are two separate groups and one yes/no variable. If you have one sample and want to know whether two categorical variables are associated, or more than two groups or categories, you need the chi-square tests in topics 3.14 and 3.15.
Also choose α before seeing the data, usually 0.05 unless the question says otherwise. The test itself is carried out in topic 3.13.
Key terms
- Two-sample z-test for p₁ − p₂
- A significance test comparing two population proportions.
- Pooled (combined) proportion p̂_c
- Total successes ÷ total sample size, estimating the common p when H₀: p₁ = p₂ is assumed.
- Independent samples
- Two samples where the choice of one does not affect the other.
- Null hypothesis of no difference
- H₀: p₁ − p₂ = 0.
Common mistakes
Writing H₀: p̂₁ = p̂₂.
Hypotheses are about the parameters p₁ and p₂.
Averaging p̂₁ and p̂₂ to pool.
Pool counts: (x₁ + x₂)/(n₁ + n₂); a simple average is wrong when sample sizes differ.
Using the pooled proportion in a confidence interval.
Pool only for the test, because only the test assumes p₁ = p₂.
How this topic is tested
- Name it: 'two-sample z-test for a difference in proportions'.
- Show the pooled proportion as a fraction of counts.
- Define both parameters, including the population each comes from.
Practice questions
Original AP-style multiple-choice questions. Pick an answer to see the explanation.
Question 1 · SP 3 · Analyze Data
Sample 1: 30 of 100 successes. Sample 2: 20 of 100. The pooled proportion is:
Question 2 · SP 3 · Analyze Data
Sample 1: 18 of 60. Sample 2: 60 of 240. Why is the pooled proportion not simply the average of 0.30 and 0.25?
Question 3 · SP 1 · Formulate Questions
A researcher asks whether the proportion of left-handers differs between boys and girls. The correct alternative is:
Question 4 · SP 3 · Analyze Data
Why does the two-proportion test use a pooled proportion?
Question 5 · SP 1 · Formulate Questions
Which situation calls for a two-sample z-test for p₁ − p₂?
Free-response practice
Write your answer first, then mark it against the scoring guide.
Inference (set-up) · 4 points
A school randomly assigns 160 students to receive text reminders about homework and 160 to receive none. 52 in the reminder group and 40 in the other group miss at least one deadline. The school wants to know whether reminders reduce the proportion who miss a deadline.
- (a) State the hypotheses, defining parameters.
- (b) Calculate the pooled proportion and check conditions.
Scoring guide: one point for each of the following
Part (a)
- H₀: p_R − p_N = 0; Hₐ: p_R − p_N < 0.
- p_R and p_N are the true proportions of students like these who would miss a deadline with and without reminders.
Part (b)
- p̂_c = 92/320 = 0.2875.
- Random assignment; expected counts 160(0.2875) = 46 and 160(0.7125) = 114 in each group are at least 10.
Connected topics
Frequently asked questions
Can I check large counts with the observed counts?
Yes. Using the observed successes and failures in each group is accepted on the AP exam, as is using the pooled proportion.
Do the groups need to be the same size?
No. The pooled proportion and the standard error handle unequal sizes.
What if the samples are paired, such as before and after on the same people?
Then they aren't independent and this test doesn't apply.