AP-STATS-6.10-6.11

U6.10 Two-Proportion z-Test

Master the two-proportion z-test for AP Statistics: set up hypotheses, use the pooled proportion in the standard error, compute z, find the p-value, and conclude in context.

What you'll do in this lesson

A voice-first session with the Crimsora tutor on U6.10 Two-Proportion z-Test, then targeted practice and FRQs — with the tutor adapting to where you get stuck.

What this lesson covers

You already know how to build a two-proportion confidence interval. Now we flip to hypothesis testing: is there real evidence that two population proportions differ? The two-proportion z-test answers exactly that. The one twist that trips students up is the standard error — because the null hypothesis assumes the two proportions are equal, we combine the samples into a single pooled proportion before computing the SE. This lesson walks through hypotheses, the pooled SE, the test statistic, the p-value, and the conclusion, all in the four-step format the exam rewards.

Setting Up the Hypotheses

A two-proportion z-test compares the true proportions of two independent populations, p1p_1 and p2p_2. Because we are testing for a difference, we write hypotheses about p1p2p_1 - p_2.

The null hypothesis always states there is no difference: H0:p1p2=0H_0: p_1 - p_2 = 0, equivalently p1=p2p_1 = p_2. The alternative reflects the research question and comes in three flavors:
ClaimAlternative
Proportions differHa:p1p20H_a: p_1 - p_2 \neq 0
Group 1 higherHa:p1p2>0H_a: p_1 - p_2 > 0
Group 1 lowerHa:p1p2<0H_a: p_1 - p_2 < 0
Define your groups clearly in words (for example, "p1p_1 = true proportion of treated patients who recover") so the direction of HaH_a is unambiguous. A common mistake is writing hypotheses about sample proportions p^1\hat{p}_1 and p^2\hat{p}_2; hypotheses are always about population parameters. State your significance level, commonly α=0.05\alpha = 0.05, before looking at the data. On the exam, points are awarded for correct parameter definitions and correctly-directed hypotheses, so never skip this step.

Why We Pool the Proportion

Here is the defining feature of the test. Under H0H_0 we assume p1=p2p_1 = p_2, meaning both samples are estimating the same common proportion. So it makes sense to combine all the successes from both samples into a single best estimate, the pooled (combined) proportion:p^c=x1+x2n1+n2\hat{p}_c = \frac{x_1 + x_2}{n_1 + n_2}Here x1x_1 and x2x_2 are the counts of successes and n1n_1, n2n_2 are the sample sizes. We then use p^c\hat{p}_c in the standard error for the test statistic:SE=p^c(1p^c)(1n1+1n2)SE = \sqrt{\hat{p}_c(1-\hat{p}_c)\left(\frac{1}{n_1} + \frac{1}{n_2}\right)}This is the single biggest difference between the two-proportion z-test and the two-proportion z-interval. The confidence interval does NOT pool — it uses each sample's own p^\hat{p} because it is not assuming the proportions are equal. The test pools because the null hypothesis explicitly assumes equality. Mixing these up is one of the most frequent errors on FRQs. If a count xix_i is not given directly, compute it as xi=nip^ix_i = n_i \hat{p}_i and round to a whole number of successes.

Computing z and the p-value

With the pooled SE in hand, the test statistic measures how many standard errors the observed difference sits from zero:z=(p^1p^2)0p^c(1p^c)(1n1+1n2)z = \frac{(\hat{p}_1 - \hat{p}_2) - 0}{\sqrt{\hat{p}_c(1-\hat{p}_c)\left(\frac{1}{n_1} + \frac{1}{n_2}\right)}}The numerator uses the actual sample proportions p^1\hat{p}_1 and p^2\hat{p}_2; only the SE in the denominator uses the pooled value. The 0-0 comes from the null value of the difference.

Once you have zz, find the p-value from the standard normal distribution. For a two-sided HaH_a, the p-value is 2P(Zz)2P(Z \ge |z|). For a one-sided test, use just the appropriate tail. On a calculator this is the 2-PropZTest function, which reports zz and the p-value directly — but you must still show the formula and inputs to earn full credit.

