Part 2 was about the middle of a set of numbers and Part 3 about their spread. Both worked with marks out of 100. A great deal of what gets reported is not a mark at all. It is a count turned into a percentage: the share who passed, the share who reached a top grade, the share who dropped out.

This part is about those numbers. A rate looks like a different kind of thing from an average, and it is the same thing. It also has a trap of its own, because the formula most courses teach for the uncertainty around a rate breaks down at exactly the sample sizes a single class provides.

A mean of ones and zeros

When School C joined the study in its second year, its headline was a rate: of the 18 students drawn by lot to have the guide, 16 passed, against 5 of the 18 without.

Rates feel like a different kind of number from marks, but they are not. Write a 1 for each student who passed and a 0 for each who did not. The eighteen students with the guide become this list:

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0

Now take the mean exactly as Part 2 did: add the numbers up and divide by how many there are.

Step Working Result
Add them up sixteen 1s and two 0s: 16 + 0 16
Count them 18 students 18
Divide 16 ÷ 18 0.889
As a percentage 0.889 × 100 88.9%

The sum of the list is just the number of passes, because each pass adds 1 and each fail adds nothing. So "the pass rate" and "the mean of the ones and zeros" are the same calculation, passes divided by students. The group without the guide works the same way: five 1s and thirteen 0s, 5 ÷ 18 = 0.278, or 27.8 per cent.

That is why everything that applies to means applies to rates. The most important thing it brings with it is noise.

The observed rate and the true rate

The 88.9 per cent is what happened to these eighteen students. Call it the observed rate. It is a fact about this one group and there is nothing uncertain about it.

But nobody is buying the guide for these eighteen students. The headteacher wants to know what it would do for students like them in general: next year's class, the year after, other schools of the same kind. Imagine giving the guide to every such student, thousands of them, and counting the share who pass. That share is the true rate. It is the number we actually want, and we can never see it directly, because we cannot test everyone.

The observed rate is our estimate of the true rate, and it is a rough one, for the reason Part 1 gave: test eighteen different students and you get a different answer.

Suppose the true rate were exactly 80 per cent. A class of eighteen cannot even produce 80 per cent, since that would be 14.4 students. What it produces is 14 passes, or 15, or 12, or 17, depending on which eighteen students happened to be drawn. Work out the chances and a true rate of 80 per cent gives 16 or more passes out of 18 about one time in four.

So seeing 16 of 18 does not tell us the true rate is 88.9 per cent. It might be 80, with a class that had a good day. It might be 95, with a class that had a poor one. One observed rate is compatible with a whole range of true rates.

What an interval is

We cannot report the true rate itself, because we do not know it. What we can report is that uncertainty: the observed rate, together with the range of true rates it is compatible with. That range is called an interval: the set of true rates that could plausibly have produced what was observed. It has a lower end and an upper end, and it is written beside the observed rate.

0%20%40%60%80%100% pass rate observed rate: 88.9% lower end 67%upper end 97% the interval: where the true rate could plausibly be 16 passes out of 18
The dot is what was observed. The bar is the interval: the true rates that could plausibly have produced 16 passes out of 18.

There are several methods for working out the two ends. The one used for the figure and the table in this section is the Wilson score interval, the method this part ends up recommending. The next section sets it beside two others and describes how each one arrives at its ends.

For 16 of 18, the Wilson interval runs from 67 to 97 per cent. Read it like this. The observed pass rate was 88.9 per cent. The true rate could reasonably be anywhere from about 67 to about 97. A true rate outside that range, 50 per cent say, would make 16 passes out of 18 a surprising thing to have seen.

The width of the interval says how much the observed rate can be trusted, and it depends mostly on how many students stand behind it.

Observed Pass rate Wilson interval for the true rate
16 of 18 88.9% 67% to 97%
160 of 180 88.9% 84% to 93%
1,600 of 1,800 88.9% 87% to 90%

The same 88.9 per cent, three times. From eighteen students it pins the true rate down to somewhere in a 30-point stretch. From eighteen hundred it pins it down to within 3 points.

"Plausibly" needs a number behind it, and the convention is 95 per cent. A 95 per cent interval comes from a method that, used on many studies, would capture the true rate in about 95 of every 100. Its full name is a confidence interval, and Part 8 says exactly what that promise does and does not mean. For this part, "the range of true rates the data are compatible with" is enough.

Wilson's is not the method most courses teach first. The one they do teach is where a textbook formula goes wrong in a way that is worth seeing once, because you will meet it in published work.

Four intervals for "16 out of 18"

Call the observed rate p (here 0.889) and the number of students n (18). Each method below produces a range that is meant to contain the true rate 95 times out of 100 if you used it on many studies. Part 8 says exactly what that promise means. For now, look at the ranges.

