Go back to the first year of the teacher's study. Twenty-four students, twelve with the guide and twelve without, a gap of 12 marks, and a plain shuffle of the labels in Part 6 that gave a p-value of 0.093. Not significant. A reader could take that as a sign the guide might not work.

Here is a different question about the same study, and it could have been asked before a single student was handed a guide. Suppose the guide really is worth 12 marks. How often would a study of this size, analysed this way, cross the 0.05 line?

The answer is 47 per cent. The study was a coin toss, and it was a coin toss before it began. Its failure to reach significance says almost nothing about the guide and a good deal about the plan.

That 47 per cent is the study's statistical power. Part 10 met it briefly, as the reason one of the twelve-school trial's predictions could not be settled. This part takes it apart. Power is one of five numbers that are locked together, and once you can see all five you can read the sample-size paragraph of any methods section, or write your own.

Two ways to be wrong

A test ends in one of two verdicts, "significant" or "not significant". The world is in one of two states, the guide works or it does not. That makes four combinations, and two of them are mistakes.

The guide does nothing The guide works
Test says "significant" False alarm (a Type I error) Correct: a real effect, found
Test says "not significant" Correct: nothing there, nothing claimed A miss (a Type II error)

The names "Type I" and "Type II" tell you nothing, which is why people mix them up. "False alarm" and "miss" are the same things in words that carry their meaning.

Each mistake has a rate, and each rate has a Greek letter you will meet in write-ups.

The rate of false alarms is the significance level, written α (alpha). It is the 0.05 line of Part 7: if the guide does nothing, one study in twenty will cross it anyway. You choose α, and you choose it in advance.

The rate of misses is written β (beta). If the guide works, β is the fraction of studies that fail to notice.

Power is what is left: 1 − β, the fraction of studies that do notice. A study with 80 per cent power has a β of 20 per cent. It finds a real effect four times in five and misses it once.

The courtroom of Part 5 has both errors too. Convicting an innocent defendant is the false alarm. Acquitting a guilty one is the miss. A court that demands overwhelming evidence convicts fewer innocent people and acquits more guilty ones, and no setting of the standard gets rid of both. The same trade is built into every test.

The picture behind the number

Power is an area, and it is easier to see than to define.

Imagine running the first-year study, twelve a side, a very large number of times. Each run produces a measured gap, and the measured gaps scatter. Part 1's demo showed that scatter. Its width is the standard error from Part 3: with 15 marks of spread and twelve students a side, the measured gap typically lands about 6 marks from the true one.

Now draw that scatter twice. Once for a world where the guide does nothing, centred on zero. Once for a world where it is worth 12 marks, centred on 12.

−20−100+10+20+30+40 gap the study measures, in marks if the guide does nothing if the guide is worth 12 the bar: 12.7 marks power: 47% a real effect, found misses: 53% false alarms: 5%, both tails together
Twelve students a side, 15 marks of spread, a true gap of 12. The bar sits at 12.7 marks, a little above the true gap, so slightly fewer than half the studies clear it.

The test draws a bar. A measured gap beyond the bar is called significant. Where the bar goes is decided by the left-hand curve alone: it is placed so that only 5 per cent of the "guide does nothing" studies land beyond it. With twelve a side, that puts it at 12.7 marks.

Power is then read off the right-hand curve. It is the share of that curve beyond the bar, the green area. The true gap is 12 and the bar is at 12.7, so a study has to be slightly lucky to clear it. Forty-seven per cent do.

Everything that changes power does so by moving one of three things in this picture: where the bar is, how far apart the two curves are, or how wide they are.

Five numbers, locked together

Five quantities appear in that picture.

The number Symbol In the first-year study Who decides it
Significance level α 0.05 You, by convention, before the data
Power 1 − β 47 per cent You, when planning. Usually 80 per cent
Effect size the gap 12 marks The world. You name the smallest one you care about
Variability the spread, SD 15 marks The students and the design
Sample size n 12 a side You, within your budget

They are locked together. Fix any four and the fifth is determined. That is all a power analysis is: you supply four and solve for the one you do not have.

