Educerie

Educerie · AP · Statistics

AP Statistics 3.9

Sampling Distributions for the Difference Between Sample Proportions

How can we determine whether the difference between two groups is statistically significant?

What you will learn

  • Know that p-hat1 minus p-hat2 has mean p1 minus p2 and standard deviation the root of the two variance terms added
  • Understand the conditions for two independent random samples and the four large counts
  • Know that for a randomized experiment only random assignment and the counts are needed
  • Understand how to interpret the mean, standard deviation and a probability naming both populations

You must be able to

  1. Calculate the mean and standard deviation of the sampling distribution of a difference in sample proportions
  2. Verify the conditions for two independent samples
  3. State the conditions for a randomized experiment
  4. Calculate a probability about the difference using a normal model
  5. Interpret each result naming both populations
  6. Explain why the variances, not the standard deviations, add

In the exam. Section I multiple choice: find the mean or standard deviation of p^1−p^2\hat{p}_1 - \hat{p}_2, pick the right conditions for two samples or for an experiment, or find a probability about the difference. Section II: the conditions for two proportions come back in every two-proportion interval or test, and an experiment needs different conditions from two samples. Skills: calculate (3.D), interpret (4.D), verify conditions (4.E).

1Notation

Number the two populations (or two treatments) and keep the numbers consistent throughout.

Population 1Population 2
Population proportionp1p_1p2p_2
Sample sizen1n_1n2n_2
Sample proportionp^1\hat{p}_1p^2\hat{p}_2

The statistic of interest is p^1−p^2\hat{p}_1 - \hat{p}_2. The parameter is p1−p2p_1 - p_2. The order matters. If you swap the groups, the sign of every result flips.

2The mean and standard deviation

For two independent populations, and when the sampled values are independent, the sampling distribution of p^1−p^2\hat{p}_1 - \hat{p}_2 has

