6m left·0%
Reading Time: 6 min
Last Updated: September 7, 2026
Main Ideas: 4
Reading Time: 6 min
Last Updated: September 7, 2026
Main Ideas: 4

Topic 3.13 Notes – Carrying Out a Test for the Difference Between Two Population Proportions

Verified for 2027 AP® Statistics Exam
Read aloud
A two-sample z-test for proportions checks whether two groups seem to have different population success rates based on sample data. In this topic, the whole idea is comparing an observed sample difference to the null claim of no difference, then turning that into a z-statistic, a p-value, and a conclusion in context.

What a Two-Sample z-Test for Proportions Does

This test is for a binary categorical variable, where each person or item is a success or failure, measured in two independent groups.

  • p1p_1 and p2p_2 are the true population proportions for group 1 and group 2.
    • Example: p1p_1 could be the true proportion of teens at School A who have a driver’s license.
    • p2p_2 could be the true proportion at School B.

The sample proportions are

p^1=x1n1p^2=x2n2 \hat p_1=\frac{x_1}{n_1} \qquad \hat p_2=\frac{x_2}{n_2}

where x1,x2x_1, x_2 are successes and n1,n2n_1, n_2 are sample sizes.

For this AP Stats test, the null always says no difference:

H0:p1=p2orH0:p1−p2=0 H_0:p_1=p_2 \qquad \text{or} \qquad H_0:p_1-p_2=0

Possible alternatives are

  • Ha:p1>p2H_a:p_1>p_2
  • Ha:p1<p2H_a:p_1<p_2
  • Ha:p1≠p2H_a:p_1\ne p_2

You compare the observed difference p^1−p^2\hat p_1-\hat p_2 to the null difference of 0. The order matters the whole way through. If you write group 1 minus group 2 in the hypotheses, you must keep that same order in the calculation and conclusion.

The two groups should be independent. A randomized experiment, like the one shown here, is a common setup where that happens.

Study guide illustration

Random assignment to treatment and control groups

This is not for matched pairs or paired data. If the same person is measured twice, or subjects are paired up, this procedure does not fit.

Conditions and Why the Test Pools

Under H0H_0, the test assumes the two population proportions are equal. That means both samples are estimating one common proportion, so we pool them:

p^c=x1+x2n1+n2=n1p^1+n2p^2n1+n2 \hat p_c=\frac{x_1+x_2}{n_1+n_2} =\frac{n_1\hat p_1+n_2\hat p_2}{n_1+n_2}

Pooling matters because the test’s standard error is built from the null claim that the proportions are the same.

  • It is used only for the hypothesis test standard error
  • It is not usually (p^1+p^2)/2(\hat p_1+\hat p_2)/2, unless the sample sizes are equal
  • It is different from a confidence interval, which uses an unpooled standard error

Conditions for the z-test:

  • Randomization
    • Two independent random samples, or two groups from a randomized experiment
  • Independence
    • The groups must be independent
    • If sampling without replacement, each sample must satisfy the 10% condition
  • Large expected counts
    • n1p^c≥10n_1\hat p_c\ge10, n1(1−p^c)≥10n_1(1-\hat p_c)\ge10
    • n2p^c≥10n_2\hat p_c\ge10, n2(1−p^c)≥10n_2(1-\hat p_c)\ge10

A very common mistake is checking counts with p^1\hat p_1 and p^2\hat p_2. For this test, use the pooled proportion.

Carrying Out the Test

Here’s the calculation path:

  1. Find p^1\hat p_1 and p^2\hat p_2
  2. Find p^c\hat p_c
  3. Compute the null standard error

SE0=p^c(1−p^c)(1n1+1n2) SE_0=\sqrt{\hat p_c(1-\hat p_c)\left(\frac1{n_1}+\frac1{n_2}\right)}

  1. Compute the test statistic

z=(p^1−p^2)−0SE0 z=\frac{(\hat p_1-\hat p_2)-0}{SE_0}

  1. Use the standard normal distribution for the p-value
  • Right-tailed: P(Z≥zobs)P(Z\ge z_{\text{obs}})
  • Left-tailed: P(Z≤zobs)P(Z\le z_{\text{obs}})
  • Two-sided: 2P(Z≥∣zobs∣)2P(Z\ge |z_{\text{obs}}|)

If zz is positive, then p^1>p^2\hat p_1>\hat p_2. If zz is negative, then p^1<p^2\hat p_1<\hat p_2.

The picture below is a good reminder that the tail comes from the alternative hypothesis, not from whether your sample difference ended up positive or negative.

Right-tailed, left-tailed, and two-tailed p-values on a z-curve

Quick example. Suppose group 1 has 48 successes out of 80, and group 2 has 36 out of 90.

  • p^1=48/80=0.60\hat p_1=48/80=0.60
  • p^2=36/90=0.40\hat p_2=36/90=0.40
  • p^c=(48+36)/(80+90)=84/170≈0.494\hat p_c=(48+36)/(80+90)=84/170\approx0.494

Then use p^c\hat p_c in SE0SE_0, then in zz. On technology, this is 2-PropZTest with x1,n1,x2,n2x_1,n_1,x_2,n_2, plus the correct alternative.

Interpreting the p-Value and Writing the Conclusion

The p-value is the probability, assuming H0H_0 is true, of getting a sample difference or z-statistic at least as extreme as the one observed, in the direction of HaH_a.

Decision rule:

  • If p-value ≤α\le \alpha, reject H0H_0
  • If p-value >α> \alpha, fail to reject H0H_0

A strong AP-style conclusion sounds like this:

Because the p-value is less than 0.05, we reject H0H_0. There is convincing evidence that the true proportion of ___ in group 1 is greater than the true proportion of ___ in group 2.

Keep these out of your answer:

  • “accept H0H_0”
  • “the p-value is the probability that H0H_0 is true”
  • “proved”
  • causal claims unless it was a randomized experiment

Key Takeaways

For a two-sample z-test for proportions, the null is H0:p1−p2=0H_0:p_1-p_2=0, so the observed difference is always compared to 0.
The order of subtraction must stay the same in hypotheses, z-calculation, and conclusion.
This test is only for two independent groups with a binary response.
The pooled proportion p^c\hat p_c is used for the test because the null assumes p1=p2p_1=p_2.
Large counts for this test are checked with p^c\hat p_c, not with p^1\hat p_1 and p^2\hat p_2.
The sign of zz tells you which sample proportion is larger, but the tail comes from the alternative you wrote before seeing data.
Failing to reject H0H_0 means there is not convincing evidence of a difference, not that the proportions are equal.
Your final sentence must name the actual variable and groups, not just say “the populations.”

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

Notes

1 credit used · 5/5 remaining