Dove's LibraryDove's Library

3.12 - Setting Up a Test for the Difference Between Two Population Proportions

Overview

When a question asks whether two populations (or two treatments) differ in the proportion with some outcome, and wants convincing evidence, you run a two-sample zz-test for the difference between two population proportions. This topic covers the setup: naming the test, defining the parameters, writing the hypotheses, and checking the conditions. Topic 3.13 does the calculations and the conclusion. On a free-response question, the setup alone is worth several points.

Choosing the test

Use this test when all three of these are true:
  • There are two groups: two populations sampled separately, or two treatments in an experiment.
  • The response is categorical with two outcomes (yes or no, success or failure), so each group has a proportion.
  • The question asks whether there is convincing evidence of a difference (or that one proportion is larger). That's a test. If the question asks you to estimate the size of the difference, use the two-sample zz-interval from Topic 3.10.
Name it in full: "two-sample zz-test for the difference between two population proportions." On AP scoring, a vague name like "two-sample zz-test" or "2-prop test" doesn't earn the point, and calculator syntax like 2-PropZTest doesn't count as a name. Writing the test statistic formula from Topic 3.13 also identifies the test.
Situation
Procedure
One population, estimate pp
One-sample zz-interval for a population proportion
One population, test a claim about pp
One-sample zz-test for a population proportion
Two populations or treatments, estimate p1−p2p_1 - p_2
Two-sample zz-interval for a difference between population proportions
Two populations or treatments, test for a difference
Two-sample zz-test for the difference between two population proportions
More than two groups, or more than two response categories
Chi-square test for homogeneity or independence (Topic 3.14)

Defining the parameters

The parameters are the two population proportions. A complete definition names three things: that each one is a population (true) proportion, the response variable, and the population (or treatment) in context.
Let p1p_1 = the true proportion of [population 1] who [response], and p2p_2 = the true proportion of [population 2] who [response].
Use subscripts that mean something, like pAp_A and pBp_B for City A and City B. For an experiment, describe the treatment and the subjects instead of a population, for example "pEp_E = the true proportion of patients like those in the study who would book a dental cleaning within 30 days if sent a reminder email." Never put a hat on a parameter: p^\hat{p} is a sample statistic.

Writing the hypotheses

The null hypothesis says there is no difference between the two population proportions. It can be written two equivalent ways:
H0 ⁣:p1=p2orH0 ⁣:p1−p2=0H_0\colon p_1 = p_2 \qquad \text{or} \qquad H_0\colon p_1 - p_2 = 0
The alternative hypothesis comes from the research question. It's one of three:
The question asks whether...
Alternative
Equivalent form
p1p_1 is smaller than p2p_2
Ha ⁣:p1<p2H_a\colon p_1 < p_2
Ha ⁣:p1−p2<0H_a\colon p_1 - p_2 < 0
p1p_1 is larger than p2p_2
Ha ⁣:p1>p2H_a\colon p_1 > p_2
Ha ⁣:p1−p2>0H_a\colon p_1 - p_2 > 0
the proportions differ, in either direction
Ha ⁣:p1≠p2H_a\colon p_1 \neq p_2
Ha ⁣:p1−p2≠0H_a\colon p_1 - p_2 \neq 0
Look for direction words. "Increase," "higher," and "more likely" point to >> (with group 1 first); "decrease" and "lower" point to <<; "differ," "change," and "is there a difference" point to ≠\neq. Choose the alternative from the question before looking at the data, never from which sample proportion came out bigger.
Why the direction matters: if H0H_0 is true, p^1−p^2\hat{p}_1 - \hat{p}_2 varies around 0 from sample to sample. The alternative decides which results count as evidence against H0H_0: differences far below 0, far above 0, or far from 0 in either direction. Those are the shaded regions below.
3.12 - Setting Up a Test for the Difference Between Two Population Proportions
A one-sided alternative looks at one tail. A two-sided alternative looks at both tails, which is why its pp-value in Topic 3.13 counts both.