Before trusting the result, verify conditions: independent random samples (or random assignment), the 10% condition if sampling without replacement, and the large-counts condition. For the test, check the expected counts using the pooled proportion: n1p^cn_1\hat{p}_c, n1(1p^c)n_1(1-\hat{p}_c), n2p^cn_2\hat{p}_c, and n2(1p^c)n_2(1-\hat{p}_c) should all be at least 10.

Concluding in Context

A conclusion is a two-part sentence linking the p-value to the significance level and then to the real-world question.

If the p-value is less than or equal to α\alpha, reject H0H_0: there is convincing statistical evidence of a difference. If the p-value is greater than α\alpha, fail to reject H0H_0: there is not convincing evidence of a difference. Notice you never "accept" H0H_0 and never "prove" anything.

A full-credit conclusion template: "Because the p-value of ___ is (less than / greater than) α\alpha, we (reject / fail to reject) H0H_0. We (do / do not) have convincing evidence that [the proportion of ... differs from the proportion of ...]."

Always name the two groups and the context in the final clause — a bare "reject H0H_0" earns little. Watch the direction: if HaH_a was one-sided, your conclusion should reference "greater than" or "less than," not just "different." Finally, remember that failing to reject does not mean the proportions are equal; it means the data did not provide enough evidence to distinguish them.

Key terms

Two-Proportion z-Test.
A significance test that assesses whether two independent population proportions differ, using a z statistic based on the difference of sample proportions.
Pooled Proportion (p^c\hat{p}_c).
The combined estimate p^c=x1+x2n1+n2\hat{p}_c = \frac{x_1 + x_2}{n_1 + n_2} used in the standard error because the null hypothesis assumes the two proportions are equal.
Null Hypothesis (H0H_0).
The claim of no difference, H0:p1p2=0H_0: p_1 - p_2 = 0, meaning the two population proportions are equal.
Standard Error (pooled).
SE=p^c(1p^c)(1n1+1n2)SE = \sqrt{\hat{p}_c(1-\hat{p}_c)\left(\frac{1}{n_1}+\frac{1}{n_2}\right)}, the estimated standard deviation of the difference under H0H_0.
p-value.
The probability, assuming H0H_0 is true, of getting a difference in sample proportions at least as extreme as the observed one.
Large-Counts Condition.
For the test, all of n1p^cn_1\hat{p}_c, n1(1p^c)n_1(1-\hat{p}_c), n2p^cn_2\hat{p}_c, n2(1p^c)n_2(1-\hat{p}_c) must be at least 10 to justify the normal approximation.

Worked example

A researcher tests whether a new flu vaccine reduces infection rates. In a randomized experiment, 30 of 200 vaccinated people got the flu, while 50 of 200 unvaccinated people got the flu. At α=0.05\alpha = 0.05, is there evidence that the vaccinated group has a lower infection proportion?
Let p1p_1 = true infection proportion for vaccinated and p2p_2 = true infection proportion for unvaccinated. Since we expect the vaccine to lower infection, use a one-sided test.

H0:p1p2=0H_0: p_1 - p_2 = 0 and Ha:p1p2<0H_a: p_1 - p_2 < 0.

Sample proportions: p^1=30200=0.15\hat{p}_1 = \frac{30}{200} = 0.15 and p^2=50200=0.25\hat{p}_2 = \frac{50}{200} = 0.25.

Pooled proportion: p^c=30+50200+200=80400=0.20\hat{p}_c = \frac{30 + 50}{200 + 200} = \frac{80}{400} = 0.20.

Check conditions: random assignment (experiment); expected counts 200(0.20)=40200(0.20)=40 and 200(0.80)=160200(0.80)=160 for each group, all at least 10.

Standard error: SE=0.20(0.80)(1200+1200)=0.16(0.01)=0.0016=0.04SE = \sqrt{0.20(0.80)\left(\frac{1}{200}+\frac{1}{200}\right)} = \sqrt{0.16(0.01)} = \sqrt{0.0016} = 0.04.

Test statistic: z=0.150.250.04=0.100.04=2.5z = \frac{0.15 - 0.25}{0.04} = \frac{-0.10}{0.04} = -2.5.

p-value: for Ha<0H_a < 0, p-value =P(Z2.5)0.0062= P(Z \le -2.5) \approx 0.0062.

