AP Statistics · Unit 3 · Topic 3.13

    3.13 Carrying Out 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

    The test statistic is z=(p^1−p^2)−0p^c(1−p^c)(1n1+1n2)z = \dfrac{(\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)}}, 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

    z=(p^1−p^2)−0p^c(1−p^c)(1n1+1n2)z = \frac{(\hat{p}_1 - \hat{p}_2) - 0}{\sqrt{\hat{p}_c(1-\hat{p}_c)\left(\dfrac{1}{n_1} + \dfrac{1}{n_2}\right)}}

    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.

    z=0.42−0.300.36(0.64)(1200+1200)=0.120.048=2.50p-value=P(Z≥2.50)≈0.0062z = \frac{0.42 - 0.30}{\sqrt{0.36(0.64)\left(\dfrac{1}{200} + \dfrac{1}{200}\right)}} = \frac{0.12}{0.048} = 2.50 \qquad \text{p-value} = P(Z \geq 2.50) \approx 0.0062

    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.

    1. 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:

    2. Question 2 · SP 4 · Interpret Results

      For z = 1.63 and Hₐ: p₁ − p₂ > 0, at α = 0.05 we should:

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

    4. Question 4 · SP 3 · Analyze Data

      Which part of the two-proportion z-statistic depends on assuming H₀ is true?

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

    1. (a) State hypotheses and check conditions.
    2. (b) Calculate z and the p-value.
    3. (c) Conclude in context, including scope.

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

    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.