Mistake Master
Setting Up a Test for a Population Mean or Population Mean Difference
The Null Names One Curve, and x-bar Is Not a Hypothesis
You'll learnhow to state hypotheses about a population mean before any computation, why the null must carry equality and the alternative must take its direction from the research question, how a paired design changes the parameter to a mean difference, and why the procedure is t.
A manufacturer promises its batteries last 128 hours on average. A consumer group can afford to test 25 of them, and those 25 come back at 124.6. This animation draws the curve that promise actually names — where sample means of 25 would land if it were true — and marks the 124.6 in its tail. Then it breaks each setup rule in turn and shows the price on screen: move the null's center to 130 and the tail past the same data falls from 0.038 to 0.004; pick the direction after peeking and both five percent tails light up, so a five percent test is quietly spending ten. It finishes with the paired version, where twelve students measured twice give twelve differences and eleven degrees of freedom, and with the reason every one of these tests is t rather than z. Twelve short steps; press Next for each one.
Read all 12 steps as text
A promise about batteries nobody has tested
The claim is a number about every battery of this type — the ones on the shelf, the ones not yet made — and no amount of testing will ever see all of them.
If the promise held, samples land here
A sample of 25 does not land on 128 exactly; it lands somewhere nearby. This curve is the whole set of somewheres, with standard error \(\frac{9.2}{\sqrt{25}} = 1.84\) hours.
The tested batteries came in low
The 25 batteries averaged 124.6 hours. That is out in the left tail of the curve the claim named — far from the middle, but not off the picture.
The test is about mu, never about x-bar
Before that 124.6 is allowed to do anything, the setup is written: \(H_0: \mu = 128\) against \(H_a: \mu < 128\), where \(\mu\) is the mean lifetime of all batteries of this type.
A hypothesis about \(\bar{x}\) is struck through on screen for a reason. \(\bar{x}\) is 124.6 — it is printed on the data sheet, no probability attaches to it, and "\(\bar{x} = 128\)" is false by inspection with nothing left to test.
Move the centre and the tail changes
Suppose the null had been written at 130 instead. Same data, same 124.6 — but the tail past it is now measured under a different curve, and the page integrates both.
Under the curve at 128 the left-tail area is 0.038; under the curve at 130 it is 0.004. A tenfold difference, produced by nothing but the choice of center.
One null value, because one curve
"\(\mu \ge 128\)" is not a hypothesis you can compute with: it names every curve from 128 upward, and each one gives its own tail area past 124.6.
The convention that settles it is to take the boundary value, 128 — the member of the family closest to the alternative, and therefore the one whose p-value is the largest and most cautious of the whole family.
The direction came from the question
The consumer group suspected the batteries were worse than claimed, and they suspected it before testing anything. That is where \(H_a: \mu < 128\) comes from.
The shaded tail holds 5 percent of the sample means a true claim would produce — the means low enough to count as evidence against it. Its edge sits at 124.85 hours.
Peek first and you spend alpha twice
The tempting shortcut is to look at \(\bar{x}\) first and then test in whichever direction it leaned. A sample mean always leans somewhere, so that analyst would have tested "less than" here and "greater than" on a different draw.
Both tails are therefore live, and both are shaded: when the null is true, the sample mean falls into one of them \(0.05 + 0.05 = 0.10\) of the time. The test says 5 percent and spends 10.
The same students, measured twice
A different study: twelve students take a pre-test and a post-test to evaluate a training program. Each student is one dumbbell on screen — a hollow before dot joined to a filled after dot.
These are not two independent groups. The same twelve people produced both columns, and that is a fact about the design, not about the numbers.
Subtract first: one difference per pair
The paired setup runs the same machine as the one-sample setup with one move in front: subtract first, in a stated order — post minus pre — so twelve students give twelve differences.
$$H_0: \mu_d = 0 \qquad \text{against} \qquad H_a: \mu_d > 0,$$
where \(\mu_d\) is the population mean difference. The null of zero says the mean did not change, the direction says the program was built to help, and \(n\) counts pairs: twelve of them, so \(df = 11\).
Why every one of these tests is t
\(\sigma\) was never known. The 9.2 in the standard error is \(s\), computed from the same 25 batteries, so the denominator of the statistic wobbles from sample to sample and the reference curve has to be the heavier-tailed t.
The page integrates both one-sided critical values: 1.711 for t at \(df = 24\), 1.645 for z. On the hours axis they put the rejection edge at 124.85 and 124.97, and the sliver between them is where a z habit rejects a claim the t procedure says is still standing.
Draw the line before you see the number
The last piece of the setup is \(\alpha = 0.05\), fixed now, before any p-value exists. It is the shaded tail: the share of true claims this method will reject anyway.
Four sentences, all written before the arithmetic — the parameter in context, the hypotheses, the conditions with the procedure's name, and \(\alpha\). Topic 4.5 is where the button finally gets pressed.