Difference of Means

When researchers want to compare two groups — for example, the average test scores of students taught by two different methods — they rarely have access to the entire population. Instead, they draw random samples from each group and compute the sample means. The key question becomes: how much do we expect those two sample means to differ just by chance, even if the underlying populations are identical? This is precisely what the sampling distribution of the difference of means answers. The sampling distribution of the difference of means is the probability distribution of the statistic X̄₁ − X̄₂, formed by repeatedly drawing independent random samples of sizes n₁ and n₂ from two populations and computing the difference of the resulting sample means. Just like a single sample mean has its own sampling distribution, this difference has a predictable center, spread, and shape that we can calculate using the properties of the two populations. Understanding this distribution is essential for two-sample hypothesis tests and confidence intervals — tools used everywhere from medical trials to educational research. The Central Limit Theorem guarantees that, under broad conditions, this sampling distribution is approximately normal, which makes it highly tractable mathematically even when the original populations are not perfectly bell-shaped.

Key takeaways
  • Define the Two Populations
  • Identify the Sample Means
  • Find the Mean of the Difference
  • Find the Variance of the Difference
  • Apply the Central Limit Theorem
  • Standardize to Compute Probabilities

Define the Two Populations

Population 1 has mean μ₁ and standard deviation σ₁. Population 2 has mean μ₂ and standard deviation σ₂. We assume the two populations are independent of each other, meaning an observation drawn from one population gives no information about an observation from the other.

Identify the Sample Means

Draw a random sample of size n₁ from Population 1 and a random sample of size n₂ from Population 2. Compute their sample means X̄₁ and X̄₂. Each sample mean is itself a random variable with E[X̄₁] = μ₁, Var(X̄₁) = σ₁²/n₁, and similarly E[X̄₂] = μ₂, Var(X̄₂) = σ₂²/n₂.

Find the Mean of the Difference

Using the linearity of expectation, the expected value of the difference X̄₁ − X̄₂ is simply μ₁ − μ₂. This makes intuitive sense: on average, the difference of sample means equals the difference of population means. There is no systematic bias in either direction.

Find the Variance of the Difference

Because the two samples are independent, the variance of a difference equals the sum of the individual variances: Var(X̄₁ − X̄₂) = Var(X̄₁) + Var(X̄₂) = σ₁²/n₁ + σ₂²/n₂. The standard deviation (called the standard error of the difference) is therefore √(σ₁²/n₁ + σ₂²/n₂). Notice the variances add even though we are subtracting the means — this is because variance measures spread, which always increases when combining independent random quantities.

Apply the Central Limit Theorem

When both n₁ and n₂ are sufficiently large (typically at least 30 each, or smaller if the populations are roughly normal), the sampling distribution of X̄₁ − X̄₂ is approximately normal. This allows us to standardize the difference and use the standard normal (Z) table, or a t-distribution when population standard deviations are unknown and estimated from the samples.

Standardize to Compute Probabilities

To find probabilities, convert the difference to a Z-score using Z = (X̄₁ − X̄₂) − (μ₁ − μ₂) / √(σ₁²/n₁ + σ₂²/n₂). Under the null hypothesis that μ₁ = μ₂, this simplifies to Z = (X̄₁ − X̄₂) / √(σ₁²/n₁ + σ₂²/n₂), which is the test statistic used in a two-sample Z-test.

The Key Equation

Xˉ1−Xˉ2∼N ⁣(μ1−μ2,  σ12n1+σ22n2)\bar{X}_1 - \bar{X}_2 \sim N\!\left(\mu_1 - \mu_2,\; \sqrt{\dfrac{\sigma_1^2}{n_1} + \dfrac{\sigma_2^2}{n_2}}\right)
  • \bar{X}_1 - \bar{X}_2 — Difference of sample means (same as the original measurements): The statistic computed from the two samples whose distribution we are describing.
  • \mu_1 - \mu_2 — Difference of population means (same as the original measurements): The center (expected value) of the sampling distribution; equals zero under the null hypothesis of no difference.
  • \sigma_1^2 / n_1 — Variance of first sample mean (square of original units): The variance of X̄₁, equal to the population variance divided by the first sample size.
  • \sigma_2^2 / n_2 — Variance of second sample mean (square of original units): The variance of X̄₂, equal to the population variance divided by the second sample size.
  • \sqrt{\sigma_1^2/n_1 + \sigma_2^2/n_2} — Standard error of the difference (same as the original measurements): The standard deviation of the sampling distribution; measures how much X̄₁ − X̄₂ typically varies from sample to sample.

Worked Example

Problem. Students at School A have math test scores with population mean μ₁ = 78 and population standard deviation σ₁ = 10. Students at School B have scores with μ₂ = 74 and σ₂ = 8. Random samples of n₁ = 40 students from School A and n₂ = 50 students from School B are selected. (a) Describe the sampling distribution of X̄₁ − X̄₂. (b) Find the probability that the sample from School A has a mean score at least 8 points higher than the sample from School B.

Xˉ1−Xˉ2∼N(4,  1.944),P(Xˉ1−Xˉ2≥8)≈0.0198X̄_1 - X̄_2 \sim N(4,\;1.944),\quad P(\bar{X}_1 - \bar{X}_2 \geq 8) \approx 0.0198

Answer. The sampling distribution is approximately Normal with mean 4 and standard error ≈ 1.944. The probability that the difference exceeds 8 points is approximately 0.0198 (about 2%).

Figure
Diagram
Sampling Distribution of X̄₁ − X̄₂N(μ₁−μ₂ , SE) with shaded tail regionX̄₁ − X̄₂Densityμ₁−μ₂x*P(diff ≥ x*)SE = √(σ₁²/n₁ + σ₂²/n₂)≈ 1 SE on each side
Origins · 1 minRonald A. Fisher and how this was discovered
RA
Ronald A. Fisher
1890–1962 · British

Fisher revolutionized statistics by formalizing the concept of the sampling distribution and developing rigorous methods for comparing group means. His work on the analysis of variance (ANOVA) and the design of experiments — including proper randomization — laid the mathematical foundations for the two-sample tests that rely on the sampling distribution of the difference of means. Fisher developed many of his statistical ideas while working as a statistician at an agricultural research station, analyzing crop yield data from small plots of land — far from the university lecture halls where his ideas would eventually be taught worldwide.

  • Sampling Distribution of the Mean — The difference of means builds directly on understanding how a single sample mean is distributed; mastering X̄ first makes the two-sample case straightforward.
  • Central Limit Theorem — The CLT guarantees that the sampling distribution of X̄₁ − X̄₂ is approximately normal for large samples, justifying all Z-based calculations.
  • Standard Error — The standard error of the difference, √(σ₁²/n₁ + σ₂²/n₂), is the spread of the sampling distribution and is central to hypothesis tests and confidence intervals.
  • Two-Sample Z-Test — The two-sample Z-test is the direct application of the sampling distribution of the difference of means to test whether two population means are equal.
  • Confidence Interval for the Difference of Means — Confidence intervals for μ₁ − μ₂ are constructed using the same sampling distribution described in this article, making them a natural next step.