---
title: "Two samples. One difference. | FiveStudy"
description: "Two school districts keep job records for their seniors. In District A, 52% of 2,000 seniors hold a part-time job. In District B, 44% of 2,400 seniors do. A researcher who does not know those rates dr"
url: https://fivestudy.com/guides/apstats-3-9-sampling-distribution-of-phat-difference
---

[AP Statistics](https://fivestudy.com/ap-statistics) · Study guide

# Two samples. One difference.

[Figure: FiveStudy]

FiveStudy

AP® Statistics · Unit 3 · Inference for Categorical Data: Proportions

AP® Statistics · Unit 3 · Inference for Categorical Data: Proportions

# The Sampling Distribution of a *Difference* in Proportions

How the difference between two sample proportions varies from sample to sample: its mean, its standard deviation (variances add), the conditions for a normal model, and how to find and interpret probabilities about the difference.

1. Center and spread 2. Why variances add 3. Conditions 4. Probabilities

The idea in one paragraph

When you compare two groups, the statistic is a difference: \(\hat{p}_1 - \hat{p}_2\). Its sampling distribution is centered at the true difference \(p_1 - p_2\). Because both sample proportions vary independently, the difference varies more than either one: their variances add. With large enough samples, the shape is approximately normal.

## 1 Center and spread

For two independent populations with proportions \(p_1\) and \(p_2\), when the sampled values are independent, the sampling distribution of \(\hat{p}_1 - \hat{p}_2\) has

\[ \mu_{\hat{p}_1 - \hat{p}_2} = p_1 - p_2 \qquad \sigma_{\hat{p}_1 - \hat{p}_2} = \sqrt{\frac{p_1(1-p_1)}{n_1} + \frac{p_2(1-p_2)}{n_2}} \]

**Figure 1.** Each sample proportion varies on its own. Their difference inherits both sources of variation, so its standard deviation, 0.0605, is larger than either 0.0454 or 0.0400.

Worked Example 1 Mean and standard deviation of the difference

### Reading for fun

In District A, 55% of juniors read for fun every week; in District B, 40% do. Independent random samples of 120 juniors from A and 150 from B are taken. Find the mean and standard deviation of the sampling distribution of \(\hat{p}_1 - \hat{p}_2\).

1. 1Mean: \(\mu_{\hat{p}_1 - \hat{p}_2} = p_1 - p_2 = 0.55 - 0.40 = 0.15\).
2. 2Standard deviation: \(\sqrt{\dfrac{0.55(0.45)}{120} + \dfrac{0.40(0.60)}{150}} = \sqrt{0.0020625 + 0.0016} \approx 0.0605\).

**Answer:** In repeated pairs of samples, the difference in sample proportions (A − B) averages 0.15 and typically varies by about 0.061 from 0.15.

## 2 Why the variances add

**Figure 2.** For independent samples, the variances (squared standard deviations) add. Take the square root at the end. Adding the standard deviations directly overstates the spread.

Common Mistake 1 · Adding (or subtracting) the standard deviations

The standard deviation of a difference is not \(\sigma_1 + \sigma_2\), and certainly not \(\sigma_1 - \sigma_2\). Square each one, add, then take the square root. Subtracting the proportions does not mean subtracting the variability: two noisy numbers make a noisier difference.

## 3 Conditions

| Condition | Two samples | Experiment |
| --- | --- | --- |
| Randomization | Two independent random samples | Treatments randomly assigned |
| 10% condition | \(n_1 \le 0.10N_1\) and \(n_2 \le 0.10N_2\) | Not needed |
| Normality | \(n_1p_1,\ n_1(1-p_1),\ n_2p_2,\ n_2(1-p_2)\) all \(\ge 10\) | Same check, in each group |

Worked Example 2 Check the conditions

### Two districts

Each district has more than 5,000 juniors. Check the conditions for treating the sampling distribution of \(\hat{p}_1 - \hat{p}_2\) as approximately normal with the standard deviation above.

1. 1Randomization: two independent random samples, one from each district.
2. 210% condition: \(120 \le 0.10N_1\) and \(150 \le 0.10N_2\), since each district has more than 5,000 juniors (10% is over 500).
3. 3Normality: \(n_1p_1 = 66\), \(n_1(1-p_1) = 54\), \(n_2p_2 = 60\), \(n_2(1-p_2) = 90\), all at least 10.

**Answer:** All conditions are met: approximately normal, mean 0.15, standard deviation 0.0605.

Worked Example 3 Data from an experiment

### Which condition applies?

Researchers randomly assign 200 volunteers to try a new study app or not, and compare the proportions who finish a course. What does the randomization condition require here, and does the 10% condition apply?

1. 1With an experiment, the randomization condition means the treatments were randomly assigned to the experimental units.
2. 2There is no sampling from a larger population, so the 10% condition does not apply.
3. 3The normality condition still applies, with expected successes and failures in each group.

**Answer:** Random assignment satisfies the randomization condition; the 10% condition is not needed for experiments.

Common Mistake 2 · Checking normality with the combined sample

There are four counts to check, two for each group. A group of 15 with \(p = 0.10\) fails (1.5 expected successes) even if the other group is huge. Check every group separately.

Common Mistake 3 · Using one sample split into two groups as “independent samples”

The formula assumes the two samples are independent of each other. Measuring the same students twice (before and after) gives paired data, not two independent samples, and this standard deviation does not apply.

## 4 Probabilities about the difference

With the conditions met, use the normal model with mean \(p_1 - p_2\) and the standard deviation above. Interpret results in the context of the two specific populations.

**Figure 3.** Simulating 1,000 pairs of samples shows the shape: approximately normal, centered at 0.15. Only 3 of the 1,000 differences were 0 or less; the normal model predicts about 7 in 1,000. Either way, a difference of 0 or less is rare.

Worked Example 4 Find a probability

### Could B come out ahead?

Using the normal model, find the probability that the sample from District B has an equal or higher proportion of readers than the sample from District A.

1. 1“B equal or higher” means \(\hat{p}_1 - \hat{p}_2 \le 0\).
2. 2\(z = \dfrac{0 - 0.15}{0.0605} \approx -2.48\).
3. 3\(P(z \le -2.48) \approx 0.0066\).

**Answer:** About 0.0066. Even though B’s true rate is 15 points lower, a random pair of samples would show B equal or ahead only about 0.7% of the time.

Say it like this

“If 55% of District A juniors and 40% of District B juniors read for fun weekly, there is about a 0.0066 probability that random samples of 120 and 150 would show the B sample with an equal or higher proportion.”

### Quick reference

| Item | Formula |
| --- | --- |
| Mean | \(p_1 - p_2\) |
| Standard deviation | \(\sqrt{p_1(1-p_1)/n_1 + p_2(1-p_2)/n_2}\) |
| Shape | Approximately normal when all four expected counts are at least 10 |
| z-score | \(z = \dfrac{(\hat{p}_1 - \hat{p}_2) - (p_1 - p_2)}{\sigma_{\hat{p}_1 - \hat{p}_2}}\) |

FiveStudy AP® Statistics · The sampling distribution of a difference in proportions