Usually the unknown is the sample size. You state the significance level, the power you want, the gap you need to detect and the spread you expect, and the calculation returns the number of students. Sometimes the number of students is fixed by circumstance, as it was for the teacher in her first year, and you solve instead for power, or for the smallest gap the study can reliably see. Part 10's table did the last of these.

The effect size and the spread only ever enter as a ratio: the gap divided by the spread. A 12-mark gap against 15 marks of spread is 0.8, and so is a 4-mark gap against 5. That ratio is the Cohen's d of Part 8, and it is what power software means when it asks for an "effect size".

There is a rule of thumb that gets surprisingly close for the standard case, a two-sided test at 0.05 with 80 per cent power. It is known as Lehr's rule, after the 1992 paper that proposed it:

students per group ≈ 16 × (spread ÷ gap)²

For a 12-mark gap and 15 marks of spread: 16 × (15 / 12)² = 16 × 1.56 = 25. The exact calculation says 26.

The rest of this part pulls each lever in turn while holding the others still, starting from that case: a 12-mark gap, 15 marks of spread, α at 0.05, and 26 students a side for 80 per cent power.

Lever one: more students

More students make both curves narrower, because the standard error shrinks with the square root of the sample size. Narrower curves overlap less, and the bar moves in toward zero.

Students per group Power to detect a 12-mark gap
6 24%
12 47%
24 77%
26 81%
48 97%
100 more than 99.9%

Six a side, the size of one cell in the twenty-four, finds the guide's effect one time in four. Going from 12 to 24 a side buys 30 points of power. Going from 48 to 100 buys 3. Past the point where a study is well powered, extra students are spent on precision, a narrower interval around the gap, and not on the chance of detecting it.

Lever two: the size of the effect

A bigger effect pushes the right-hand curve further from zero, so more of it clears the bar. You do not control the true effect. What you control is the smallest effect you insist on being able to detect, and that choice drives the cost of the study more than anything else.

Smallest gap to detect Students per group for 80% power
20 marks 10
15 marks 17
12 marks 26
8 marks 57
5 marks 143
3 marks 394
1 mark 3,533

Halve the gap and the students needed roughly quadruple. It is the square in Lehr's rule, and it is why trials that hunt for small effects are enormous.

This is also where power analyses most often go wrong. The tempting move is to plug in the effect you hope for, or the effect an earlier small study happened to report. Both tend to be too big, for a reason a later section explains, and a study planned around an optimistic effect is underpowered for the real one.

The defensible input is the one Part 10 introduced: the smallest effect size of interest, the smallest gap that would change what anyone does. For the headteacher that was 5 marks. A study with 143 students a side will detect a 5-mark effect four times in five, and will detect anything larger more often than that.

Lever three: the noise

Less spread between students makes both curves narrower, exactly as more students do. In the arithmetic, halving the spread is worth the same as quadrupling the sample.

Spread between students Students per group for 80% power on a 12-mark gap
30 marks 100
20 marks 45
15 marks 26
10 marks 12
8 marks 9

You cannot make students more alike. You can stop counting differences that have nothing to do with the question, and the series has already met three ways of doing it.

  • Compare within groups that are alike. Part 3 found that the 15 marks of spread is partly two schools differing, and that students inside one school differ by about 8. A design that compares students with their own schoolmates, the stratified shuffle of Part 6, faces the smaller number. It is why the same twenty-four students gave a p-value of 0.093 unstratified and about 1 in 700 stratified.
  • Measure each unit twice. When the same students, or the same exam topics, appear under both conditions, each acts as its own comparison and the differences between them drop out. Part 14 does this with the paired bootstrap.
  • Measure better. A longer exam, a fixed mark scheme and blind marking all remove noise that comes from the measuring and not from the students. Part 12 covers those.

Of the five levers this is the only one that can raise power without costing more students, a weaker claim or a higher risk of error. It is worth the most thought and usually gets the least.

Lever four: the significance level

The significance level sets where the bar goes. A stricter level, a smaller α, pushes the bar further from zero. Fewer false alarms get over it, and so do fewer real effects.

Significance level α Power with 26 a side Students per group to get back to 80%
0.10 88% 21
0.05 81% 26
0.01 58% 39
0.0083 56% 40
0.001 29% 57

