Mistake Master
Setting Up a Test for the Difference Between Two Population Means
The Same Twenty Numbers, and Two Answers 32 Times Apart
You'll learnwhich question to ask before writing anything down, what treating paired data as two samples actually costs, why hypotheses name parameters and never statistics, where the alternative's direction comes from, and which conditions run once per group.
Ten runners each try two shoe models. That is twenty numbers in two columns — and whether you subtract within runners or add the two variances is not a matter of taste. This page runs both procedures over the same twenty times: pairing gives t = 15.79 on 9 degrees of freedom, and treating the columns as two independent samples gives t = 0.49 on 18. Overwhelming evidence, or none at all, from one dataset. The reason is drawn on screen: the runners differ from each other by 5.40 seconds while each runner's own improvement varies by 0.24, so the design question decides whether a 22-fold source of variation sits in your denominator or is subtracted away before you start. Twelve short steps; press Next for each one.
Read all 12 steps as text
Ten runners, twenty numbers
Ten runners each run the same course twice, once in model A shoes and once in model B. That gives twenty times in two columns.
Look at how much the runners differ from each other: 45 seconds at one end of the table, 63 at the other. That spread is about the runners, and it has nothing to do with the shoes.
Only the design can tell you which
The data cannot answer it. Two columns of numbers look identical whether they came from twenty different people or from ten people measured twice, and nothing in the numbers themselves gives it away.
So the first question is about the study, not the data: did the same individuals — or matched pairs — produce both columns? Answer that, and the procedure is decided.
Subtract inside each runner
Take the yes branch and subtract within each runner: 52 − 50.6, 61 − 59.9, and so on down the table. Ten runners give ten differences.
Now compare the three rows. The two time rows run from 45 to 63; the difference row runs from 0.8 to 1.5. Every runner improved, by about the same amount, and the row that says so is a short tidy list.
Same data, two answers
Both procedures run over the identical twenty numbers on this page. They agree exactly on the estimate: the mean difference is 1.20 s either way, which is an identity, not a coincidence.
They disagree completely on the denominator. Pairing divides by a standard error of 0.076 and gets \(t = 15.79\) on 9 degrees of freedom. Adding the two variances divides by 2.446 and gets \(t = 0.49\) on 18. Overwhelming evidence, or none.
Pairing removes what you never asked about
Here is why. The runners differ from one another by a standard deviation of 5.40 s. Each runner's own improvement varies by 0.24 s. That is a factor of 22.
Subtracting within runners removes the first quantity before it can reach the standard error. The two-sample formula puts every second of it back into the denominator, where it swamps a real 1.20-second effect. The question was never "how fast are these runners?" — it was "do the shoes help?"
The null says the two means are equal
With the design settled, the hypotheses. For two independent groups they are a claim about the two population means:
$$H_0: \mu_1 = \mu_2, \qquad \text{equivalently} \qquad \mu_1 - \mu_2 = 0.$$
Notice what the null does not contain: any numerical value for either mean. It names equality, and both parameters are defined in context — the mean score for all students taught by each method.
A hypothesis never contains a statistic
Three constructions, each struck out over the numbers that refute it. Writing the observed means in — \(H_0: \mu_1 = 78.4,\ \mu_2 = 71.2\) — makes the null a claim built from the data it is supposed to be tested against.
Hypothesising about the sample means is worse: those are known, and they differ by 7.2, so the claim is already false and no test is needed to say so. And setting the null to the observed difference asks whether the data agree with themselves, which they always do.
The direction comes from the question
The alternative points somewhere, and where it points is decided by the research question, before the data are seen. A researcher who set out to show method A helps writes \(H_a: \mu_1 > \mu_2\) — and would have written it whichever way the sample means happened to fall.
Choosing after peeking is what breaks: an alternative picked to match the data can never be contradicted by them, and the test's stated error rate stops being its real one. Two-sided is not a safer default, it is a different question — the right one when either direction would matter.
Two checks run once, two run per group
Random and independence between the groups are checked once for the study. The 10 percent condition and the shape condition are checked once per group, against each group's own population and each group's own plot.
A study with 40 in one group and 12 in the other has not finished its shape check by pointing at the 40. And naming a condition is not checking it: the check is the sentence with the study's own numbers in it.
Matched pairs, and nobody measured twice
Twenty-five pairs of twins, one twin of each pair assigned to each of two conditions. No individual is measured twice, the two groups are 25 different people each — and the data are still paired.
What creates pairing is a link between the two groups, and twins are linked by age, household and genetics. So the analysis subtracts within pairs and tests the mean difference on 24 degrees of freedom, exactly as the runners did.
The complete setup, in order
Four things get written down before any arithmetic happens, and they happen in this order: the design question, the two parameters in context, the hypotheses, and the conditions with the procedure's name and the significance level.
The order is not decoration. Answering the design question first is what decides which procedure the rest of the list is even about.
Ask the design question first
Back to the branch that started it, with the two answers attached. The same twenty running times give \(t = 15.79\) down one branch and \(t = 0.49\) down the other.
Two columns of numbers do not settle which branch you are on. Only how the study was run can — and that is a question you can only answer by asking about the study, never by looking harder at the data.