Conclusion: Because 0.0062<0.050.0062 < 0.05, we reject H0H_0. There is convincing evidence that the true infection proportion is lower for vaccinated people than for unvaccinated people.

Practice questions

In a two-proportion z-test, why is the pooled proportion p^c\hat{p}_c used in the standard error instead of the separate sample proportions?
  1. Because it always produces a smaller standard error
  2. Because the null hypothesis assumes the two population proportions are equal
  3. Because it increases the p-value
  4. Because the sample sizes are unequal

Answer: Because the null hypothesis assumes the two population proportions are equal

The test is conducted assuming H0:p1=p2H_0: p_1 = p_2 is true. Under that assumption both samples estimate one common proportion, so combining them gives the best single estimate, p^c\hat{p}_c, for the standard error. The confidence interval, which makes no equality assumption, does not pool.
A poll finds that 120 of 400 city residents and 90 of 360 suburban residents support a new tax. Set up the hypotheses and compute the pooled proportion and the test statistic for a two-sided test.

Answer: p^c=0.276\hat{p}_c = 0.276, z1.54z \approx 1.54; fail to reject H0H_0.

Let p1p_1 = city support proportion, p2p_2 = suburban. H0:p1p2=0H_0: p_1 - p_2 = 0, Ha:p1p20H_a: p_1 - p_2 \neq 0. Sample proportions: p^1=120/400=0.30\hat{p}_1 = 120/400 = 0.30, p^2=90/360=0.25\hat{p}_2 = 90/360 = 0.25. Pooled: p^c=120+90400+360=2107600.276\hat{p}_c = \frac{120+90}{400+360} = \frac{210}{760} \approx 0.276. SE=0.276(0.724)(1400+1360)0.1998(0.00528)0.0325SE = \sqrt{0.276(0.724)\left(\frac{1}{400}+\frac{1}{360}\right)} \approx \sqrt{0.1998(0.00528)} \approx 0.0325. Then z=0.300.250.0325=0.050.03251.54z = \frac{0.30 - 0.25}{0.0325} = \frac{0.05}{0.0325} \approx 1.54. The two-sided p-value 0.12>0.05\approx 0.12 > 0.05, so fail to reject H0H_0: not enough evidence of a difference in support.
A student computes a two-proportion z-test and reports 'the p-value is 0.20, so we accept the null hypothesis that the proportions are equal.' Identify and correct the error.

Answer: You never accept H0H_0; you fail to reject it, and this does not prove the proportions are equal.

With a large p-value we conclude there is not convincing evidence of a difference, so we fail to reject H0H_0. This is different from proving H0H_0 true — the data simply could not distinguish the proportions. A correct statement: 'Because 0.20 is greater than α\alpha, we fail to reject H0H_0; we do not have convincing evidence that the two proportions differ.'

FAQ

When do I pool and when do I not pool the proportions?
Pool for the two-proportion z-test (hypothesis test), because H0H_0 assumes the proportions are equal. Do NOT pool for the two-proportion z-interval, because a confidence interval does not assume equality — it uses each sample's own p^\hat{p}.
What conditions do I need to check for a two-proportion z-test?
Independence (two independent random samples or two groups from random assignment), the 10% condition if sampling without replacement, and the large-counts condition using the pooled proportion: n1p^cn_1\hat{p}_c, n1(1p^c)n_1(1-\hat{p}_c), n2p^cn_2\hat{p}_c, and n2(1p^c)n_2(1-\hat{p}_c) must all be at least 10.
How do I find the counts if the problem only gives proportions?
Multiply each sample proportion by its sample size: xi=nip^ix_i = n_i \hat{p}_i, then round to the nearest whole number since counts of successes must be integers. Use these counts in the pooled proportion formula.
How is my conclusion graded on the AP exam?
You must connect the p-value to α\alpha, state reject or fail to reject H0H_0, and describe the result in the context of the two groups. A conclusion without context, or one that says you 'accept' or 'prove' the null, loses credit.

Learn this with a teacher, not a page

The Crimsora tutor teaches U6.10 Two-Proportion z-Test live — explaining on a whiteboard, asking you questions, and adapting to where you get stuck.