Checking conditions

A two-sample zz-test for the difference between two population proportions requires three conditions. Check each one in context, with numbers.

Randomization condition

The data must come from two independent random samples or a randomized experiment.
3.12 - Setting Up a Test for the Difference Between Two Population Proportions
  • Independent samples means the two samples are chosen separately, so who lands in one sample has nothing to do with who lands in the other. Random samples from two different cities are independent. Measuring the same people twice is not; that's paired data, which needs a different method.
  • Why it matters: randomness is what makes the sampling distribution of p^1−p^2\hat{p}_1 - \hat{p}_2 predictable. It also sets the scope of the conclusion. Random samples let you generalize to the populations, and random assignment lets you conclude cause and effect.

10% condition

When sampling without replacement, each sample can be at most 10% of its population:
n1≤10%N1andn2≤10%N2n_1 \leq 10\%N_1 \qquad \text{and} \qquad n_2 \leq 10\%N_2
where N1N_1 and N2N_2 are the population sizes. This keeps the observations close enough to independent that the standard deviation formula works. This condition is unnecessary for a randomized experiment, since no one is sampled from a population.

Normality condition (large counts)

The test is carried out assuming H0H_0 is true, and H0H_0 says the two population proportions are equal. So instead of using p^1\hat{p}_1 and p^2\hat{p}_2 separately, combine both samples into one estimate of that common proportion, the combined (pooled) proportion:
p^c=n1p^1+n2p^2n1+n2=total successes in both samplestotal sample size\hat{p}_c = \frac{n_1\hat{p}_1 + n_2\hat{p}_2}{n_1 + n_2} = \frac{\text{total successes in both samples}}{\text{total sample size}}
Then check that these four counts are all at least 10:
n1p^c,n1(1−p^c),n2p^c,n2(1−p^c)n_1\hat{p}_c, \quad n_1(1 - \hat{p}_c), \quad n_2\hat{p}_c, \quad n_2(1 - \hat{p}_c)
When they are, the sampling distribution of p^1−p^2\hat{p}_1 - \hat{p}_2 is approximately normal, so a zz-test works. Two notes:
  • The interval in Topic 3.10 checks observed counts (n1p^1n_1\hat{p}_1 and so on) because it doesn't assume H0H_0. The test assumes H0H_0, so its condition uses p^c\hat{p}_c. (AP scoring has also accepted observed counts for a test, but the p^c\hat{p}_c version is never wrong.)
  • "n≥30n \geq 30" and "by the Central Limit Theorem" are not the normality condition for proportions, and they earn no credit.

Example 1: Electric vehicles in two cities

City A has about 180,000 households and City B has about 240,000. A researcher takes a random sample of 280 households in City A and a separate random sample of 340 households in City B. In City A, 56 of the sampled households own at least one electric vehicle (EV); in City B, 51 do. The researcher wants to know whether the proportion of households that own an EV differs between the two cities. Set up the appropriate test. (Topic 3.13 carries it out.)
State: The question says "differs," with no direction, so the alternative is two-sided.
H0 ⁣:pA−pB=0Ha ⁣:pA−pB≠0H_0\colon p_A - p_B = 0 \qquad H_a\colon p_A - p_B \neq 0
where pAp_A = the true proportion of all households in City A that own at least one EV, and pBp_B = the true proportion of all households in City B that own at least one EV.
Plan: Two-sample zz-test for the difference between two population proportions. Check the conditions:
  • Randomization: the researcher took separate random samples of households from the two cities, so these are two independent random samples.
  • 10%: 280≤10%(180,000)=18,000280 \leq 10\%(180{,}000) = 18{,}000 and 340≤10%(240,000)=24,000340 \leq 10\%(240{,}000) = 24{,}000.
  • Normality: first find the combined proportion, then the four counts.
