AP Statistics · Topic 3.13 · Unit 3

AP Stats 3.13: Carrying Out a Two-Prop Test

By Jude Wallis · Published

The two-sample z-statistic for a difference in proportions is (p-hat-1 minus p-hat-2) divided by the pooled standard error sqrt(p-hat-c(1-p-hat-c)(1/n1 + 1/n2)). Find the p-value from the standard normal distribution, then compare it to alpha.

AP Statistics: Unit 3 (topics 3.13). CED topic 3.13 (Carrying Out a Test for the Difference Between Two Population Proportions), skills 3.E, 4.F, 4.G.

What topic 3.13 covers

Topic 3.13 completes the two-proportion test set up in topic 3.12. You calculate the test statistic with the pooled proportion, find the p-value from the standard normal distribution, and state a conclusion in context. The general form remains statisticparameterstandard error\dfrac{\text{statistic} - \text{parameter}}{\text{standard error}}, where the parameter difference under the null is 0. The observed difference p^1p^2\hat{p}_1 - \hat{p}_2 sits in the numerator, and the pooled standard error sits in the denominator.

The test statistic

The two-sample z-statistic is

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

where p^c=x1+x2n1+n2\hat{p}_c = \dfrac{x_1 + x_2}{n_1 + n_2} is the combined proportion of successes from topic 3.12. The denominator is the pooled standard error, built under the assumption that the two proportions are equal. When the null is true, this zz follows a standard normal distribution, so the same z-table and technology from the one-proportion test apply here.

p-value and conclusion

Find the p-value from the standard normal distribution using the direction of HaH_a: one tail for a one-sided alternative, both tails for a two-sided one. Compare it to the significance level α\alpha. If the p-value is at most α\alpha, reject H0H_0 and conclude there is convincing evidence of a difference; if it is larger, fail to reject. State the conclusion in context with non-definitive language, referencing the parameters and the two populations.

Test and interval should agree

For a two-sided test at level α\alpha, the decision usually matches the corresponding confidence interval from topic 3.10 at confidence level 1α1 - \alpha. When the interval excludes 0, the two-sided test at that level rejects the null, and when the interval contains 0, the test fails to reject. The agreement is not always exact for proportions, because the test pools the standard error while the interval does not, but the two methods tell a consistent story.

Reporting both the test decision and the interval gives a fuller answer than either alone. When your test and interval seem to disagree, recheck the pooled standard error first, since using the unpooled version by mistake is the usual cause. Confirm as well that the confidence level and significance level are matched, for example a 95% interval against a test at the 0.05 level.

Two-sample z-test for a difference in proportions

Group 1 has 48 successes in 200 trials; group 2 has 30 successes in 150 trials. Test H0 ⁣:p1=p2H_0\colon p_1 = p_2 against Ha ⁣:p1p2H_a\colon p_1 \ne p_2 at α=0.05\alpha = 0.05.

  1. Sample proportions: p^1=48200=0.24\hat{p}_1 = \dfrac{48}{200} = 0.24 and p^2=30150=0.20\hat{p}_2 = \dfrac{30}{150} = 0.20; difference 0.240.20=0.040.24 - 0.20 = 0.04.

  2. Pooled proportion: p^c=783500.22286\hat{p}_c = \dfrac{78}{350} \approx 0.22286.

  3. Pooled standard error: 0.22286×0.77714×(1200+1150)=0.17319×0.011667=0.00202060.04495\sqrt{0.22286 \times 0.77714 \times \left(\dfrac{1}{200} + \dfrac{1}{150}\right)} = \sqrt{0.17319 \times 0.011667} = \sqrt{0.0020206} \approx 0.04495.

  4. Test statistic: z=0.040.044950.89z = \dfrac{0.04}{0.04495} \approx 0.89.

  5. p-value (two-sided): 2×P(Z0.89)=2×(10.8133)=2×0.1867=0.37342 \times P(Z \ge 0.89) = 2 \times (1 - 0.8133) = 2 \times 0.1867 = 0.3734.

  6. Compare: 0.3734>0.050.3734 > 0.05.

Because the p-value 0.373 is greater than 0.05, fail to reject H0H_0. There is not convincing evidence that the two population proportions differ.

Frequently asked questions

Which p-hat goes in the standard error, the pooled one or each group's?

For the test statistic, use the pooled proportion p^c\hat{p}_c in the standard error, because the null assumes the two proportions are equal. The individual p^1\hat{p}_1 and p^2\hat{p}_2 appear only in the numerator as the observed difference.