AP Statistics · Unit 3 · Topic 3.12

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

    Reviewed by P V Satish, Senior Faculty of Science and Academic Consultant · PG Life Sciences, PGD Biotechnology · 20+ years teaching NEET and AP · Special interest in biotechnology, biochemistry and the basics of physics
    Updated

    In short

    To compare two proportions, test H0:p1−p2=0H_0: p_1 - p_2 = 0 (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 p^c=x1+x2n1+n2\hat{p}_c = \frac{x_1 + x_2}{n_1 + n_2} 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.

    H0:pA−pB=0Ha:pA−pB>0H_0: p_A - p_B = 0 \qquad H_a: 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. 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:

    p^c=xA+xBnA+nB=84+60200+200=144400=0.36\hat{p}_c = \frac{x_A + x_B}{n_A + n_B} = \frac{84 + 60}{200 + 200} = \frac{144}{400} = 0.36

    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.

    1. Question 1 · SP 3 · Analyze Data

      Sample 1: 30 of 100 successes. Sample 2: 20 of 100. The pooled proportion is:

    2. 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?

    3. Question 3 · SP 1 · Formulate Questions

      A researcher asks whether the proportion of left-handers differs between boys and girls. The correct alternative is:

    4. Question 4 · SP 3 · Analyze Data

      Why does the two-proportion test use a pooled proportion?

    5. 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.

    1. (a) State the hypotheses, defining parameters.
    2. (b) Calculate the pooled proportion and check conditions.

    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.

    How this shows up on the exam42 multiple-choice questions and 4 free-response questions of 10 points. See what each one asks you to do.Full-length AP Statistics practice examsUnit 3 is one of 5 units on the exam. Two timed exams in the 2027 format (42 MCQ + 4 FRQ), with explanations, scoring guides and an estimated 1–5 score. $14.99 · try 5 questions free.

    Free Unit 3 cheat sheet

    Every topic in Unit 3: Inference for Categorical Data: Proportions on a few printable pages: the core idea, key terms, the two traps students fall into and what the exam asks.

    We'll use your email to tell you when new AP Statistics practice material is ready. No spam, and we'll delete it if you ask.

    Free Unit 3 practice test: 75 questions with explanations

    All topics in Unit 3: Inference for Categorical Data: Proportions

    1. 3.1 Estimators
    2. 3.2 Sampling Distributions for Sample Proportions
    3. 3.3 Constructing a Confidence Interval for a Population Proportion
    4. 3.4 Justifying a Claim Based on a Confidence Interval for a Population Proportion
    5. 3.5 Setting Up a Test for a Population Proportion
    6. 3.6 p-Values
    7. 3.7 Carrying Out a Test for a Population Proportion
    8. 3.8 Potential Errors When Performing Tests
    9. 3.9 Sampling Distributions for the Difference Between Sample Proportions
    10. 3.10 Constructing a Confidence Interval for the Difference Between Two Population Proportions
    11. 3.11 Justifying a Claim Based on a Confidence Interval for the Difference Between Two Population Proportions
    12. 3.12 Setting Up a Test for the Difference Between Two Population Proportions
    13. 3.13 Carrying Out a Test for the Difference Between Two Population Proportions
    14. 3.14 Setting Up a Chi-Square Test for Homogeneity or Independence
    15. 3.15 Carrying Out a Chi-Square Test for Homogeneity or Independence

    Other units in AP Statistics

    AP® is a trademark registered by College Board, which is not affiliated with, and does not endorse, this website.