Mathwords logoMathwords

Sample Mean Difference — Definition, Formula & Example

The sample mean difference is the gap xˉ1−xˉ2\bar{x}_1 - \bar{x}_2 between the averages of two independent samples. The difference between population means is one fixed, usually unknown number. The sample mean difference is different: it changes every time you draw new samples.

For independent random samples of sizes n1n_1 and n2n_2 from populations with means μ1,μ2\mu_1, \mu_2 and standard deviations σ1,σ2\sigma_1, \sigma_2, the statistic xˉ1−xˉ2\bar{x}_1 - \bar{x}_2 is a random variable. Its sampling distribution has mean μ1−μ2\mu_1 - \mu_2, so it is an unbiased estimator of that parameter. Its standard deviation is σ12/n1+σ22/n2\sqrt{\sigma_1^2/n_1 + \sigma_2^2/n_2}, which assumes the two samples are independent. Each sample should also be at most 10% of its population when sampling without replacement. The distribution is exactly normal when both populations are normal. Otherwise, it is approximately normal by the Central Limit Theorem as long as each sample from a non-normal population is large (AP Statistics uses n≥30n \ge 30).

Key Formula

μxˉ1−xˉ2=μ1−μ2,σxˉ1−xˉ2=σ12n1+σ22n2\mu_{\bar{x}_1-\bar{x}_2} = \mu_1-\mu_2, \qquad \sigma_{\bar{x}_1-\bar{x}_2} = \sqrt{\frac{\sigma_1^2}{n_1}+\frac{\sigma_2^2}{n_2}}
Where:
  • xˉ1,xˉ2\bar{x}_1, \bar{x}_2 = Means of sample 1 and sample 2
  • μ1,μ2\mu_1, \mu_2 = Means of population 1 and population 2
  • σ1,σ2\sigma_1, \sigma_2 = Standard deviations of population 1 and population 2
  • n1,n2n_1, n_2 = Sizes of the two independent samples

Worked Example

Problem: Machine A fills snack bags with weights that are normally distributed with mean 16.2 oz and standard deviation 0.4 oz. Machine B's fill weights are normally distributed with mean 16.0 oz and standard deviation 0.3 oz. An inspector takes 32 random bags from A and 18 random bags from B. What is the probability that the sample from A has a lower mean weight than the sample from B? That event is xˉA−xˉB<0\bar{x}_A - \bar{x}_B < 0.
Step 1: Find the center of the sampling distribution of xˉA−xˉB\bar{x}_A - \bar{x}_B.
μxˉA−xˉB=16.2−16.0=0.2 oz\mu_{\bar{x}_A-\bar{x}_B} = 16.2 - 16.0 = 0.2 \text{ oz}
Step 2: Find its standard deviation. Both populations are normal, so this distribution is exactly normal, even though one sample has only 18 bags.
σ=0.4232+0.3218=0.005+0.005=0.01=0.1 oz\sigma = \sqrt{\frac{0.4^2}{32}+\frac{0.3^2}{18}} = \sqrt{0.005+0.005} = \sqrt{0.01} = 0.1 \text{ oz}
Step 3: Standardize the cutoff of 0 and use the standard normal table.
z=0−0.20.1=−2,P(Z<−2)≈0.0228z = \frac{0 - 0.2}{0.1} = -2, \qquad P(Z < -2) \approx 0.0228
Answer: The probability is about 0.0228. So in only about 2.3% of such inspections would the sample from Machine A average less than the sample from Machine B.

Why It Matters

The two-sample t procedures for comparing two means in AP Statistics, both confidence intervals and significance tests, are built on the sampling distribution of xˉ1−xˉ2\bar{x}_1 - \bar{x}_2. Companies running A/B tests use the same idea to judge whether a gap between two groups is larger than random sampling would produce.

Common Mistakes

Mistake: Using the two-sample formula on paired data, such as the same students' scores before and after a course.
Correction: The formula σ12/n1+σ22/n2\sqrt{\sigma_1^2/n_1+\sigma_2^2/n_2} requires independent samples. For paired data, first compute each pair's difference. Then treat those differences as a single sample and use the mean difference xˉd\bar{x}_d with standard deviation σd/n\sigma_d/\sqrt{n}.

Related Terms