Chance, Spread and What to Expect
Four Times the Data for Half the Error
Last timeLearning From What You Saw
The spread of an average shrinks with the square root of the number of draws, which settles averages down, makes precision expensive, and promises nothing about any single draw.
Measure the latency of a hundred requests and take the average. You have a
number. Now do it again tomorrow with a hundred different requests and you have a
different number. The average is not a fact about the service; it is a quantity
with a distribution of its own, and this lesson is about that distribution.
It turns out to be derivable in two lines from what is already in hand. The
expectation of the average is the expectation of a single draw, which follows
from the addition rule and needs no independence. The spread is where the
interesting part is.
- the variance of a single draw, the spread of the thing being measured
- how many independent draws are averaged
- the variance of the average, smaller than the single draw variance by the whole factor n
Variance is in squared units, so the readable version takes a square root, and
the square root is the whole story of this lesson.
- the typical distance between your average and the truth, often called the standard error
- one draw's own spread divided by the square root of the count, which is the only part of it you can buy
Notice which of the two quantities in that fraction is under your control. The
single draw spread is a property of the thing being measured, and it is divided
by one. The count is divided by a square root. So a change that halves the
underlying variation is worth the same as a fourfold increase in data, and it is
usually far cheaper. Pinning the machine a benchmark runs on, warming the caches,
or pairing each measurement against a control all attack the numerator, and
experienced experimenters reach for them long before they reach for more
samples.
The lesson stops here
3 more paragraphs to go
You have read the opening. The rest of the argument, the problems that check whether it landed, and the lines worth keeping at the end all come with a plan.
The first lesson of every course in the library reads the whole way through, free, so you can see exactly what the rest of them are.
See the planThe contentsThis is the reading half
Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.
The contents