p^c=56+51280+340=107620≈0.1726\hat{p}_c = \frac{56 + 51}{280 + 340} = \frac{107}{620} \approx 0.1726280(0.1726)≈48.3,280(0.8274)≈231.7,340(0.1726)≈58.7,340(0.8274)≈281.3280(0.1726) \approx 48.3, \quad 280(0.8274) \approx 231.7, \quad 340(0.1726) \approx 58.7, \quad 340(0.8274) \approx 281.3
All four counts are at least 10. Every condition is met, so the test is appropriate.

Example 2: Reminder emails and dental cleanings (AP-style)

A dental clinic recruited 360 volunteers who were overdue for a cleaning and randomly assigned 240 of them to get a reminder email and the other 120 to get no reminder. Within 30 days, 108 patients in the email group and 36 in the no-reminder group booked a cleaning. The clinic wants to know whether reminder emails increase the proportion of patients who book a cleaning. State the hypotheses, define the parameters, identify the procedure, and check the conditions.
State: "Increase" gives a one-sided alternative, with email minus no reminder.
H0 ⁣:pE−pN=0Ha ⁣:pE−pN>0H_0\colon p_E - p_N = 0 \qquad H_a\colon p_E - p_N > 0
where pEp_E = the true proportion of patients like those in the study who would book a cleaning within 30 days if sent a reminder email, and pNp_N = the true proportion of patients like these who would book a cleaning within 30 days with no reminder.
Plan: Two-sample zz-test for the difference between two population proportions. Check the conditions:
  • Randomization: patients were randomly assigned to the email and no-reminder groups.
  • 10%: not needed, because this is a randomized experiment, not a sample from a population.
  • Normality: p^c=108+36240+120=144360=0.40\hat{p}_c = \frac{108 + 36}{240 + 120} = \frac{144}{360} = 0.40. The groups have different sizes, so check all four counts: 240(0.40)=96240(0.40) = 96, 240(0.60)=144240(0.60) = 144, 120(0.40)=48120(0.40) = 48, and 120(0.60)=72120(0.60) = 72, all at least 10.
Because the patients volunteered, any conclusion applies to patients like these. Because the reminders were randomly assigned, a significant result would support cause and effect.

Example 3: Fixing a weak setup

A student's setup for Example 2 reads:
Two-sample z-test. H0 ⁣:p^1=p^2H_0\colon \hat{p}_1 = \hat{p}_2, Ha ⁣:p^1>p^2H_a\colon \hat{p}_1 > \hat{p}_2. Conditions: random, n≥30n \geq 30, so the CLT applies.
Here's what would lose points, and the fix for each:
  • The name is incomplete. Write "two-sample zz-test for the difference between two population proportions."
  • The hypotheses use sample proportions (p^\hat{p}), and the parameters are never defined. Use pEp_E and pNp_N, defined in context.
  • "Random" by itself doesn't connect to the study. Say the patients were randomly assigned to the two groups.
  • n≥30n \geq 30 and the CLT aren't the condition for proportions. Show the four counts using p^c\hat{p}_c, each at least 10.

Common mistakes

  • Hypotheses about statistics: writing p^1\hat{p}_1 and p^2\hat{p}_2 in the hypotheses. Hypotheses are always about parameters.
  • Picking the direction after seeing the data: the alternative comes from the question, not from which sample proportion is bigger.
  • Parameters without context: "p1p_1 = proportion for group 1" is missing the population and the response.
  • Mismatched randomization: saying "random assignment" when the data came from random samples, or the other way around. Match the condition to the design, and skip the 10% condition for an experiment.
  • Wrong normality check: using n≥30n \geq 30, or counts that aren't checked against 10.
  • Flipping the order: if HaH_a is pE−pN>0p_E - p_N > 0, keep the email group first in every calculation.

AP® is a registered trademark of the College Board, which is not affiliated with Dove's Library and was not involved in the production of, and does not endorse, this website.

Providing free, high-quality AP notes to help students succeed, earn college credit, and reach their educational goals, ensuring everyone has access to the resources they need.

© 2026 Standard Learning Group, Inc., which operates Dove's Library. All rights reserved.