This is the trade from the courtroom, with numbers on it. With everything else held still, every false alarm you refuse to risk is paid for in misses.

The fourth row is not arbitrary. It is 0.05 divided by 6, the bar the Bonferroni correction of Part 9 sets when six hypotheses share one family. Part 9 said the correction costs power. Here is the bill: a study planned for 80 per cent power on one hypothesis has 56 per cent on each of six, and needs about half as many students again to recover.

A one-sided test works the other way. Putting the whole 5 per cent in one tail is the same, for power, as a two-sided test at 0.10: 88 per cent with 26 a side. It is legitimate only if the direction was committed to in advance, as Part 5 explained. Chosen afterwards, it is a way of halving the p-value.

Lever five: the power you ask for

The last lever is the target itself.

Power you ask for Students per group
50% 14
70% 21
80% 26
90% 34
95% 42
99% 59

The first half of the power is cheap and the last few points are expensive. Getting from 80 to 95 per cent costs 60 per cent more students.

The 80 per cent convention has an author. Jacob Cohen proposed it in his handbook on power analysis, and repeated it in a short primer in 1992. His reasoning was a judgement, not a derivation. With α at 0.05 and β at 0.20, a miss is tolerated four times as often as a false alarm, which treats a false alarm as roughly four times as serious. He offered it for use when a researcher has no better basis for choosing.

Often there is a better basis. If the study cannot be repeated, or a miss would bury a useful intervention for years, 90 per cent is the more sensible target. If the study exists to defend a null, as the teacher's fourth year does, a miss is the failure of the whole exercise, and there is a strong case for the higher figure.

Try it: the power dial

All five levers on one picture. The top panel is the figure from earlier: the red curve is the spread of measured gaps if the guide does nothing, the green curve is the spread if the true gap is what you set, and the dashed lines are the bar. The lower panel shows how power climbs with students, with your study marked on it.

Five things to try, one for each lever.

  1. Sample size. Leave everything at its starting value, the first-year study, and read the power: 47 per cent. Slide the students up to 26 and it reaches 80. Watch both curves get narrower and the bar move in.
  2. Effect size. With 26 a side, drop the true gap from 12 to 5. The green curve slides back under the red one and power falls to about 22 per cent. The readout says how many students a 5-mark gap needs.
  3. Variability. Put the gap back to 12 and pull the spread down from 15 to 8, the within-school figure from Part 3. Power is close to 100 per cent without adding a single student.
  4. Significance level. Reset the spread to 15 and move α from 0.05 to 0.0083. The bar steps away from zero and power drops from 81 to 56 per cent.
  5. Desired power. Move the target from 80 to 95 and watch the "needs" marker on the lower panel move from 26 to 42.

Then set the students to 6, the gap to 12, and press Run 200 studies a few times. About a quarter of the studies clear the bar. Look at the average gap those studies measured. That number is the subject of the next section.

What low power does to the studies that win

A low-powered study usually misses. What is less obvious is what happens when it does not.

With six students a side, the bar is at about 19 marks. The guide is worth 12. So the only way a six-a-side study can come out significant is by measuring a gap much larger than the true one. Chance has to push it over, and only the studies that chance pushed upward get through.

Run the study 40,000 times at each size and look only at the ones that reached significance.

Students per group Studies that came out significant Average gap those studies measured True gap
6 24% 22.0 marks 12
12 47% 17.0 marks 12
26 81% 13.4 marks 12
100 100% 12.0 marks 12

Every study in the table was run fairly, on a guide that works exactly as advertised. The six-a-side studies that "succeeded" still report an effect nearly twice the true size. Nobody did anything wrong. The filter did it.

This has a name, the winner's curse, and it matters because significant results are the ones that get written up. If a field runs many small studies and publishes the ones that clear the bar, its published effects are inflated, and the next team that plans a study around a published effect will be underpowered in turn. That is the reason, promised earlier, not to take your effect size from a small study that worked.

Low power is not rare. A 2013 analysis of neuroscience meta-analyses by Katherine Button and colleagues estimated the median power of the studies in them at 21 per cent. A later reanalysis found the picture varied a great deal between subfields, with some well powered and some far worse, but nobody came away arguing that underpowered studies were unusual.

