Mistake Master
Sampling Distributions for the Difference Between Two Sample Means
The Minus Sign Never Reaches the Spread
You'll learnwhere the sampling distribution of a difference between two sample means is centered, why the two variances add even though the means subtract, what each of the three wrong combining routes returns, why the smaller group controls the standard error, and which two degrees-of-freedom answers are accepted.
Comparing two groups means studying one new number: the difference between their sample means. Two teaching methods give 78.4 from 30 students and 71.2 from 28, so this pair of samples says 7.2 points. Another pair would say something else, and this animation draws the distribution those differences live in. Its center is the obvious one. Its spread is not: each group hands over its own s²/n, the two ADD under the minus sign — proven here by listing all nine outcomes of two tiny draws, where the differences and the sums both come out at variance 12 — and one square root is taken at the end. Subtracting the variances instead returns −1.104, which has no real square root; adding the standard errors returns 3.293, which is 40.7 percent too large and rings no alarm at all. Twelve short steps; press Next for each one.
Read all 12 steps as text
One pair of samples, one number
Two teaching methods. Method A gives \(\bar{x}_1 = 78.4\) from \(n_1 = 30\) students; method B gives \(\bar{x}_2 = 71.2\) from \(n_2 = 28\). Subtract, and this pair of samples says method A is ahead by 7.2 points.
Choose the order of subtraction once and keep it. A report that never states which way round it went leaves a reader unable to say which method came out ahead.
Pair after pair, it lands somewhere new
Across all pairs of independent random samples of these sizes, the difference has its own sampling distribution, and its center is the obvious one:
$$\mu_{\bar{x}_1 - \bar{x}_2} = \mu_1 - \mu_2.$$
The difference of two unbiased estimators is unbiased for the difference of the parameters, so the 7.2 you just saw is one draw from this curve — the estimate, not the center. Reversing the subtraction order gives the amber curve: the same fact mirrored through zero.
Two draws, nine outcomes
Strip the question to something small enough to count. Two independent draws: A from \(\{2, 5, 8\}\) and B from \(\{1, 4, 7\}\), every value equally likely. Each list has variance 6.
The grid lists every one of the nine outcomes of \(A - B\). They run from \(-5\) to \(7\), so a difference of two things that each vary a little varies quite a lot.
Variances add, even under a minus sign
Computing the variance of those nine differences from its definition gives 12 — which is \(6 + 6\). Now list the nine sums beside them: variance 12 again. The minus sign moved the center from 9 down to 1 and did not touch the spread.
That is the general fact. For independent quantities, variances add under a plus sign and under a minus sign, because each draw contributes its own wandering whichever way the values combine.
Each group hands over its own share
A sample mean's own variance is \(\sigma^2/n\) (Topic 4.3), so with two independent groups the rule from step 4 applies to the two means. Group 1 brings \(8.1^2/30 = 2.187\); group 2 brings \(9.6^2/28 = 3.291\).
Each fraction carries its own \(n\). Nothing here is averaged, and nothing is pooled.
Add the shares, then take one root
The two shares lie end to end, and one square root is taken at the end:
$$SE = \sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}} = \sqrt{2.187 + 3.291} \approx 2.341.$$
Sanity-check the answer against the two groups it came from: 2.341 is more variable than either mean on its own (1.479 and 1.814) and less than the two added. A two-sample standard error always lands in that bracket.
Subtract instead and there is no root
The means subtract, so why not the variances? Because \(2.187 - 3.291 = -1.104\), and a negative number has no real square root. The block on screen runs left of the dashed zero rule, off the half-line variances live on, and the calculator's refusal is the formula reporting that a minus sign was written where the derivation has a plus.
That route at least announces itself. The other two do not. Adding the standard errors gives 3.293 — 40.7 percent too large and perfectly plausible-looking. Pooling everything into one group of 58 gives 0.552, a small tidy number about nothing, since the two-group structure was erased before the arithmetic began.
The smaller group sets the scale
Shrink group 2 from 28 observations to 5, keeping the same \(s = 9.6\), and its share jumps from 3.291 to \(9.6^2/5 = 18.432\) — about eight times everything the 30-student group brings. The standard error nearly doubles, from 2.341 to 4.541.
Precision does not average and it does not transfer. The large group is very precise, and none of that precision can rescue a five-observation group: the sum follows its largest term, so only more data in the smaller group can shrink the standard error much.
The degrees of freedom stop being whole
With two estimated standard deviations, the standardized difference follows a t distribution only approximately, and the degrees of freedom that make the approximation best come out fractional.
Software computes them from the two \(s^2/n\) contributions; for this study the formula gives 53.0, and this page runs that computation rather than quoting it. Doing it by hand is not realistic, which is why a second answer exists.
Two answers are accepted, and 56 is not
The conservative value. \(\min(n_1, n_2) - 1 = 27\): deliberately smaller than the truth, so critical values run slightly larger and intervals slightly wider — an error, if there is one, on the safe side, and doable by hand.
What is not accepted is \(n_1 + n_2 - 2 = 56\) chosen by habit, a pooled-variance value from other courses that overstates the df and narrows the interval. The practical stakes are small — the two accepted intervals differ by about 2.3 percent in width — but whichever df was used has to be stated, so a reader knows which interval they are looking at.
Two samples, or one sample twice?
Every one-sample condition now runs once per group: random, the 10 percent check against each group's own population, and shape group by group — a study with \(n_1 = 40\) clean and \(n_2 = 9\) visibly skewed still fails, and the smaller group is also the one contributing the larger share of the standard error.
One condition is new and runs once: independence between the groups. Measuring the same 24 patients before and after produces two columns of numbers but not two samples — a patient who runs high before tends to run high after, so the variances-add derivation simply does not apply.
The difference is the wide one
Three curves on one center: each group's own sample mean, spreading by 1.479 and 1.814, and the difference of the two, spreading by 2.341.
Comparing is harder than measuring. Two uncertainties come in and one, larger, comes out — which is what the plus sign inside the square root has been saying all along.