AP Statistics · Topic 3.9 · Reading guide, about 4 min

Spread and shape of p-hat1 minus p-hat2

Learn how the gap between two sample proportions behaves from sample to sample: its mean, spread, shape and conditions.

In one minute

Comparing two groups starts with a statistic: the difference p^1−p^2\hat{p}_1-\hat{p}_2. Like every statistic it varies from sample to sample, so we need its sampling distribution before we can build intervals or tests.

This topic gives the mean, standard deviation and shape of that distribution, the conditions that make it work, and how to use it to find probabilities.

Key terms

Difference of proportions
The statistic p^1−p^2\hat{p}_1-\hat{p}_2, which estimates the parameter p1−p2p_1-p_2 for two groups.
Independent samples
Samples where who ends up in one group tells you nothing about who is in the other, as with two separate random samples.
Mean of the difference
The center of the sampling distribution, equal to p1−p2p_1-p_2. The statistic has no bias as an estimate.
Standard deviation of the difference
p1(1−p1)n1+p2(1−p2)n2\sqrt{\dfrac{p_1(1-p_1)}{n_1}+\dfrac{p_2(1-p_2)}{n_2}}, a measure of how much the difference typically varies.
Variance
The square of a standard deviation. For independent statistics, variances add when you take a difference.
10% condition
When sampling without replacement, each sample should be less than 10% of its population so draws behave as independent.
Large counts
The four values n1p1n_1p_1, n1(1−p1)n_1(1-p_1), n2p2n_2p_2 and n2(1−p2)n_2(1-p_2) should each be at least 10 for an approximately normal shape.
Randomized experiment
A study where subjects are randomly assigned to two treatments. Random assignment can replace the two random samples.

The center of the distribution

Imagine drawing a random sample of n1n_1 from population 1 and an independent random sample of n2n_2 from population 2, computing p^1−p^2\hat{p}_1-\hat{p}_2, and repeating forever. The mean of the sampling distribution of p^1\hat{p}_1 is p1p_1 and the mean of p^2\hat{p}_2 is p2p_2, so the mean of their difference is p1−p2p_1-p_2.

Order matters. If you flip the subtraction to p^2−p^1\hat{p}_2-\hat{p}_1, the center becomes p2−p1p_2-p_1, the opposite sign. State which group is first before doing anything else.

The spread: variances add

Each sample proportion has standard deviation p(1−p)/n\sqrt{p(1-p)/n} from 3.2. When the two statistics are independent, the variance of the difference is the sum of the two variances, even though we subtract the statistics. Subtracting does not cancel uncertainty, because each statistic adds its own noise.

So the standard deviation of p^1−p^2\hat{p}_1-\hat{p}_2 is p1(1−p1)n1+p2(1−p2)n2\sqrt{\dfrac{p_1(1-p_1)}{n_1}+\dfrac{p_2(1-p_2)}{n_2}}. The tempting wrong move is to add the two standard deviations, or to subtract them. Standard deviations do not add; the square root comes after summing the variances.

This standard deviation is smaller when either sample size grows, which is why bigger studies compare groups more precisely.

Summary of the sampling distribution of the difference
FeatureValueCondition or note
Meanp1 - p2Independent samples; order of subtraction fixes the sign
Standard deviationsqrt( p1(1-p1)/n1 + p2(1-p2)/n2 )Add variances, then take the square root
ShapeApproximately normaln1p1, n1(1-p1), n2p2, n2(1-p2) all at least 10
IndependenceRandom samples or random assignment10% condition for each sample, not needed in a randomized experiment

Conditions in context

Three ideas support the model. First, the groups must come from independent random samples, or from a randomized experiment with two treatment groups. Second, when sampling without replacement, check that each sample is under 10% of its population. Experiments do not need that check. Third, the four large-counts values must each be at least 10.

Name each condition and verify it using the numbers in the problem. Writing "conditions met" with nothing else earns little. In this topic you use the population values p1p_1 and p2p_2 because the question tells you what they are.

Worked example

Suppose 60% of seniors at one school and 50% of seniors at another school own a bike. Samples of n1=80n_1=80 and n2=100n_2=100 seniors are chosen independently at random (invented numbers, with each sample well under 10% of its school). What is the probability that p^1−p^2<0\hat{p}_1-\hat{p}_2<0, so the sample misleads us into thinking school 2 has more bike owners?

Check large counts: 80(0.60)=4880(0.60)=48, 80(0.40)=3280(0.40)=32, 100(0.50)=50100(0.50)=50 and 100(0.50)=50100(0.50)=50, all at least 10, so the shape is approximately normal.

The mean is p1−p2=0.60−0.50=0.10p_1-p_2=0.60-0.50=0.10. The variances are 0.60(0.40)/80=0.00300.60(0.40)/80=0.0030 and 0.50(0.50)/100=0.00250.50(0.50)/100=0.0025, which sum to 0.00550.0055, so the standard deviation is 0.0055=0.07416\sqrt{0.0055}=0.07416 (rounded).

Now standardize: z=(0−0.10)/0.07416=−1.3484z=(0-0.10)/0.07416=-1.3484. Using the standard normal distribution, P(z<−1.3484z<-1.3484) is about 0.0888. In context, about 8.9% of the time, independent samples of these sizes would show school 2 with the higher sample proportion even though school 1 truly has the higher proportion.

How it connects

  • Back to 3.2: each sample proportion has mean pp and standard deviation p(1−p)/n\sqrt{p(1-p)/n}; this topic combines two of them.
  • Back to 2.11: the normal probability step uses the same z-score and standard normal table.
  • Forward to 3.10: replacing p1p_1 and p2p_2 with sample values gives the standard error for an interval.
  • Forward to 4.6: the same variances-add idea returns for the difference of two sample means.

Common mistakes

  • Adding standard deviations. Add the variances under one square root. Adding the two standard deviations gives a value that is too large.
  • Subtracting variances because you subtract proportions. The difference of independent statistics has the sum of the variances.
  • Checking conditions with only one group. Each group needs its own 10% check and its own four large counts.
  • Losing the sign. The mean p1−p2p_1-p_2 is negative if group 2 has the larger proportion.

How it shows up on the exam

  • A scenario gives two population proportions and sample sizes and asks for a normal probability about the difference, with conditions.
  • A short written prompt asks you to describe the center, spread and shape in context.
  • A multiple-choice item asks for the standard deviation of the difference or which condition fails.

Check yourself

  1. Why is the standard deviation of the difference larger than either individual standard deviation?
  2. What changes about the mean and the z-score if you reverse the order of subtraction?
  3. Which of the four large-counts values would be the first to fail if one group were very small and its proportion near 0?

Practice this topic. AP Practice questions on exactly what this lesson covers, with an explanation for every answer.