So a small study has two problems, and the second is the one people forget. If it comes out not significant, you have learned little, because it was likely to miss. If it comes out significant, the effect it reports is probably too big.

Power is for planning

Power belongs to the plan. It is a property of a design and an assumed effect, worked out before the data exist.

There is a tempting thing to do with it afterwards. A study comes out not significant, and someone computes the power "for the effect we observed", finds it low, and writes that the study was underpowered and so the null result should not count against the hypothesis.

It sounds reasonable and it is circular. Power computed from the observed effect is the p-value again in different units: a large p-value always gives a low "observed power", and a small one always gives a high one. It cannot tell you anything the p-value did not. John Hoenig and Dennis Heisey set this out in a 2001 paper that is still the standard reference, and they called the practice an abuse of power.

After the data are in, the tool for "what could this study have missed?" is the confidence interval of Part 8. If the interval runs from −9 to +11, the study could not tell a harmful guide from a helpful one, and you can see that without a power calculation. If you want to claim the effect is absent, the tool is the equivalence test of Part 10.

The twelve-school trial, read again

Three things about the trial's results table make more sense with the five levers in view.

P1, the plain guide against no guide, had 192 students a side. Part 10's table says that is enough to detect a 4-mark gap four times in five. The true effect was about 12. The trial was never in danger of missing it, and its interval was narrow for the same reason.

P5 asked whether the guide helped resit students as much as first-timers. That is a difference between two gaps, and Part 10 worked out that it needs about four times the students for the same precision. The noise lever was against it, the sample was not increased to match, and the result was inconclusive.

All six predictions were tested as one family, with the Holm correction. The first prediction in the queue faced the 0.0083 bar from the table above, and the others faced bars somewhere between that and 0.05. A power analysis for a study with six hypotheses has to use the corrected level, not 0.05, or it will promise more than the study can deliver.

Writing it down

A sample-size justification in a methods section is short, and now that the five numbers have names you can check that all of them are present. Here is one for a trial of the guide planned around the headteacher's 5 marks.

The trial was planned to have 80 per cent power to detect a difference of 5 marks, the smallest difference that would change the purchasing decision, at a two-sided significance level of 0.05. The standard deviation of marks was taken as 15, from the three previous years. This requires 143 students per condition. We recruited 160 to allow for absences.

Every number has a source that is not the data about to be collected. The significance level is the convention. The power is the convention, stated. The effect is the smallest one that matters, argued for in the world's terms. The spread comes from earlier years. The sample size is the output, with a margin.

When you read one of these, look for the missing number. If no effect size is given, the calculation cannot be checked. If the effect size is "the effect observed in our pilot", it is probably too large. If the spread came from nowhere, so did the sample size.

In Python

Each lever is one call to solve_power with a different argument left out. The last block is the check that needs no formula: run the study many times and count.

import numpy as np
from scipy import stats
from statsmodels.stats.power import TTestIndPower

power = TTestIndPower()
gap, spread = 12, 15            # marks
d = gap / spread                # the calculation wants the gap in units of the spread (Cohen's d)

# Lever one: students. Power for a 12-mark gap at the 0.05 line
for n in (6, 12, 24, 26, 48, 100):
    print(f"{n:>3} students a side: power {power.power(d, n, alpha=0.05):.0%}")

# Lever two: the size of the effect. Students a side for 80% power, with the rule of thumb beside it
for g in (20, 15, 12, 8, 5, 3, 1):
    n = power.solve_power(g / spread, alpha=0.05, power=0.8)
    print(f"gap {g:>2} marks: {np.ceil(n):>4.0f} a side   (16 x (spread / gap)^2 = {16 * (spread / g)**2:.0f})")

# Lever three: the noise
for s in (30, 20, 15, 10, 8):
    print(f"spread {s:>2} marks: {np.ceil(power.solve_power(gap / s, alpha=0.05, power=0.8)):>3.0f} a side")