Method 5 of 18 (27.8%) 16 of 18 (88.9%) 0 of 18 (0%) 18 of 18 (100%)
Wald (the textbook formula) 7.1% to 48.5% 74.4% to 103.4% 0% to 0% 100% to 100%
Wilson score 12.5% to 50.9% 67.2% to 96.9% 0% to 17.6% 82.4% to 100%
Clopper-Pearson (exact) 9.7% to 53.5% 65.3% to 98.6% 0% to 18.5% 81.5% to 100%

Wald. The interval is p plus or minus 1.96 times the square root of p(1 − p)/n. It is the one in most introductory courses and most spreadsheets, and it fails exactly when it matters. For 16 of 18 it says the true pass rate could be as high as 103 per cent. For 0 of 18 it says the true rate is exactly zero, with no uncertainty at all, after eighteen students. The formula assumes the rate is far from 0 and 100 and the sample is large, and a single class is usually neither.

Wilson score. Instead of centring the interval on the observed rate, Wilson asks a slightly different question: which true rates would make an observation like 16 of 18 unsurprising? The answer is an interval that is pulled toward 50 per cent, never crosses 0 or 100, and behaves well even for 0 of 18, where it says the true rate is somewhere below 17.6 per cent, which is the honest statement. Its centre is (p + z²/2n) divided by (1 + z²/n), with z = 1.96, and its half-width is z times the square root of p(1 − p)/n + z²/4n², divided by the same (1 + z²/n). Nobody computes it by hand, but the shape of the formula shows what it does: it adds about two imaginary passes and two imaginary fails to the count, which is why it never runs off the end.

Clopper-Pearson. The exact method. Find the lowest true rate at which seeing 16 or more of 18 would still happen at least 2.5 per cent of the time, and the highest true rate at which seeing 16 or fewer would. That pair is the interval. It never lies, but it is a little wider than it needs to be, which is a known trade: it guarantees at least 95 per cent coverage and usually delivers more. Write-ups that say "exact binomial interval" mean this.

For most work, Wilson is the sensible default, and the twelve-school trial's pass rate (its prediction P2), +13 percentage points with an interval of 10 to 16, is the kind of number these intervals produce. The Wald interval is worth recognising only so that you can distrust a report that gives a rate of 103 per cent, or an interval of exactly zero width.

Newcombe's method: the gap between two rates

School C's claim was not about one rate but about the gap between two. Both rates come from the start of this part. Of the 18 students with the guide, 16 passed, which is 88.9 per cent. Of the 18 students without it, 5 passed, and 5 ÷ 18 = 0.278, which is 27.8 per cent. The gap is 88.9 − 27.8 = 61.1 percentage points.

That gap is an observed number too, so it needs an interval of its own: the range of true gaps that could plausibly have produced it. The well-behaved way to get one is due to Robert Newcombe, from a 1998 article that compared eleven methods and recommended this one. It is built entirely out of Wilson intervals, and it takes five steps.

Step 1: find the gap. 88.9 − 27.8 = 61.1 points.

Step 2: put a Wilson interval on each rate separately. These are the intervals from the table in the previous section.

Group Passed Observed rate Wilson interval
With the guide 16 of 18 88.9% 67.2% to 96.9%
Without the guide 5 of 18 27.8% 12.5% to 50.9%

Step 3: measure how far each rate could be from its estimate, in each direction. Each interval reaches a certain distance below its observed rate and a different distance above it.

Group Could be lower by Could be higher by
With the guide 88.9 − 67.2 = 21.7 points 96.9 − 88.9 = 8.0 points
Without the guide 27.8 − 12.5 = 15.3 points 50.9 − 27.8 = 23.1 points

Step 4: find the lower end of the gap. The gap is smallest when the rate with the guide is really lower than it looked and the rate without is really higher. Those are the distances 21.7 and 23.1. Combine them the way you find the long side of a right-angled triangle from the two short ones: square each, add, and take the square root.

21.7² + 23.1² = 470 + 533 = 1,004, and the square root of 1,004 is 31.7.

So the lower end is 61.1 − 31.7 = 29.4 points.

Step 5: find the upper end. The gap is largest when the rate with the guide is really higher and the rate without is really lower. Those are the other two distances, 8.0 and 15.3.

8.0² + 15.3² = 64 + 233 = 298, and the square root of 298 is 17.3.

So the upper end is 61.1 + 17.3 = 78.4 points.

Steps 1 and 2: each rate with its own Wilson interval without the guide5 of 18 passed 27.8% 23.1 above15.3 below with the guide16 of 18 passed 88.9% 21.7 below8.0 above 0%20%40%60%80%100%pass rate Steps 3 to 5: the gap between them, with its interval gap 61.129.478.4 31.7 below, from 21.7 and 23.117.3 above from 8.0 and 15.3 020406080100gap between the two pass rates, in percentage points
Newcombe's method in one picture. The black distances in the top panel combine to give how far the gap reaches below 61.1. The gold distances combine to give how far it reaches above.