μp^1−p^2=p1−p2the center is the difference of the population proportions\mu_{\hat{p}_1 - \hat{p}_2} = p_1 - p_2 \qquad \textcolor{#838c91}{\text{the center is the difference of the population proportions}}σp^1−p^2=p1(1−p1)n1+p2(1−p2)n2both samples contribute spread\sigma_{\hat{p}_1 - \hat{p}_2} = \sqrt{\frac{p_1(1-p_1)}{n_1} + \frac{p_2(1-p_2)}{n_2}} \qquad \textcolor{#838c91}{\text{both samples contribute spread}}

These are on the formula sheet, under "two populations".

Look at the plus sign under the square root. The spread of a difference is bigger than the spread of either piece, because each sample adds its own variation. It is the variances that add: σp^1−p^22=σp^12+σp^22\sigma^2_{\hat{p}_1 - \hat{p}_2} = \sigma^2_{\hat{p}_1} + \sigma^2_{\hat{p}_2}. You do not add or subtract the standard deviations.

Example (invented). 62% of the students at School A walk or cycle to school (p1=0.62p_1 = 0.62). At School B it is 55% (p2=0.55p_2 = 0.55). A random sample of n1=120n_1 = 120 students is taken at School A, and an independent random sample of n2=150n_2 = 150 at School B.

μp^1−p^2=0.62−0.55=0.07\mu_{\hat{p}_1 - \hat{p}_2} = 0.62 - 0.55 = 0.07σp^1−p^2=0.62(0.38)120+0.55(0.45)150=0.001963+0.001650=0.0601\begin{aligned}\sigma_{\hat{p}_1 - \hat{p}_2} &= \sqrt{\frac{0.62(0.38)}{120} + \frac{0.55(0.45)}{150}} \\[6pt] &= \sqrt{0.001963 + 0.001650} \\[6pt] &= 0.0601\end{aligned}

So the sample difference is centered on the true difference of 0.07. It typically varies from 0.07 by about 0.06. A difference of 0.07 is small next to that spread. That is why one pair of samples can easily show the "wrong" school as higher.

3The conditions

The conditions depend on how the data were collected. There are two cases.

Case 1. Two independent random samples (sampling without replacement from two populations):

  1. Randomization. The data come from two independent random samples.
  2. 10% condition. Each sample is at most 10% of its own population: n1≤0.10N1n_1 \le 0.10N_1 and n2≤0.10N2n_2 \le 0.10N_2.
  3. Normality. Both samples are large enough. The expected number of successes and failures in each group are at least 10:
n1p1≥10,n1(1−p1)≥10,n2p2≥10,n2(1−p2)≥10n_1 p_1 \ge 10, \quad n_1(1-p_1) \ge 10, \quad n_2 p_2 \ge 10, \quad n_2(1-p_2) \ge 10

(When the proportions are unknown, the topics that follow use the observed counts, n1p^1n_1\hat{p}_1 and so on.)

Case 2. A randomized experiment. The data only need randomization: the treatments must be randomly assigned to the experimental units. The 10% condition is unnecessary, because there is no sampling from a population. The normality check still applies.

Check the example (Case 1). Suppose Schools A and B each have over 1,200 and 1,500 students. The two random samples are independent. Both are less than 10% of their schools. The counts are

  • n1p1=120(0.62)=74.4n_1 p_1 = 120(0.62) = 74.4 and n1(1−p1)=120(0.38)=45.6n_1(1-p_1) = 120(0.38) = 45.6
  • n2p2=150(0.55)=82.5n_2 p_2 = 150(0.55) = 82.5 and n2(1−p2)=150(0.45)=67.5n_2(1-p_2) = 150(0.45) = 67.5

All four are at least 10, so a normal model is appropriate.

Independence between the groups matters. Samples from the same people in two years, or from the same households, are not independent. Then a two-proportion procedure does not apply.

4The shape and a probability

When the conditions hold, the sampling distribution of p^1−p^2\hat{p}_1 - \hat{p}_2 is approximately normal.

Figure 1. The sampling distribution of the difference between two sample proportions, with p1 = 0.62, p2 = 0.55, n1 = 120 and n2 = 150: approximately normal, mean 0.07 and standard deviation 0.0601. The shaded area to the left of 0 is the probability that the second sample proportion is the larger, about 0.12 −0.1 0 0.1 0.2 0.3 difference in sample proportions mean 0.07 0.122
Figure 1 · The sampling distribution of the difference between two sample proportions: mean 0.07, standard deviation 0.0601, with the area below 0 shaded

In Figure 1 the curve is centered on 0.07. The shaded area to the left of 0 is the chance that the sample from School B shows the higher proportion, although School A really is higher.

z=0−0.070.0601=−1.160 is 1.16 standard deviations below the meanz = \frac{0 - 0.07}{0.0601} = -1.16 \qquad \textcolor{#838c91}{\text{0 is 1.16 standard deviations below the mean}}P(p^1−p^2<0)=P(z<−1.16)=0.123Table A; technology gives 0.122 from unrounded valuesP(\hat{p}_1 - \hat{p}_2 < 0) = P(z < -1.16) = 0.123 \qquad \textcolor{#838c91}{\text{Table A; technology gives 0.122 from unrounded values}}

About 12% of such pairs of samples would put School B ahead. Sample differences can mislead when the samples are this size.

A second probability: the chance that the sample difference is at least 0.15.

z=0.15−0.070.0601=1.33z = \frac{0.15 - 0.07}{0.0601} = 1.33P(p^1−p^2≥0.15)=P(z≥1.33)=0.092P(\hat{p}_1 - \hat{p}_2 \ge 0.15) = P(z \ge 1.33) = 0.092

5Interpreting in context

Name both populations and both proportions.

  • The mean, 0.07. "If we took many pairs of random samples, 120 students from School A and 150 from School B, the differences in the sample proportions who walk or cycle (A minus B) would average about 0.07, the difference between the two schools' proportions."
  • The standard deviation, 0.0601. "The difference between the sample proportions of students who walk or cycle (A minus B) typically varies from 0.07 by about 0.06."
  • The probability, 0.123. "About 12% of pairs of random samples of these sizes would give a lower sample proportion at School A than at School B."

6The effect of the sample sizes

The standard deviation shrinks when either nn grows, and shrinks most when both do. For equal sizes nn, with the same proportions as before, the standard deviation is

σ=0.62(0.38)+0.55(0.45)n=0.4831nwith n = 120 each: 0.0634\sigma = \sqrt{\frac{0.62(0.38) + 0.55(0.45)}{n}} = \sqrt{\frac{0.4831}{n}} \qquad \textcolor{#838c91}{\text{with n = 120 each: 0.0634}}

Quadrupling both sample sizes halves the standard deviation. The same n\sqrt{n} effect applies.

Practice questions

30 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.