AP Statistics · Topic 4.6 · Reading guide, about 5 min

Spread and shape of x-bar1 minus x-bar2

Find the mean, standard deviation and shape of the sampling distribution of a difference of two sample means.

In one minute

To compare two groups, you compute two sample means and subtract them. That difference, xˉ1−xˉ2\bar{x}_1 - \bar{x}_2, changes from sample to sample, and it has its own sampling distribution. Its center, spread and shape are the foundation for two-sample t-intervals and tests.

The big idea: the difference of sample means is centered at the true difference μ1−μ2\mu_1 - \mu_2, and the variability of the two sample means adds, so the difference is more variable than either sample mean alone.

Key terms

Difference of sample means
The statistic xˉ1−xˉ2\bar{x}_1 - \bar{x}_2 computed from two independent groups.
Mean of xˉ1−xˉ2\bar{x}_1 - \bar{x}_2
Equal to μ1−μ2\mu_1 - \mu_2, the true difference between the population means.
Standard deviation of xˉ1−xˉ2\bar{x}_1 - \bar{x}_2
Equal to σ12n1+σ22n2\sqrt{\dfrac{\sigma_1^2}{n_1} + \dfrac{\sigma_2^2}{n_2}} when the two samples are independent.
Independent samples
Two samples where the individuals in one group have no connection to the individuals in the other, such as two separate random samples.
Random assignment
Using chance to place experimental units into treatment groups. It gives comparable groups and supports the same variance formula.
10% condition
Each sample, taken without replacement, should be less than 10% of its own population.
Central limit theorem
With large samples, each sample mean is approximately normal, so their difference is approximately normal.
Normal probability
An area under a normal curve found from a z-score, here using μ1−μ2\mu_1 - \mu_2 and the standard deviation above.

Center and spread

Suppose you take a random sample of size n1n_1 from a population with mean μ1\mu_1 and standard deviation σ1\sigma_1, and independently a random sample of size n2n_2 from a population with mean μ2\mu_2 and standard deviation σ2\sigma_2. The sampling distribution of xˉ1−xˉ2\bar{x}_1 - \bar{x}_2 has mean μ1−μ2\mu_1 - \mu_2. Sample means are not biased, so their difference is not biased.

The standard deviation is σ12n1+σ22n2\sqrt{\dfrac{\sigma_1^2}{n_1} + \dfrac{\sigma_2^2}{n_2}}. Two things to notice. First, variances add, not standard deviations, so you add σ12/n1\sigma_1^2/n_1 and σ22/n2\sigma_2^2/n_2 and then take the square root. Second, the variances add even though you are subtracting the means. Subtracting two noisy quantities does not cancel the noise; it combines it. Each group's variance of the mean is σ2/n\sigma^2/n, the same idea as in 4.1.

Conditions

These conditions make the formulas valid.

Independence between groups: the two samples are independent random samples, or the groups come from random assignment in an experiment. Paired data break this and need the paired method.

Independence within each sample: a random sample from each population, and if sampling without replacement, each sample is less than 10% of its population. For a randomized experiment the 10% condition is not needed.

Shape: if both populations are normal, the difference is exactly normal. If n1≥30n_1 \ge 30 and n2≥30n_2 \ge 30, the difference is approximately normal by the central limit theorem. With smaller samples from non-normal populations, the normal model is not justified, and extreme skew calls for larger samples.

Sampling distribution of xˉ1−xˉ2\bar{x}_1 - \bar{x}_2 at a glance
FeatureValue
Centerμ1−μ2\mu_1 - \mu_2
Standard deviationσ12/n1+σ22/n2\sqrt{\sigma_1^2/n_1 + \sigma_2^2/n_2}
ShapeNormal if both populations are normal; approximately normal if both samples have at least 30 observations
Required independenceTwo independent random samples (or random assignment) and less than 10% of each population when sampling without replacement

Worked example: a normal probability for a difference

Suppose (invented values) the mean score on a driving-knowledge test is μ1=70\mu_1 = 70 with σ1=8\sigma_1 = 8 for students who took a class, and μ2=66\mu_2 = 66 with σ2=10\sigma_2 = 10 for students who learned on their own. A researcher takes independent random samples of n1=40n_1 = 40 class students and n2=50n_2 = 50 self-taught students, each far less than 10% of its population. Find the probability that the class sample mean exceeds the self-taught sample mean.

Conditions: independent random samples, each under 10% of its group, and both n1=40n_1 = 40 and n2=50n_2 = 50 are at least 30, so xˉ1−xˉ2\bar{x}_1 - \bar{x}_2 is approximately normal.

Center: μ1−μ2=70−66=4\mu_1 - \mu_2 = 70 - 66 = 4.

Spread: 8240+10250=1.6+2.0=3.6≈1.8974\sqrt{\dfrac{8^2}{40} + \dfrac{10^2}{50}} = \sqrt{1.6 + 2.0} = \sqrt{3.6} \approx 1.8974.

We want P(xˉ1−xˉ2>0)P(\bar{x}_1 - \bar{x}_2 > 0). Standardize: z=0−41.8974≈−2.108z = \dfrac{0 - 4}{1.8974} \approx -2.108. Then P(Z>−2.108)≈0.9825P(Z > -2.108) \approx 0.9825.

Conclusion in context: if the true means are 70 and 66, there is about a 98% chance that the sample mean for class students will be higher than the sample mean for self-taught students. The difference in sample means will usually be positive, but it will not always be, because it varies by about 1.9 points from sample to sample.

How it connects

  • Back to 4.1: each sample mean has spread σ/n\sigma/\sqrt{n}; here the two squared spreads are added.
  • Forward to 4.7 and 4.8: replacing each σ\sigma with s gives the standard error used in two-sample t-intervals.
  • Forward to 4.9 and 4.10: that same standard error (the formula above with each σ\sigma replaced by s) is the denominator of the two-sample t-statistic.

Common mistakes

  • Subtracting the standard deviations. The spread of a difference is larger than either part alone. Add the variances and then take the square root.
  • Adding the standard deviations without squaring. σ1/n1+σ2/n2\sigma_1/\sqrt{n_1} + \sigma_2/\sqrt{n_2} is not correct; use σ12/n1+σ22/n2\sqrt{\sigma_1^2/n_1 + \sigma_2^2/n_2}.
  • Using this for paired data. If each value in group 1 is linked to one in group 2, the groups are not independent and the formula does not apply.
  • Checking only one sample size. Each group needs its own check: either that sample size is at least 30 or that population is approximately normal. One large sample does not cover a small sample from a skewed population.

How it shows up on the exam

  • A scenario with two populations, sample sizes and standard deviations asking for a probability about xˉ1−xˉ2\bar{x}_1 - \bar{x}_2, with conditions checked first.
  • A short explanation of why the difference of means has a larger variance than either mean, or what the center represents.
  • A question about which design (independent samples or randomized experiment) makes the independence condition reasonable.

Check yourself

  1. If σ1=8\sigma_1 = 8, σ2=10\sigma_2 = 10 and both n are 25, what is the spread of xˉ1−xˉ2\bar{x}_1 - \bar{x}_2?
  2. Why does the variance of a difference equal the sum of the variances, even though you subtract?
  3. What would you want to know about the two populations if n1=12n_1 = 12 and n2=15n_2 = 15?
  4. What does μ1−μ2=4\mu_1 - \mu_2 = 4 mean as the center of the distribution?

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