Why square and take the root, when the two distances could simply be added? Adding would say the gap might be as small as 61.1 − 21.7 − 23.1 = 16.3 points. But that needs both groups to have been misleading at once, as far as they plausibly could be and in opposite directions. Each of those is unlikely alone, and the two together are much less likely than either. Squaring and rooting gives a combined distance, 31.7, that is longer than either one and shorter than their sum. It is the rule from Part 3 again: uncertainties from separate sources add as squares, not as plain numbers.

The result is a gap of 61 points with an interval from 29 to 78. Read that as: the data are consistent with the guide adding anywhere from about 30 to about 80 percentage points to School C's pass rate, and not consistent with it adding nothing, because zero is nowhere near the interval. Notice that the interval is lopsided, reaching 32 points below the gap and only 17 above. A pass rate of 88.9 per cent has little room left above it and plenty below, and the method carries that through.

School C was where the guide made its biggest difference, and a small, dramatic result is exactly the kind that needs an interval beside it. Compare the twenty-four students of this series, where 7 of 12 with the guide and 5 of 12 without scored 70 or more, a top grade. The same five steps give a 17-point gap with a Newcombe interval from −21 to +48. That interval includes zero, which is to say that twelve students a side cannot tell you whether the guide changes that rate at all. Same arithmetic, and the honest answer is different, because the numbers are smaller and the gap is narrower.

Try it: intervals for a rate

Set two pass rates with the sliders and see the three intervals for each, plus Newcombe's interval for the gap between them. Push a rate to the edge and watch Wald misbehave.

Two things to try. Set group 1 to 18 of 18 and watch Wald announce a pass rate of exactly 100 per cent with no doubt at all, while Wilson says "somewhere above 82 per cent", which is what eighteen passes out of eighteen actually justify. Then keep the rates where they are and push both student counts to 200: the intervals shrink to a few points wide and the three methods converge, because with enough students the textbook formula stops mattering.

In Python

SciPy has the honest rate intervals built in, and it deliberately leaves out the Wald interval. Newcombe's method is a few lines on top of Wilson.

import numpy as np
from scipy import stats

# Intervals for a rate: 16 of 18 students passed
k, n = 16, 18
for method in ("wilson", "exact"):          # scipy has no Wald, because nobody should use it
    ci = stats.binomtest(k, n).proportion_ci(confidence_level=0.95, method=method)
    print(f"{k}/{n} {method:>6}: {100*ci.low:.1f}% to {100*ci.high:.1f}%")
p = k / n
print(f"{k}/{n}   wald: {100*(p - 1.96*np.sqrt(p*(1-p)/n)):.1f}% to {100*(p + 1.96*np.sqrt(p*(1-p)/n)):.1f}%")

# Newcombe's interval for the gap between two rates, built from two Wilson intervals
def wilson(k, n, z=1.959964):
    p, d = k / n, 1 + z*z/n
    c, h = (p + z*z/(2*n)) / d, z*np.sqrt(p*(1-p)/n + z*z/(4*n*n)) / d
    return c - h, c + h
def newcombe(k1, n1, k2, n2):
    p1, p2 = k1/n1, k2/n2
    l1, u1 = wilson(k1, n1); l2, u2 = wilson(k2, n2)
    d = p1 - p2
    return d, d - np.sqrt((p1-l1)**2 + (u2-p2)**2), d + np.sqrt((u1-p1)**2 + (p2-l2)**2)
d, lo, hi = newcombe(16, 18, 5, 18)
print(f"gap 16/18 vs 5/18: {100*d:.1f} points, {100*lo:.1f} to {100*hi:.1f}")

which prints:

16/18 wilson: 67.2% to 96.9%
16/18  exact: 65.3% to 98.6%
16/18   wald: 74.4% to 103.4%
gap 16/18 vs 5/18: 61.1 points, 29.4 to 78.4

Where this leaves us

A rate is a mean of ones and zeros, so it is an estimate with noise in it like any other mean, and it needs an interval beside it. The textbook interval fails for small counts and for rates near 0 or 100 per cent. The honest ones are Wilson for a single rate and Newcombe for the gap between two.

That completes the descriptive half of the series: a middle, a spread, and the special case of a rate. What none of it has answered is the question Part 1 posed: whether a gap of 12 marks, or 61 points, is more than the noise could produce. To ask that properly we first have to state exactly what we are claiming, which is the next part.


Next: The Claim and Its Shadow: what a hypothesis is, why every one comes with a null hypothesis attached, one-sided and two-sided claims, and the six predictions from the twelve-school trial written out as bets.