In short
The test statistic is , using the pooled proportion p̂_c. Find the p-value from the normal distribution in the direction of Hₐ, compare with α, and conclude in context. With random assignment, a significant result supports a cause-and-effect conclusion.
What you need to know
- Calculate the test statistic for a two-sample z-test using the pooled proportion.
- Find the p-value for one- and two-sided alternatives.
- Carry out all four steps and conclude in context.
- State the scope of the conclusion for samples and experiments.
The test statistic
It has the usual shape: (statistic − null value) ÷ standard deviation of the statistic. The null value of the difference is 0, and the standard deviation uses the pooled proportion because the calculation assumes p₁ = p₂.
Worked example
Continuing topic 3.12: independent random samples of 200 adults found 84 weekly cyclists in City A (p̂_A = 0.42) and 60 in City B (p̂_B = 0.30). Is there convincing evidence that a higher proportion of adults cycle weekly in City A? Use α = 0.05.
State. H₀: p_A − p_B = 0; Hₐ: p_A − p_B > 0, 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. α = 0.05.
Plan. Two-sample z-test for p_A − p_B. Independent random samples; 200 is less than 10% of each city's adults; pooled p̂_c = 0.36 gives expected counts 72 and 128 in each group, all at least 10.
Do. z = 2.50, p-value ≈ 0.0062 (2-PropZTest gives the same).
Conclude. Because 0.0062 < 0.05, we reject H₀. There is convincing evidence that the proportion of all adults who cycle at least once a week is higher in City A than in City B.
If the question had been two-sided ('Do the cities differ?'), the p-value would double to about 0.012 — still below 0.05, but above 0.01, which matches the 95% and 99% intervals in topic 3.11.
Samples versus experiments
With random samples from two populations, we can generalise to those populations but cannot claim that living in City A causes more cycling: many other differences between the cities could explain it.
With random assignment in an experiment, a significant result supports cause and effect for the subjects studied (and people like them). In a sleep-app experiment where 45 of 150 volunteers with a new app and 30 of 150 with the standard app reported better sleep, p̂_c = 0.25, z = 0.10/0.05 = 2.00, and the one-sided p-value is about 0.023. At α = 0.05 this gives convincing evidence that the new app causes a higher proportion of volunteers like these to sleep better.
Key terms
- Pooled standard error
- √(p̂_c(1 − p̂_c)(1/n₁ + 1/n₂)), the spread of p̂₁ − p̂₂ assuming p₁ = p₂.
- 2-PropZTest
- Calculator routine giving z and the p-value for a two-proportion test.
- Statistically significant difference
- A difference in sample proportions too large to be explained by chance alone at level α.
- Scope of inference
- Who a conclusion applies to and whether it supports cause and effect, based on random sampling and random assignment.
Common mistakes
Using the unpooled standard error in the test.
The test uses p̂_c in the standard error.
Claiming cause and effect from two random samples.
Only random assignment supports causation.
Forgetting to double the tail area for Hₐ: p₁ − p₂ ≠ 0.
Two-sided p-values include both tails.
How this topic is tested
- Show the pooled proportion, the formula with numbers and the z-value.
- Write the conclusion using both parameters in context.
- Add a sentence on scope when the question mentions how data were collected.
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; sample 2: 20 of 100. The test statistic for H₀: p₁ − p₂ = 0 is about:
Question 2 · SP 4 · Interpret Results
For z = 1.63 and Hₐ: p₁ − p₂ > 0, at α = 0.05 we should:
Question 3 · SP 4 · Interpret Results
A two-proportion test from random samples of men and women gives p-value 0.003. Which conclusion is justified?
Question 4 · SP 3 · Analyze Data
Which part of the two-proportion z-statistic depends on assuming H₀ is true?
Question 5 · SP 4 · Interpret Results
In an experiment, the new treatment group's success rate is significantly higher (p = 0.01). What can be concluded?
Free-response practice
Write your answer first, then mark it against the scoring guide.
Inference (full test) · 5 points
In a randomized experiment, 150 volunteers used a new sleep app and 150 used a standard app. 45 in the new group and 30 in the standard group reported sleeping better. Do the data give convincing evidence that the new app is better? Use α = 0.05.
- (a) State hypotheses and check conditions.
- (b) Calculate z and the p-value.
- (c) Conclude in context, including scope.
Scoring guide: one point for each of the following
Part (a)
- H₀: p_N − p_S = 0; Hₐ: p_N − p_S > 0; true proportions of volunteers like these who would sleep better with each app.
- Random assignment; p̂_c = 0.25 gives 37.5 and 112.5 in each group, all at least 10.
Part (b)
- z = 0.10/√(0.25 × 0.75 × (2/150)) = 2.00.
- p-value ≈ 0.023.
Part (c)
- Because 0.023 < 0.05, reject H₀: convincing evidence the new app causes a higher proportion of volunteers like these to report better sleep.
Connected topics
Frequently asked questions
Can I use 2-PropZTest on the exam?
Yes, if you name the test, give the inputs and report z and the p-value with labels.
Why does the interval use a different standard error?
An interval doesn't assume p₁ = p₂, so it uses each sample's own proportion.
Is z ≥ 2 always significant?
For a one-sided test at α = 0.05, yes; for a two-sided test at α = 0.01 you need |z| ≥ 2.576. Always compare the p-value with α.