# Lever four: the significance level, at 26 a side, and the students needed to get back to 80%
for a in (0.10, 0.05, 0.01, 0.05 / 6, 0.001):
    print(f"alpha {a:.4f}: power {power.power(d, 26, alpha=a):.0%}, "
          f"or {np.ceil(power.solve_power(d, alpha=a, power=0.8)):.0f} a side for 80%")

# Lever five: the power you ask for
for target in (0.5, 0.7, 0.8, 0.9, 0.95, 0.99):
    print(f"power {target:.0%}: {np.ceil(power.solve_power(d, alpha=0.05, power=target)):.0f} a side")

# The check that needs no formula: run the study 40,000 times and count.
# Also the average gap measured by the studies that crossed the line
rng = np.random.default_rng(20261118)
for n in (6, 12, 26, 100):
    a, b = rng.normal(74, 15, (40_000, n)), rng.normal(62, 15, (40_000, n))
    p = stats.ttest_ind(a, b, axis=1).pvalue
    gaps = a.mean(axis=1) - b.mean(axis=1)
    print(f"{n:>3} a side: {np.mean(p < 0.05):.0%} significant, and those measured {gaps[p < 0.05].mean():.1f} marks on average")

which prints:

  6 students a side: power 24%
 12 students a side: power 47%
 24 students a side: power 77%
 26 students a side: power 81%
 48 students a side: power 97%
100 students a side: power 100%
gap 20 marks:   10 a side   (16 x (spread / gap)^2 = 9)
gap 15 marks:   17 a side   (16 x (spread / gap)^2 = 16)
gap 12 marks:   26 a side   (16 x (spread / gap)^2 = 25)
gap  8 marks:   57 a side   (16 x (spread / gap)^2 = 56)
gap  5 marks:  143 a side   (16 x (spread / gap)^2 = 144)
gap  3 marks:  394 a side   (16 x (spread / gap)^2 = 400)
gap  1 marks: 3533 a side   (16 x (spread / gap)^2 = 3600)
spread 30 marks: 100 a side
spread 20 marks:  45 a side
spread 15 marks:  26 a side
spread 10 marks:  12 a side
spread  8 marks:   9 a side
alpha 0.1000: power 88%, or 21 a side for 80%
alpha 0.0500: power 81%, or 26 a side for 80%
alpha 0.0100: power 58%, or 39 a side for 80%
alpha 0.0083: power 56%, or 40 a side for 80%
alpha 0.0010: power 29%, or 57 a side for 80%
power 50%: 14 a side
power 70%: 21 a side
power 80%: 26 a side
power 90%: 34 a side
power 95%: 42 a side
power 99%: 59 a side
  6 a side: 24% significant, and those measured 22.0 marks on average
 12 a side: 47% significant, and those measured 17.0 marks on average
 26 a side: 81% significant, and those measured 13.4 marks on average
100 a side: 100% significant, and those measured 12.0 marks on average

The simulated percentages match the formula's, which is the point of running them. For any design the formula does not cover, a stratified test, a difference of differences, an equivalence test, the simulation is the method: write the analysis you plan to run, feed it invented data with the effect you care about, and count how often it finds it.

Where this leaves us

Power is the chance that a study finds an effect that is really there. It is fixed by four other numbers: how strict the significance level is, how big the effect is, how noisy the measurements are, and how many students there are. Give any four of the five and the last one follows, and a power analysis is nothing more than that calculation done before the study and written down.

Of the levers, sample size is the one people reach for and noise is the one they overlook. The significance level trades false alarms against misses and cannot reduce both. The effect size should be the smallest one that matters, not the one you hope for.

And a study's power shapes what its result means, whichever way it comes out. A miss from a weak study is not evidence of absence. A hit from a weak study is probably an overestimate. The first-year study's 0.093 was neither a failure of the guide nor bad luck. It was a 47 per cent chance that went the other way.

That is the end of the arithmetic at the core of the series. The next two parts are about the things no calculation can supply: whether the study was built so that the gap could only have come from the guide, and whether the choices were made before the results were seen.


Next: Designed to Be Believed: names drawn from a hat versus volunteers, confounds and the one School C's year admitted to, markers who do not know who had the guide, a mark scheme written before the exam, the intention-to-treat rule borrowed from medicine, publishing enough for others to get the same numbers, and how to read a kappa of 0.973.