◈ quant roadmapPart 2 · Ch 17/45
Quantitative Finance — the Mathematics of Markets · chapter 17

17Hypothesis Testing, Honestly

Chapter 16 handed you one sentence and then walked away from its consequence. Your estimate is a single dot in a cloud you will never observe. That is a beautiful thing to know and a useless thing to hold, because a dot on its own means nothing at all. A dot can only be judged against a cloud. So the whole of this chapter grows out of one forced question: which cloud am I judging it against, and how far out on that cloud did my dot land? Everything you have heard about this subject is bookkeeping on that single picture. The p-value is a tail of it. α is a line drawn on it before you looked. The two errors are areas either side of that line, power is the same line measured on a second cloud, and a confidence interval is the same picture read backwards. You will build every one of those from a coin and 1,024 counted outcomes. You will also learn the one thing this machine can never hand you, and why that is a fact about its wiring rather than a warning about your manners. And near the end, twenty strategies made of pure noise will hand us a discovery with a Sharpe of 2.07 — honestly, with no fraud anywhere.

Look at what this page stands on. Chapter 9 gave us the sample space and favourable-over-total. Chapter 10 gave us Bayes, and the hard lesson that P(A|B) is not P(B|A). Chapter 12 gave us the Binomial pmf and the Normal curve. Chapter 13 gave us the √n law and the central limit theorem. And Chapter 16 gave us the object this chapter is about to point at something: the sampling distribution, plus a debt it flagged and did not pay.

Press VERDICT? on a lone dot — then give that same unmoved dot three different clouds and watch the verdict flip.
CH 16 HANDED YOU ONE DOT tap the dot, or press VERDICT? ▸ A DOT ALONE · no cloud named — so there is nothing to judge it against 1 · tail → the p-value 2 · the line → α 3 · a second cloud 4 · error I → cry wolf 5 · error II → a miss 6 · interval → range centre −6% −4% −2% 0% +4% +6% θ̂ = +2.0% · this never moves A dot on its own is not a result — it is only a number. It becomes a result only beside a cloud that somebody named.

Ask the dot for a verdict. Then hand it a cloud to be judged against.

the button is live — press it and see what a lone dot can tell you.

THE CLOUD YOU NAMED
centre
spread (SE)
z · SEs from centre
tail past the dot
Nothing named yet. The dot is a number, not yet a finding.
press VERDICT? ▸
What you're looking at — one unmoved dot, judged against three clouds you get to name
the dot — your estimate θ̂ = +2.0%, computed once from your data. It is fixed; nothing you press here moves it.
the cloud — what a named assumption says luck alone would produce. You choose it; the data cannot choose it for you.
the shaded tail — how much of that cloud lies past your dot. That area is the p-value, and it is a property of the cloud.
the six grey slots — six readings of this one picture. Each stays empty until the chapter fills it.
Fig. 1. The same estimate, judged three times. The dot never moves — the cloud does, and the verdict moves with it.

That is the gap. Chapter 16 built the cloud and left it hanging in space with nothing to compare against, and this chapter finally gives it a job.

01The verdict you cannot give

Here is a coin. I flip it ten times and it comes up heads eight times. Now tell me whether that coin is loaded.

Most people answer immediately, and the answer is some version of "probably, yes — eight out of ten feels like a lot." Sit with that sentence for a second, because it is not reasoning. It is a feeling about a number, and you have no benchmark to attach the feeling to. A lot compared to what?

Now the same problem in the clothes you will actually meet it in. A signal averages +0.08% a day over 60 trading days. Compounded, that is roughly +20% a year, which is a career. Chapter 16 already told you that this number is one dot in a cloud. So the honest question is not "is +0.08% good?" It is whether a world with nothing going on at all could have thrown a dot out this far.

Two pieces of evidence, one verdict dial — drag it wherever you like, and watch the same objection come back every single time.
TEN COIN FLIPS H H T H H H H H T H 8 heads, 2 tails — feels like a lot 60 TRADING DAYS +0.08% a day — +20% annualised YOUR VERDICT — DRAG IT ANYWHERE → LOADED · a real edge FAIR · pure luck ! on what evidence? you have not measured luck. verdicts you have tried: 0 tried · 0 answered You cannot settle this by staring at the evidence harder. Exactly one number is missing. Press the button to name it. P( a fair coin gives 8+ heads ) = ???
you say: honestly, no idea
Eight heads in ten. A strategy up 0.08% a day for 60 days. Drag the verdict slider anywhere you like — then read the red audit line under it.
What you're looking at — two piles of evidence, one dial, and a hole where the answer goes
The evidence — 8 heads in 10, and 60 days of +0.08%. Both are real, both are countable, and neither one says how often luck alone does this.
Your verdict — the dial you can park anywhere. Every position is a feeling. None of them is a measurement.
The audit, and the empty field it demands: P(8+ heads | fair coin). That one number turns the dial from an opinion into a reading — and you get it in §4.
Fig. 2. Park the dial at “clearly loaded”, at “pure luck”, at anything in between: the audit line never changes. That is not the figure being stubborn — it is the honest state of your knowledge. Eight out of ten is a count, not a verdict, until you know the rate at which a fair coin produces eight or more all by itself. Name that number and the dial becomes an instrument; leave it empty and the dial is a mood ring.

Notice what you just did with the slider. You could not deliver a verdict, and you could feel precisely which number was missing. You wanted to know how often a fair coin gives eight or more heads in ten flips. Nobody has told you that number yet, and until somebody does, the eight is just an eight.

This reframes what a test is for, and the reframing is the part most courses skip. A test is not machinery for confirming your claim. It is machinery for measuring the one rival explanation that is always sitting there, for free, in every dataset anyone has ever collected. That rival is luck. A result is not evidence until luck has been measured and found insufficient.

So the first job is to say which cloud we are judging the dot against. That requirement, and no convention anywhere, is what forces everything that follows.

02The hypothesis that computes

To draw a cloud you need a world with actual numbers in it. Not a story, not a direction, not a hunch. A fully specified model that a formula can eat.

We have two candidate worlds in front of us. One is interesting: the coin is biased. One is boring: the coin is fair. Every instinct says to assume the interesting one, because that is the thing we care about. So let us genuinely try it, and let us try it with the tool we already own.

Chapter 12 gave us the Binomial pmf, C(n,k)·pk(1−p)n−k. Feed it the interesting hypothesis and watch what the machine does.

A coin came up heads 8 times in 10. Two columns, one pmf — feed each a hypothesis and watch which one can actually be computed.
STEP 1 — which hypothesis should we assume? YOU FEED IT “the coin is biased” the pmf (Ch 14) — unchanged P(8) = C(10,8) · p^8 · (1-p)^2 C(10,8) 45 p^8 ? (1-p)^2 ? not started 0.7 ? 0.8 ? 0.9 ? YOU FEED IT p = 0.5 the pmf (Ch 14) — unchanged P(8) = C(10,8) · p^8 · (1-p)^2 C(10,8) 45 0.5^8 1 / 256 (1-0.5)^2 1 / 4 not started
STEP 1 — assume one of these ↓
biased to WHAT p? pick one:
pick a hypothesis to start
What you’re looking at — the same pmf, fed two hypotheses. Only one of them is a number it can eat.
“biased” halts the machine. The pmf is a function of p; “biased” names infinitely many p’s and chooses none. You must supply one — and each supplies a different answer.
H0: p = 0.5 runs. It is a single number, so 45 · (½)8 · (½)2 = 45/1024 = 0.0439 comes out the end.
Read the bar. H0 sits on the right of it — so everything the test emits has the shape P(data | H0). That is the p-value.
Hence P(H0 | data) is not a misreading — it is a quantity that was never in the machine. Writing it needs a prior (Ch 10), and no test asked you for one.
Fig. 3. Here is the whole reason the logic of a test runs backwards, and it is not a convention someone chose. The pmf from Ch 14 — P(8 heads in 10) = C(10,8)·p8·(1−p)2 — is a function of p. Feed it the hypothesis most readers pick, “the coin is biased”, and it gets three lines in before it stops and asks a question the hypothesis cannot answer: biased to what p? Supply 0.7, 0.8, 0.9 yourself and you get 0.2335, 0.3020, 0.1937 — three answers, and the hypothesis chose none of them. Feed it p = 0.5 and nothing stops, because 0.5 is a number: 45/1024 = 0.0439. Now press READ THE BAR. The thing that came out was P(8 heads | p = 0.5), and H0 is sitting on the right of that bar — we computed inside the world where H0 holds, so the only thing left for the left-hand side is the data. Every number this machinery will ever print has that shape. Try the flip and Ch 10 collects its debt: P(H0 | data) needs a prior, and the test never asked you for one. So the famous warning stops being pedantry and becomes an accounting identity — P(H0 | data) is not a misreading of the p-value, it is a quantity that never entered the machine.

The machine stalls. Not because assuming your own hypothesis is forbidden by some rule of statistical etiquette, but because the pmf is a function of a number p, and "biased" does not supply one. Biased to 0.8, or biased to 0.9? Those give different answers, and nothing in the hypothesis chooses between them. H₁, the alternative, is a whole family of worlds wearing one name.

Now feed the same formula the boring hypothesis instead. p = 0.5 is a single number, so the pmf runs straight through and returns everything: every outcome, with its exact probability. In particular P(8 heads | p = 0.5) = 45/1024 = 0.0439.

That is the whole derivation, and it is worth saying flatly. H₀, the null hypothesis, is not the thing you believe. It is the thing you can compute with. You test the boring hypothesis because it is the only statement precise enough to hand you a complete distribution of results, and the interesting one is not a statement at all yet. It is a family.

Everything lopsided about this subject comes out of that one asymmetry. You can reject H₀ but never accept it. The logic runs backwards, ruining the rival explanation instead of proving your own. And there is a third consequence that most readers never get told, so look at it directly now, before it can hurt you.

Look at where H₀ sits in P(8 heads | p = 0.5). It is on the right of the conditioning bar, and we are the ones who put it there. Everything downstream is computed inside the world where H₀ holds, which means the thing on the left of that bar can only ever be the data. So every number this machine will ever emit has the shape P(something | H₀).

Which tells you something sharper than the usual warning. P(H₀ | data) is not a misreading of the p-value. It is a quantity that was never inside the machine. To get it you would have to condition on the data instead, and the moment you try that, Chapter 10 tells you a prior is required. The test never asked you for one. We will price that gap exactly, a little later on this page.

03Drawing the cloud

One probability is not a cloud, so do the same computation for every outcome rather than only the one we happened to see.

There are ten flips, each with two faces, so there are 210 = 1024 possible sequences. Under p = 0.5 they are all equally likely, which means Chapter 9's favourable-over-total applies directly. Collapse each sequence to its head count and the 1,024 sequences pile into eleven bars.

Every one of the 210 = 1024 ten-flip sequences is on screen. Press COLLAPSE and watch them sort themselves into eleven piles — that pile-of-counts is the null distribution.
placed 0 / 1024 every sequence equally likely your 8 the data (one sample) 10 flips, once H H T H H H H T H H the statistic 8 heads hover or tap any bar — see the sequences inside it e.g.
guess the tallest pile first ↑
press COLLAPSE — count them all
blue = one whole sequence
gold = your 8, and worse
What you’re looking at — a null distribution with nothing taken on trust: 1024 outcomes, counted.
each speck is one entire ten-flip sequence; all 1024 are equally likely if the coin is fair. A bar’s height is its count — C(10, 8) = 45 is forty-five visible things, not a symbol.
the data is one sequence; the statistic is the single number 8. Shading 8-or-more gives 56/1024 = 0.055 — a tail area, read off a pile.
that 0.055 is P(8+ heads given a fair coin). It is not P(fair coin given the data) — Ch 10’s P(A|B) ≠ P(B|A), returning here as the costliest flip in statistics.
Fig. 4. A null distribution sounds like something handed down from a textbook. It is not. It is a pile of counted outcomes, and here is the whole pile. On screen are all 210 = 1024 sequences of ten coin flips — HHTHT…, every single one — scattered as a field of specks. If the coin is fair, every one of those 1024 sequences is exactly as likely as every other, which is the only assumption in the entire figure. Before you press anything, guess: which pile will be tallest, and how tall? Now press COLLAPSE. Each speck flies to the bar for its own head count, the tallies climb, and the running total lands on 1024 / 1024 — nothing invented, nothing dropped. Out come eleven numbers: 1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1. That is Ch 9’s favourable-over-total, run on a thousand cases: C(10, 8) = 45 stops being a symbol and becomes forty-five things you can hover and look at. There is no CLT here, no simulation, no formula — just counting. Underneath sits the data: one sequence, ten flips, eight heads. The arrow does the work of a whole lecture — it squeezes ten flips into one number, 8, and that number is a position in the pile. Press SHADE 8 OR MORE and the outcomes at least as extreme as yours light up: 45 + 10 + 1 = 56 of 1024, which is 0.055. That is the p-value, and you did not compute it — you read it off a picture. Every formula in the rest of this chapter (z, t, the normal approximation) is only a fast way to find that same position when the pile is too big to count. Now the sentence to guard with your life: 0.055 is P(8 or more heads given the coin is fair). It is not P(the coin is fair, given 8 heads) — the figure never even asked about the coin, it only ever counted sequences assuming fairness. That is Ch 10’s P(A|B) ≠ P(B|A) walking back in, and this is the room where it costs the most money: a desk that reads a small p as “probably a real edge” has silently swapped the two, and every conclusion downstream inherits the swap.

The counts are 1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1, and they sum to 1,024 exactly. Nothing was approximated and nothing was simulated. We counted. That is why C(10,8) = 45 can be pointed at on screen as a pile of actual sequences rather than a symbol you take on trust.

Keep two levels straight here, because one word is doing two jobs. The strip underneath the bars is the data: individual flips, HTHHTH and so on. The bars above are the test statistic, which is the one number the whole sample gets collapsed to. Here that number is the head count. The histogram describes the statistic, never the flips.

That histogram has a name, and it is the object the rest of the chapter reads off. It is the null distribution — the sampling distribution of the test statistic in the world where H₀ is true. Chapter 16 built exactly this kind of object for the sample mean. The only new thing is that a specific claim now owns it.

Mark 8 on its axis, and the number we collected finally has a cloud to be judged against. It is a cloud we built by counting rather than by trusting anybody's formula.

04How far out is far?

Now read the surprise off the picture. The obvious move is to quote the height of the bar we landed on: P(exactly 8) = 0.0439. Under 5%. Case closed?

No, and the reason is worth meeting head-on rather than being told. Look at the tallest bar in the whole picture. P(exactly 5 heads) = 252/1024 = 0.2461. That is the most likely single outcome there is, and it still only happens about a quarter of the time. On the point-probability rule, five heads is "somewhat surprising" too. Every outcome is individually unlikely, and for a continuous statistic like a mean return it is worse than unlikely — the probability of landing on exactly your value is zero, always.

So point probabilities cannot measure surprise at all. What can measure it is area: how much of the null's probability sits at or beyond where you landed. That is Chapter 3's definite integral doing inference work, and it is the only quantity on this picture that grows as your result gets more extreme.

Two rival rules for the word surprising. Break the first one in your own hands — then watch the second one survive being broken.
H0: A FAIR COIN, 10 FLIPS 252 / 1024 ▾ tap a bar POINT RULE · P(exactly 5 heads) 0.2461 the tallest bar of all eleven — and this rule calls it rare
1 · THE RULE
2 · THE STATISTIC
3 · WHERE THE PIN SITS
pin at k = 5 heads
4 · PREDICT, THEN REVEAL
8+ ≈ 1 in 4 · 0.2500
the modal result, called rare
What you're looking at — luck's own shape, judged by two rules, one of which cannot survive contact with it.
the null distribution: all 1024 equally likely flip sequences of a fair coin, piled up by how many heads they gave. Nothing is going on here — this is what luck alone does.
the point rule, P(exactly k). It calls k = 5 — the likeliest result there is — “rare” at 0.2461, and on a continuous statistic it reads 0.0000 at every single value.
the tail, P(at least as extreme). An area, not a height. It only grows as the result gets weirder, and it is still there after the statistic goes continuous. That is the p‑value.
your guess, marked on the meter. Eight-or-more heads is 1 in 18 one‑sided, 1 in 9 counting both ends. Most guts say one in three.
Fig. 5. Something happened: eight heads out of ten. Is that real, or is it luck? The honest first move — the one this whole chapter is built on — is to assume nothing is going on, work out what luck alone produces, and see where your result falls in that pile. The blue bars are that pile: a coin with no bias at all, flipped ten times, has 1024 equally likely head-tail sequences, and this is how they distribute. That is H₀, the null — not a ritual, just a picture of luck. Now the whole question becomes: how do you read “surprising” off this picture? The obvious rule is to read the bar you landed on. Try it — and watch it die in your hands. Park the pin at 5, the single most likely result there is, and the point rule returns 0.2461: under one chance in four, which by the same logic you would have to call surprising. It has just accused the mode of being weird. Then hit CONTINUOUS — because real statistics are rarely counts; they are returns, Sharpes, means — and the readout collapses to 0.0000 for every value on the axis. Of course it does: a single point has no width, so it encloses no area, so its probability is exactly zero. A rule that says everything is impossible has told you nothing. Only one thing survives both blows. Switch to TAIL and the shading sweeps outward from the pin, adding 45, then 10, then 156 of the 1024, 0.0547 — and it stays finite when the bars become a curve, because an area does not care whether the world is lumpy or smooth. It also behaves: push the pin further out and it shrinks; drag it inward and it grows. That is why the definition carries the clause “at least as extreme”. The clause is not pedantry bolted on by statisticians — it is the only version of the idea that does not fall apart. And it is worth feeling how badly the gut misprices it: most people guess eight-or-more comes up something like one time in three; it is one in eighteen one-sided, one in nine if you count eight-or-more tails as equally strange (which you should, unless you had a reason before flipping to care only about heads — that is the whole content of the one-tail/two-tail choice, and it must be made in advance). Hold on to the exact shape of the sentence you have just built, because the next figure will try to take it from you: 0.0547 is P(data this extreme, GIVEN the coin is fair). It is not the probability that the coin is fair. That inversion is Chapter 10's P(A|B) versus P(B|A) coming back wearing a lab coat, and it is the most expensive confusion in applied statistics.

Before the shading appears, commit to a guess. How often does a genuinely fair coin give eight or more heads in ten flips? Almost everyone says something like "rare — maybe one in fifty."

It is (45 + 10 + 1)/1024 = 56/1024 = 5.5%. Counting the other tail as well, because a coin biased toward tails would be just as interesting, it is 112/1024 = 10.9%. So the result that opened this chapter, the one that felt obviously loaded, is a thing a fair coin does about one time in nine.

Your gut was out by roughly an order of magnitude, and mine was too the first time, which is exactly the useful part. Everything after this you will believe a little less quickly.

That shaded area is the p-value, and here is the sentence to memorise exactly: it is the probability, in the world where H₀ holds, of a test statistic at least as extreme as the one you actually observed. The awkward clause is not bookkeeping, and it is the thing that makes the whole quantity mean anything at all.

There is one more decision hiding in the word "extreme", and it costs people real money. Extreme in which direction?

Twelve heads in sixteen flips — drag the tail token BEFORE or AFTER the data lands, and watch the verdict flip.
BEFORE THE DATA DATA LANDS AFTER THE DATA ▾ drop here ▾ drop here time drag me ↖ ↗ ONE-TAILED ↑ H₁ : p > ½ THE DATA 12 heads Same sixteen flips either way. The only difference is WHEN. Pick a tail, then drop the token before or after the data lands. IF THE COIN IS FAIR: 65,536 ways, all equal you saw 12 HEADS TAIL AREA p = 0.0384 reject ◀ α = .05 ▶ keep H₀
① WHICH TAIL COUNTS AS “EXTREME”
② WHEN DID YOU FIX IT?
Predict first: same 12 heads either way. Can the verdict flip just from WHEN you chose? Try both.
when did you fix the tail?
What you're looking at — one pile of luck, and a decision that is honest or dishonest depending only on its timestamp.
the null pile: all 65,536 equally likely ways 16 fair flips can land. Nothing here knows about your strategy — it is pure luck.
the tail area you agreed to call “extreme”. That shaded area is the p-value: P(data this extreme | H₀ true), read straight off the picture.
decided before: one tail, one p, and the test really does fire at or under your 5%.
decided after: the red bars are the ones you would also have called significant — the free extra shot that drags the true rate to 7.7%.
Fig. 6. Here is the whole trap in one line: a p-value is P(data this extreme | H₀ is true) — the probability of a result this surprising in a world where nothing is going on. It is not the probability that nothing is going on. That is Chapter 10's P(A|B) vs P(B|A) walking back in wearing a suit, and it is the most expensive confusion in applied statistics. But before you can even ask what the number means, you have to notice something quieter: the word “extreme” has a direction hidden inside it, and somebody has to choose that direction. Sixteen flips of a fair coin land on 65,536 equally likely sequences, and the blue pile here is every one of them sorted by how many heads came up. You saw twelve heads. If your question was “is this coin biased towards heads?”, then extreme means more heads, the tail area is the gold bars from 12 upward, and it comes to 2517/65536 = 0.0384 — under 5%, so you reject. If your question was “is this coin biased at all?”, extreme means far in either direction, both ends count, and the identical twelve heads reads 0.0768 — over 5%, so you keep H₀. Same coin, same flips, same arithmetic, opposite verdicts. Nothing about the data decided that. The question did. Which is why the timeline at the top is not decoration. Drop the token in BEFORE and you have run one test: one tail, one p, and under H₀ that test fires at or below the 5% you signed up for. Drop it in AFTER and the widget does exactly what a tired human does — looks at which way the coin leaned, picks that tail, reports 0.0384, and calls it a discovery. The audit is the part worth sitting with. Under that policy you would have rejected on twelve-or-more heads and on twelve-or-more tails, because you'd have swung the tail around either way. Those are the red bars: the shot you took but never counted. Add them up and the test you called “5%” actually fires 7.7% of the time on a perfectly fair coin. The free extra shot cost you exactly a doubling — which is precisely the two-tailed p you were trying to avoid reporting. So choosing the tail after seeing the direction is not a judgement call and not a rounding error; it is a second test billed as one. Hold that thought: in Chapter 19 we take the same arithmetic and run it not twice but two hundred times, which is what a backtest sweep over two hundred parameter settings actually is.

Take a different result: twelve heads in sixteen flips. Counted the same way, the upper tail alone gives p = 0.0384, which clears a 5% line. Both tails together give p = 0.0768, which does not. Same coin, same data, opposite verdicts, and the only difference is which question you asked.

So the tail is fixed by the question, before the data arrives. If you genuinely only care about one direction — a strategy is only tradable if it makes money — say so first and take the one-tailed test. If you would have been interested either way, you owe both tails. Choosing after you have seen which way the data went is not a judgement call. It is a free extra shot that you did not pay for.

05The bar points the other way

Let me ask you the question every practitioner gets asked in a meeting. Your backtest returns p = 0.03. What is the probability that this strategy has no edge?

The instinctive answer is 3%, and it is wrong in a way that is worth being precise about. The p-value answers "how weird is this data, if nothing is going on." The question asked "how likely is it that nothing is going on." Those are the two sides of Chapter 10's conditioning bar, and we already saw which side H₀ was nailed to.

The gut resists this, and it resists for a good reason. The wrong argument looks like clean logic: if H₀ then this data is unlikely, the data happened, so H₀ is unlikely. With plain true-or-false statements that argument is valid. With probabilities it smuggles something in, and the gut cannot see the smuggling. So let us not argue. Let us count.

One thousand candidate strategies, p pinned at 0.03 the whole way — drag the two things the test never gets to see, and watch “the chance there is no edge” swing from 5% to over 90%.
1,000 CANDIDATES · 100 ARE SECRETLY REAL (10%) α = 5% p = 0.03 · FIXED each dot = a strategy you could test · green = genuinely real THE DISCOVERY LEDGER true finds 80 false alarms 45 called a DISCOVERY 125 missed real edges 20 80 of 100 real ones caught you said 3% 0% — every discovery real 100% — every discovery noise 36% of your 125 discoveries are pure noise p = 0.03 all along. It sees neither dial. Commit before you touch anything. Your strategy tests significant at p = 0.03. What is the chance there is no edge? 3% — that’s the p roughly 30% can’t tell from p tap one ↑ — the sliders unlock the moment you do
answer the question first
One question before you touch anything. Pick an answer in the panel — the two sliders unlock the moment you do.
What you're looking at — the same p = 0.03, priced three different ways
Genuinely real strategies. You can see them; the test cannot. The catch rate is how many of them it actually trips — that word gets its proper name next section.
False alarms — worthless strategies that cleared the line anyway. α = 5% is the rate at which duds slip through, so 5% of a big pile of duds is a lot of them.
A gold ring = you called it a discovery. The ring is all the test can give you: it cannot see which dot underneath is green and which is red.
Fig. 7. You committed to an answer before you were allowed to drag anything — and your answer is pinned to the gauge in gold, where it stays put while the red bar swings past it. p = 0.03 never twitches. What moves is the prior (how many real edges are out there at all) and the catch rate (how many of them your test can see) — the two numbers the test is structurally blind to. Press show only my discoveries and the 875 you ignored fall away, leaving your actual pile: at a 10% prior and an 80% catch rate, 45 of those 125 winners are pure noise. Drop the catch rate to 30% and it is 60%. Same evidence. Same p. A completely different answer to “is there an edge?”

Here is your strategy pipeline for the year. You test 1,000 candidates, and suppose 100 of them genuinely have an edge. That is your prior, expressed as a count instead of a probability. You test every one of them at the 5% line, and your test catches 80% of the real ones.

Now count the two piles that come out of that year. The real edges give you 80 true finds. The 900 duds give you 0.05 × 900 = 45 false alarms. So you end the year holding 125 things you called discoveries, and 45/125 = 36% of them are noise — even though every single one had a p-value under 0.05.

Now drop the catch rate to 30%, which is a realistic number for a one-year backtest. You get 30 true finds against the same 45 false alarms, and now 60% of your discoveries are noise. The p-value never moved, because it sat at 0.03 the whole time.

This is exactly Chapter 10's medical-test table wearing a trading firm's clothes, and it is the same trap: the base rate is invisible because nobody counts the strategies they tested and threw away. The 900 duds never appear in anyone's mental picture, and they are nonetheless sitting there in the arithmetic.

And read what that table actually says about the p-value. Bayes gives P(H₀ | data) = P(data | H₀) · P(H₀) / P(data). The p-value is built from the first factor only. The other two are the prior and the total, and the test refuses to know either of them. So the machine supplied one of three ingredients. It could not possibly have returned the answer.

One phrase is doing damage here too, so let us kill it plainly. "Significant at 5%" does not mean "a 5% chance I am wrong". It is not the false-discovery rate either. That third thing, the one everyone thinks they are saying, does not exist as a number the test produces.

06Where to draw the line

A p-value is a continuous measure of surprise. But at some point you have to either allocate capital to this strategy or shelve it, and a decision needs a line.

So draw one on the null curve. Say the outermost 5% of it, and commit to that before you look at your data. That line is α, the significance level, and the value of the statistic where it falls is the critical value. Cross it and the verdict is reject H₀. Fall short and the verdict is fail to reject H₀. Those are the only two verdicts there are, and the second one is deliberately not called "accept".

Now the part that turns α from an arbitrary ritual into a machine you are holding. Take a thousand strategies that are genuinely worthless — an edge of exactly zero, built that way on purpose — and run the test on every one.

A real run: 1,000 strategies whose true edge is exactly zero. Slide the α gate and count how many of them the test calls a winner.
sim.py · numpy · seed 20260813 import numpy as np, scipy.stats as st rng = np.random.default_rng(20260813) r = rng.normal(0, .006, (1000, 60)) # every row's TRUE edge: exactly 0 se = r.std(1, ddof=1) / 60**.5 t = r.mean(1) / se p = 2 * st.t.sf(abs(t), 59) for a in (.10, .05, .01): print(a, (p < a).sum()) stdout tested 1000 true edge 0.0000% ---------------------- α=0.10 accused 102 α=0.05 accused 56 α=0.01 accused 13 ---------------------- loudest +0.2532%/day Sharpe 7.03 p 0.0011 1,000 p‑VALUES · ONE DOT EACH · ALL INNOCENT ACCUSED 56 p = 0 perfectly flat — under H0 every p is equally likely 1.0 ◆ CLICK the loudest, p=0.0011 zoom p 0→0.12 · drag the gate ↔ 0 .01 .05 .10 .12
α — THE GATE, SET BEFORE YOU LOOK
α = 0.050 · 1 in 20 innocents
THE RIGHT-HAND PANE
PREDICT — AT α = 0.05, HOW MANY OF THE 1,000 WORTHLESS STRATEGIES GET CALLED SIGNIFICANT?
Pick one first — then the gate will move to 0.05 and the machine will count for you.
α = 0.050 → 56 innocents accused
What you're looking at — a thousand strategies that are all, by construction, worthless.
one dot = one strategy's p‑value. Every single one was built with a true edge of 0.0000%. Their p‑values spread perfectly flat across 0→1 — that is what "innocent" looks like.
the α gate. A line you draw before looking. Everything left of it gets called significant.
the accused — innocents on the wrong side of the line. 102 at α=0.10, 56 at 0.05, 13 at 0.01. α is that fraction.
the loudest one: +0.2532% a day, Sharpe 7.03, p = 0.0011 — and an edge of exactly zero.
Fig. 8. This is not an illustration — it is a run. Nine lines of numpy, seed 20260813, and a thousand strategies whose true edge is not small but exactly zero: sixty days of returns drawn straight from a bell curve centred on nothing. Then the standard two‑sided t‑test on each one, and the p‑values piled onto the rail, one dot per strategy. Look at the shape before anything else. It is flat. Under H0 a p‑value is uniform on 0 to 1 — a p below 0.05 is not rare because it is impossible under the null, it is rare because only 5% of the null's own output lands there. That is the whole definition, drawn: p = P(data this extreme | H0 true). Now drag the gold gate. At α = 0.10 the machine accuses 102; at 0.05, 56; at 0.01, 13 — and every one of the accused has an edge of exactly nothing. α is not a property of your data. It is the fraction of innocent nulls you agreed in advance to convict, and the count obeys it because that is all it ever was. Click the loudest survivor and it gets worse: strategy #514 posts +0.2532% a day, compounds to +16.27% in sixty days, carries an annualised Sharpe of 7.03 — the kind of number that gets a desk funded — at p = 0.0011. A one‑in‑nine‑hundred result. It exists because we looked a thousand times. This is the exact trap of Chapter 10 wearing a lab coat: p answers how surprising is this if nothing is going on?, and the mind hears how likely is it that nothing is going on? — P(A|B) read as P(B|A), and here the flip costs real money. Finally, press coin?. Flip a fair coin ten times and you cannot spend 5% at all: rejecting on 9 or 10 heads (or 0 or 1) costs you 2.15%, and loosening by one flip jumps to 10.94%. There is nothing in between, so the honest test is conservative — it accuses fewer innocents than you budgeted for. Even α, the number everyone quotes to three decimals, is only ever a promise about a machine, not a fact about the world. Chapter 19 takes the thousand‑strategy search seriously; here it is enough to have watched it happen.

Fifty-six of them cleared the 5% line. That is what α is. It is not a property of your data and it is not the chance you are wrong. It is the fraction of innocent nulls you agreed, in advance, to accuse. Tighten to α = 0.01 and the count falls to 13, which is the same dial turned down.

Then look at the loudest one in that run, because it is the most useful number on this page. The best of those thousand worthless strategies averaged +0.25% a day over its 60 days, which annualises to a Sharpe ratio of 7.03, with a p-value of 0.0011. Nothing was rigged and there is no bug. We looked a thousand times, and looking a thousand times is what produced it.

The famous objection now answers itself without any help from us. Is p = 0.049 really different from p = 0.051? Obviously not, and the cliff is an artefact of forcing a continuous measure through a binary decision. The fix is not to abandon the line. It is to report the p-value itself, and treat α as where you have decided to act rather than where truth changes.

One honesty note, because our coin cannot actually do what those strategies did. With ten flips the statistic is discrete, so a 5% line has nowhere clean to land. The reject region k ≤ 1 or k ≥ 9 costs 2.1%, the next region out costs 10.9%, and there is nothing available at 5%. A discrete test is conservative: it spends less α than it advertises. That is why the thousand-strategy run above used a continuous statistic instead of a coin.

07The two ways to be wrong

Once a line exists, there are exactly two ways to be wrong. They live in different worlds, and that is why they need different names.

Start with a smoke alarm, because the world already named these for us. The alarm goes off while you are making toast. Nothing is burning, the alarm fired anyway, and that is a false alarm. Now the other one: a fire starts in the night and the alarm stays silent. Something is burning, the alarm said nothing, and that is a miss.

Two mistakes, two different worlds — and the price of each is what picks α, long before any numeral gets attached.
THE VERDICT THE WORLD ↓ ALARM SOUNDS reject H₀ ALARM SILENT fail to reject H₀ TRUE nothing is going on H₀ FALSE there IS an effect FALSE ALARM burnt toast, no fire — and it screams anyway. cost: a ruined breakfast TYPE I α = 5.0% · Type I rate CORRECT · QUIET no fire, no siren. the boring, good case. CORRECT · CAUGHT fire, and it wakes you. the alarm earns its keep. THE MISS a real fire, 3 a.m. — and it stays silent. cost: the house TYPE II β = 20% · Type II rate H₀ curve α RECOMMENDED α 5.0% 0% the 5% convention 50%
1 · ASSEMBLE THE BOARD
2 · ONE BOARD, TWO WORLDS
3 · PRICE OF A MISS drag →
a miss costs 2.1× a false alarm
α = 5.0% β = 20%
4 · TWO DESKS, TWO ANSWERS
press NEXT to build the board
What you’re looking at — one board, four worlds. The two mistakes sit on the diagonal, and they do not cost the same.
the false alarm: nothing was going on and you sounded off anyway — a phantom edge traded, capital bled slowly. Its rate is what α names.
the miss: something real was there and you sat still — the one true edge shelved. Its rate is β, and every drop in α pushes it up.
the two right calls — the dull majority. Nobody names these, which is exactly why the errors got stuck with numerals instead of names.
α is a price ratio, not a law: it is the tail area of the null curve and the top‑left cell’s rate — one line, two names. A market maker lands near 5%; a risk model near 20%.
Fig. 9. Type I and Type II are the worst-named objects in statistics: two numerals, no meaning, and a coin-flip every time you try to recall which is which. So meet them before the numerals do. Press NEXT and the board assembles one cell at a time, and notice what the two axes are — across the top, what you concluded; down the side, what was actually true. Two different things, and the mistakes live where they disagree. The false alarm: the toast burns, nothing is on fire, and the alarm screams the house awake. The miss: a real fire at three in the morning, and the alarm says nothing at all. You will never again need to ask which is which, because they do not live in the same world — one happens when there is nothing there, the other when there is. Now switch to TRADING DESK and the same two cells arrive with invoices attached: a false alarm is a phantom edge put into production, bleeding capital a basis point at a time; a miss is the one real edge of the year, tested, declared “not significant”, and shelved. Here is where the figure stops being a mnemonic and starts being a decision. Drag PRICE OF A MISS and watch the recommended α move — because the only sane way to set it is to balance what the two mistakes actually cost. A market maker, for whom a bad strategy in production is expensive and a missed one just means waiting for the next, lands near the famous 5%. A risk model, where a false alarm means an unnecessary hedge and a miss means being blind to a real blow-up, wants something nearer 20% — four times as loose, and correctly so. The 5% is a convention, not a constant of nature; it is a price ratio wearing a lab coat. And every drag makes the trade-off visible in both ribbons at once: push α down and β climbs, because the two errors are opposite ends of one dial, not independent knobs. Then the last beat, and the one worth keeping: hit THE NUMERALS and watch the gold shading lift off the tail of the null curve and land exactly on the top-left cell. That is not two facts. The tail area of the null distribution and the long-run rate of the false-alarm cell are the same line described twice — which is all the sentence “α is the Type I error rate” has ever meant. It is also, note, still a probability computed given H₀ is true: it tells you how often you will cry wolf in a quiet world, and says nothing whatever about whether this particular alarm is real. Power — the size of that β, and how much data it takes to shrink it — is the next figure.

Both errors have price tags in finance, and they are not the same size. A false alarm means you allocate capital to a strategy with no edge, then bleed it away in fees and spread. It hurts, it is measurable, and it is survivable. A miss means you shelve the one real edge you found all year, and nobody ever writes that loss down anywhere.

Swap the roles and the asymmetry flips completely. A risk model's job is to see the fire. Its false alarm costs a little unnecessary hedging. Its miss is the one that ends the firm. So the two errors are not symmetric, and the ratio of their costs is what should choose α for you. Five per cent is a convention, not a law of nature.

Only now do the numerals earn their place. The false alarm is a Type I error, and it lives on the null curve, past the line. The miss is a Type II error, and its rate gets the letter β.

Here is the piece that is usually handed over as a fact to memorise. The Type I error rate is α, by construction. It is not a second fact and it is not a coincidence. α was defined as the outermost 5% of the null curve, and a false alarm is exactly the event of landing out there when H₀ is true. That is one line described twice.

Which raises the obvious question about the other one. Where on this picture is β?

08The second curve

Go and look for β on the null curve. It is not there, and that absence is the tell.

A miss is failing to cross the line when something real is going on. The null curve is the world where nothing is going on, so it cannot possibly contain that event. β belongs to a different world, which means it is an area under a second curve — the sampling distribution of the same statistic when a specific alternative is true.

This is the rung almost every course skips, and skipping it is why so many people can recite the definition of β and cannot locate it on any picture. So let us draw the thing.

Only the null curve is drawn. Hunt for β on it — every tap comes back empty. Then draw the world it was hiding in.
WORLD A · H₀ TRUE — nothing is going on ↓ tap anywhere on this curve to find β −2 0 +2 +4 +6 WORLD B · H₁ · δ = 1.41 SE β MISS power 0.293 FALSE ALARM α = 0.050 drag ⇄ THE 2×2, LIVE WORLD A · H₀ TRUE keep H₀ ✓ 0.950 FALSE ALARM 0.050 sums to 1.000 WORLD B · H₁ TRUE MISS = β ✗ 0.707 DETECT ✓ 0.293 sums to 1.000 POWER = 1 − β WHERE β WAS not on world A.
STEP 1 — FIND β ON THE NULL CURVE
Tap anywhere on the blue curve. β is meant to be on it. Go and find it.
EFFECT — true Sharpe 1.00
DATA — 24 mo · √n = 22.4
α — 0.050 · cutoff |z| > 1.96
β is not on this curve
What you're looking at — two worlds stacked on one axis, cut by one rule, and the four things that can happen.
World A is H₀: no effect exists. The curve is what luck alone produces, in standard errors (SE = σ/√n, Ch 16).
World B is H₁ with a named effect δ. Same shape, shifted right. Drawing it is the admission price.
Both mistakes are red. Above the line: false alarms, area α. Below it: the β block — a real edge that lands inside the cutoff and gets called nothing.
Power = 1 − β: the part of world B that lands outside the cutoff. Effect size separates the curves, n narrows both, α only slides the line.
Fig. 10. Every textbook draws the null distribution and stops. That is why β feels unlocatable: you go looking for it on the only curve you were ever shown, and it genuinely is not there. Tap that blue curve as many times as you like — world A is the world where nothing is going on, and a world with no effect has no effect to miss. β is not hiding on it; it was never on it. Now press draw world B. A second curve slides in underneath: the same bell, the same width, shifted right by however big the real edge is. And in that instant all four cells of the 2×2 appear at once, as areas. Above the line: everything inside the cutoff is keep H₀, correctly, and the two red slivers outside it are false alarms — that is α, and it is an area under world A. Below the line: the big red block inside the cutoff is β, a real edge that landed close enough to zero to be waved away, and the green tail outside it is power = 1 − β. Each world's two areas sum to exactly 1.000, because each world is a complete accounting of what can happen given that you are in it. Notice what drawing the second curve cost you: a number. You cannot place world B without saying how big δ is. That is the whole reason H₁ can stay vague while you test — the p-value only ever needs world A — and must become a specific number the moment you plan. Now work the three levers and watch each one teach a different fact by eye. Effect size slides world B sideways: a bigger edge is easier to see, and separation is the only thing that makes detection cheap. n narrows both curves at once, because SE = σ/√n and the horizontal axis is measured in standard errors — more data does not move the truth, it sharpens both pictures until they stop overlapping. That is Chapter 16 doing visible work. α does neither: it only slides the line, so every square millimetre of red you take off the top you hand straight back at the bottom. Press α-only? and try to get both errors under 5% by moving the threshold. You cannot. It is a seesaw with one fulcrum, and no choice of α wins — then n unlocks and you succeed in about six years of daily data. Finally, the number every desk should have tattooed somewhere: Sharpe 0.5, one full year of daily returns, ordinary 5% test. Power = 7.9%. A genuinely good strategy, tested honestly, and you will fail to detect it more than nine times out of ten. Which reframes the most common sentence in research: “not significant” from an underpowered test is not evidence of no effect — it is evidence of no data.

Two curves, one critical line running through both of them, and suddenly all four cells of the world-by-verdict table are visible at once as four shaded regions. The area past the line under the alternative curve is the catch rate we were already using without a name. It gets one now: power, written 1 − β.

Notice what drawing that second curve just cost you. To place it on the axis at all, you had to name a specific effect size — not "the strategy works", but "the strategy makes 0.05% a day". H₁ was allowed to stay vague while you were testing. It has to become a number the moment you want to know whether your test could have seen anything.

That looks like the rules just changed, and it is worth saying out loud that they did not. Vague is fine for testing, because testing only ever computes inside H₀'s world. Vague is fatal for planning, because planning asks a question about H₁'s world and you cannot draw a curve without a centre for it.

Now take the three levers, and watch each one with your eyes rather than reading a rule. Pull the effect size up and the curves separate, so the overlap shrinks and power climbs. Raise n and both curves narrow at once, which is Chapter 16's SE = σ/√n doing visible work on two objects simultaneously. Slide α and something less comfortable happens: the two shaded errors trade against each other. You can shrink either one on demand. You cannot shrink both without paying in n.

Then the number that should change how you read every result you ever see. Take a genuinely real strategy with an annualised Sharpe of 0.5, and test it on one year of daily data at the usual 5% line. Its power is 7.9%.

Read that again, because it is not a rounding issue. The edge is real, and the test will fail to find it about 92 times in 100. At a Sharpe of 1.0 the power is still only 17%. So a non-significant result from a test like that carries almost no information, and writing it up as "no edge" is reporting a fact about your sample size as though it were a fact about the world.

09Measuring in wobbles

The coin was countable, and a mean return is not. Nobody is going to enumerate sixty days of prices into a grid of equally likely cases.

We do not need to. Chapters 13 and 16 already handed over the cloud for an average: it is Normal, centred on the true mean, with width SE = σ/√n. So put H₀'s claim into that cloud. The claim is no edge, which pins the centre at μ₀ = 0. That number gets a name, the null value, because in general it is whatever value H₀ nails the parameter to.

Now say our result out loud, twice. First: the signal averaged +0.08% a day. That sentence means nothing yet. Second: the day-to-day wobble of that 60-day average is 0.6/√60 = 0.0775%. Now the number says itself.

The signal is one wobble. That is it, and that is the whole measurement.

“+0.08% a day” says nothing until you also say how big one wobble is. Then the number says itself.
YOUR RULER — THE 60-DAY AVERAGE drag the UNIT dial → 0.080 % a day −0.2% −0.1% 0 +0.1% +0.2% one wobble = SE = 0.0775% the edge is 1.03 wobbles EVERY TEST LANDS ON THIS ONE CURVE 1.645 1.96 2.576 0 this curve only speaks wobbles — turn the dial p = — annualised Sharpe 2.12
UNIT DIAL — DRAG IT
units: PER CENT A DAY
DIVIDE BY WHICH WIDTH?
THE EDGE, % A DAY
+0.080%/day → z = 1.03
“+0.080% a day” — is that big? The number cannot say. No scale is attached to it yet. Turn the dial.
still in percent — no scale yet
What you're looking at — one needle that never moves, and a ruler that swaps its graduations under it.
the needle — your estimate, +0.080% a day. The dial does not touch it. Only the words printed on the marks change.
percent marks — the units you measured in. Honest, and completely mute about whether 0.08% is a lot.
wobble marks — one wobble = one SE = 0.0775%. Count them and the number says itself: z = 1.03, and 1.645/1.96/2.576 are the same for every test ever run.
the trap — dividing by σ (how far one day moves) instead of SE (how far the 60-day average wobbles). Same estimate, z collapses to 0.13.
Fig. 11. Here is a number a desk actually printed: the strategy made +0.08% a day over sixty days. Is that good? You cannot know, and neither can the number, because 0.08% a day is a quantity with no scale attached to it — like being told a bridge is “forty long” without being told forty what. So attach one. Over those sixty days the daily returns wobbled with σ = 0.6%, so the sixty-day average wobbles by SE = σ/√60 = 0.0775% — that is Chapter 16's result, and it is the only new ingredient here. Now turn the dial. Watch carefully what does and does not happen: the gold needle does not move one pixel, because nothing about the data changed. What changes is the ruler underneath it — the blue percent graduations fade out and cyan ones fade in, spaced one wobble apart, and the estimate that read 0.080 % a day now reads 1.03 wobbles. That is the entire content of standardising, and it deserves to be said in plain words before the symbol arrives: subtract the centre, divide by the width. Inches into metres. The letter z is just the name we give to a measurement quoted in wobbles, and the reason every textbook has one Normal table is that once you speak wobbles, every test on earth — returns, coin flips, click-through rates, drug trials — lands on the same curve with the same fixed marks at 1.645, 1.96 and 2.576. Two things then bite. The first is the trap sitting next to the dial: press σ 0.600% and watch the graduations blow up until they run off the ruler entirely and the same edge re-lands at 0.13. That is not a rounding error, it is a factor of √60, and it is the most common mistake in applied work — σ is how far one day moves, SE is how far the average of sixty days moves, and only the second one is the width of the thing you are testing. The second bite is the honest one. Park the dial at 1.03 and read the bottom panel: the gold tails hold p = 0.30. Three runs in ten of a strategy with no edge whatsoever would produce a sixty-day record at least this flattering. And the number printed beside it is an annualised Sharpe of 2.12 — a figure that would get a pitch deck taken seriously in any room in the world. Both are true at once. Sixty days is simply not enough rope: drag the edge up and you will find you need roughly +0.152% a day before this sample clears 1.96, which is nearly double the edge you actually have. A high Sharpe and a worthless result are not contradictory; they are what an underpowered test looks like from the inside.

The count of wobbles is the z-score, z = (x̄ − μ₀)/SE, and here it is 0.08/0.0775 = 1.03. Standardizing is a change of units and nothing more exotic than that. Subtract the centre, divide by the width, and you have converted per-cent-a-day into typical-wobbles. It is the same species of act as converting inches to metres.

What you get for it is enormous, though. Every test of this shape now lands on one curve, the standard Normal, so the α-lines sit at fixed places forever: 1.645 for a one-tailed 5% test, 1.96 for two-tailed 5%, 2.576 for two-tailed 1%. A "table lookup" is just reading an area off the picture you have been staring at since the coin.

One warning, and it is the most expensive routine error in applied work. The denominator is SE, the spread of the statistic. It is not σ, the spread of the data. Chapter 16 spent a whole section separating those two rulers because they are printed in identical units. Divide 0.08 by 0.6 instead of by 0.0775 and you get 0.13 instead of 1.03, which turns a discovery into a nothing or a nothing into a discovery depending on which way you slipped.

And now cash out what z = 1.03 means for our strategy, because the answer is genuinely uncomfortable. Two-sided, that is p = 0.30. Meanwhile the same numbers give a daily Sharpe of 0.08/0.6 = 0.133, which annualises to 2.12. A strategy with an annualised Sharpe above 2, and sixty days still cannot distinguish it from zero.

There is a lie in all of that, and Chapter 16 told us it was coming. SE = σ/√n contains σ, and nobody ever had σ. What we actually have is Bessel's s, computed from the same sample. Substitute it and the quantity changes character in a way that matters.

Before we look at the answer, commit to a guess. At n = 5, how far does using s instead of σ move the 5% line? Most people say a few per cent.

CodeRun — one perfectly Normal population, 200,000 samples at each n, seed 20260813. Standardise by the TRUE σ, then by Bessel's s from those same n numbers.
z = x̄ ÷ (σ/√n) σ = the TRUE spread — a fixed constant t = x̄ ÷ (s/√n) s = measured from the same n draws — RANDOM so now the DENOMINATOR is random too MEASURED · n = 5 ??.???? sealed — commit a guess first 200,000 standardised means, piled up · n = 5 sd(z) 1.0002 sd(t) ?????? −4 −1.96 0 +1.96 +4 you 2.40 t* 2.7804 $ python z_vs_t.py seed 20260813 · 200k/n sd(z) = 1.000 at EVERY n n 5% line rej 5 ??.???? ??.??% 10 ??.???? ??.??% 30 ??.???? ??.??% 100 ??.???? ??.??% a Normal would say 1.9600 for all four. 16,844 of 200,000 hit |t|>1.96 on a small s
SAMPLE SIZE nlocked
PREDICT · THE 5% LINE AT n=5drag →
RIGHT PANELtap
Where does the honest 5% line sit at n = 5? Drag the dial — your violet line moves with it — then press SEAL to print the real answer.
your line 2.40 · truth still sealed
What you're looking at — the SAME 200,000 samples from the SAME perfectly Normal population, standardised twice. Only the denominator changes.
z divides by the TRUE σ/√n. A fixed number, so only the numerator wobbles: sd 1.0002 at n = 5, and blue never moves as n changes.
t divides by s/√n, estimated from those same n numbers. Same centre, heavier shoulders — sd 1.4169 — because a denominator that lands small blows the ratio up. That is Student's t, and its n−1 is Ch 16's residual freedom: the residuals must sum to zero, so only n−1 of them are free. Same object, not a second coincidence.
the memorised 1.96. At n = 5 the honest line is 2.7804 (theory 2.7764) and 1.96 rejects a true null 12.20% of the time — then 6.01% at n = 30, 5.34% at n = 100. "Use t when n < 30" is that table rounded, not a law.
your sealed guess. The data here was perfectly Normal — t is not a rule for small or ugly data, it is the law of a ratio whose denominator is itself an estimate.
Fig. 12. Everyone is taught the rule and nobody is taught the reason, so here is a real run instead of an assertion: one perfectly Normal population, 200,000 samples at each n, every sample standardised twice. Once by the true σ/√n — a fixed number, so only the top of the fraction wobbles — and once by s/√n, Bessel's estimate computed from those same n numbers. Commit a guess before you look: drag the dial to where you think the honest 5% line sits at n = 5, and watch your violet line move onto the picture. Most people place it a few percent past 1.96. Press SEAL and the terminal prints what actually happened. The two piles share a centre exactly, and they are not the same shape: the spread of z is 1.0002 and the spread of t is 1.4169, and the cut that really contains 95% has moved from 1.96 out to 2.7804 — 42% further — against a theory value of 2.7764. Run the test at 1.96 anyway and you reject a true null 12.20% of the time, not 5%. Now unlock the stepper and watch the gold pile collapse back onto the blue one: 2.2673 at n = 10, 2.0498 at n = 30, 1.9901 at n = 100. Nothing about the data changed — the draws were flawlessly Normal at every n — so "use t when n < 30" was never a statement about small samples. Switch to DISSECT ONE and the mechanism is right there in a single sample: the same numerator over two different denominators. When the five draws happen to land bunched together, s comes out small, the estimated standard error shrinks below the true one, and the ratio inflates on the bottom rather than the top — z = 1.33 keeps the null while t = 2.50 rejects it, from the identical data. At n = 5 that happened to 16,844 of the 200,000 samples: crossing 1.96 on a small denominator alone. That is the whole content of the t-distribution. It is not a law for small data, it is the law of a ratio whose denominator is itself an estimate — and its n−1 is Chapter 16's residual freedom, the same object doing the same job, because the residuals must sum to zero and only n−1 of them can move. One cause, two chapters, no coincidence.

The numerator was already random, and now the denominator is random too. A ratio with a wobbly denominator occasionally comes out enormous purely because the denominator happened to land small. That is a fatter-tailed object, and it has a name: Student's t-distribution, with n − 1 degrees of freedom.

That n − 1 is not a new coincidence. It is Chapter 16's residual freedom, the same object doing the same job — the residuals must sum to zero, so only n − 1 of them can move.

Now read the measured numbers off that run. At n = 5 the two-sided 5% line is not 1.96 but 2.7764, which is 42% further out. Run the test at 1.96 anyway and you reject a true null 12.2% of the time instead of 5%. Then let n climb and watch the two histograms merge: at n = 30 the line is 2.045, at n = 100 it is 1.984.

So "use t when n is under 30" is a consequence, not a definition, and you can now retire it. The cause is that you estimated the denominator. Also note what t is not: it is not a distribution for a different kind of data, and our data here was perfectly Normal. t is the law of a ratio.

10One fraction, every test

Step back and look at what we actually built. It is one fraction.

t = (estimate − null value) / SE(estimate). Read it as signal over noise: how many typical wobbles separate what you measured from what the boring world claims. That is the entire apparatus.

One row: t = (estimate − null value) ÷ SE. Drop four different tests into it and watch which single cell is the only thing that ever changes.
THE TEMPLATE — SIGNAL ÷ NOISE tap any row ↓ TEST ESTIMATE NULL SE — this cell only t ÷ = ONE MEAN 24 months +2.00% x̄ of 24 months 0 H₀ 1.2247% s/√n = 6.00/√24 1.63 a strategy averaged +2% a month for 24 months — real, or luck? ONE MEAN 0 s/√n 1.63 TWO PROPS p̂B − p̂A 0 √(p̄q̄(1/nA+1/nB)) 2.34 SHARPE SR 0 1/√T 1.03 SLOPE β̂ 0 σ̂/√Σ(x−x̄)² 2.40 t = SR√T — SO YEARS OF TRACK RECORD NEEDED TO REACH |t| = 2: SR = 1.0 4 years SR = 0.5 16 years SR = 0.3 44 years DIAL SR = 2.117 0.9 years
DROP A FILLING INTO THE ROW
|t| = 2 after 0.9 years
THREE QUESTIONS — NOT A NAME
Meet a test you have never seen: two shop variants, average ORDER SIZE. No formula is given. If the row is real, three questions are enough to build it — and the name of the test never comes up.
t = 1.63 · 1.6 SEs from 0
What you're looking at — one row with three cells, and only the third one is ever different.
estimate — the number your data actually produced. Every filling has one; that is the whole first column.
null value — where H₀ pins it if nothing is going on. Read the column: it is 0 every single time.
SE — the width of the luck cloud around the estimate. This is the only cell that changes from test to test, and it is the only thing a test's name was ever telling you.
ohh — THAT'S why the zoo was never a zoo. t = SR√T is not a finance formula: it is this row with SE = 1/√T dropped in. Which is why Sharpe 0.5 needs 16 years to clear |t| = 2 — halve the signal and you quadruple the wait.
Fig. 13. Every stats course hands you a zoo: the one-sample t-test, the two-proportion z-test, the test for a regression slope, the Sharpe t-stat, and a hundred more, each with its own name, its own worked example, and its own place in a lookup table you are quietly expected to memorise. This figure is here to tell you the zoo does not exist. There is one row, and it is written across the top: estimate null value, all divided by SE(estimate). Read it out loud as signal ÷ noise — how far your number sits from where "nothing is going on" would put it, measured in units of how much it wobbles by luck alone. That denominator is Chapter 16's standard error, the width of the sampling cloud; the numerator is the distance you are trying to explain away. Now press the four fillings and watch the columns, not the numbers. The estimate column always holds whatever your data produced — an average return, a gap in conversion rates, a Sharpe, a fitted slope. The null column is more striking still: it reads 0, every time, in every row, because "no edge" and "no difference" and "no skill" and "no relationship" are all the same sentence. Only the SE cell, boxed in red dashes, ever changes — s/√n for a mean, √(p̄q̄(1/nA+1/nB)) for two proportions, 1/√T for a Sharpe, σ̂/√Σ(x−x̄)² for a slope. A test's name was never telling you anything except which SE to drop into that one slot. Which is why the honest reaction to an unfamiliar test is not to look it up but to ask three questions: what is being estimated, what does the null pin it to, and how wide is the luck cloud around it? Press blank the row & quiz me and you will answer exactly those three about a test that appears nowhere above — two variants, average order size — and the row will assemble itself out of your answers without its name ever coming up. Then look at the Sharpe row again, because it is the one that costs money. t = SR√T is not a special finance formula; it is this same row with SE = 1/√T dropped in, T being the length of the track record in years. Our 60-day signal scored a Sharpe of 2.117, and 60 days is 0.238 of a year, so t = 2.117 × 0.488 = 1.03 — the very number the wobble count produced earlier, arrived at from a completely different direction. Now drag the Sharpe dial and watch the strip along the bottom, which answers the only question a desk actually cares about: how long must you run this before the t-stat clears 2? Solve SR√T = 2 and you get T = (2/SR)², a squared relationship with brutal consequences. A genuinely excellent Sharpe of 1.0 needs 4 years. A good, tradeable, entirely respectable 0.5 needs 16. A 0.3 needs 44 years — longer than most careers, and far longer than most strategies survive. Halve the signal and you quadruple the wait. This is the arithmetic behind every backtest that "looked significant": if a two-year record cannot statistically distinguish a Sharpe of 0.5 from zero, then a two-year backtest declaring one has not measured skill, it has measured how many variants were tried. That last thought is Chapter 19's problem — multiple testing — and we flag it here rather than solve it. Regression inference gets its own treatment in Chapter 20, and the in-sample versus out-of-sample question waits for Chapter 21. What travels with you from this row is smaller and more useful than any of them: a test statistic is a distance measured in standard errors, the name is decoration, and the only genuinely difficult part of any test you meet for the rest of your life is getting that one red cell right.

Every named test you will ever meet is that one row with a different SE dropped into the denominator. One mean, a difference of two means, a regression slope in Chapter 20, a Sharpe ratio in Chapter 30. The estimate column changes, the null-value column is almost always zero, and the SE column is where all the actual work lives.

Point it at a track record and Chapter 16's arithmetic falls straight out: t = SR·√T. Check it against our own signal, where an annualised Sharpe of 2.117 over T = 60/252 = 0.238 years gives 2.117 × 0.488 = 1.033, which is the same z we computed from wobbles, to three decimals. Two completely different routes, one number.

That reading also prices a career. Reaching |t| ≥ 2 takes 4 years at a Sharpe of 1.0, 16 years at a Sharpe of 0.5, and forty-four years at a Sharpe of 0.3.

So when you meet a test you have never seen, do not go looking for its name. Ask three questions: what is being estimated, what number does the null pin it to, and how wide is that estimate's cloud. Answer those and you have the test, whatever it is called.

Now use the fraction backwards, which is where confidence intervals actually come from. So far we have interrogated one candidate value at a time: is μ₀ = 0 survivable? Nothing stops us from asking it of every value on the axis.

Sweep the null value across, and for each one ask whether the test would reject. The values that survive form an interval. That interval is the confidence interval, so it is not a new formula at all. Solve |θ̂ − θ₀| ≤ t*·SE for θ₀ and you get θ̂ ± t*·SE directly.

A hundred intervals and one line that holds still — draw samples, then freeze on yours and answer the question honestly.
θ — the truth, and it never moves yours ▶ no samples yet — press “draw another sample” → −4 −2 θ +2 +4
confidence level (same samples, new widths)
covered 0 / 0 — vs nominal 95%
Freeze one bar, then answer: P(it contains θ) = ?
press draw a sample →
randomness LIVE
What you're looking at — 100 separate studies, one truth, and only the bars move
θ, the true value — fixed, never random
an interval that crossed θ
one that missed — an unlucky draw, not a broken method
the one interval you actually got
Ohh — that's why: 95% describes the procedure across repeats, not your bar. Once yours is drawn the randomness is spent, so P(yours contains θ) is 0 or 1 — you just can't see which. Exactly the Ch10 flip: a p-value is P(data | H₀), never P(H₀ | data).
Fig. 14. One hundred repeats of the same study. θ is the one thing on screen that never moves; each interval is the random object, landing at its own centre and width. About 95 in 100 cross θ at the 95% setting — that is a property of the procedure. Freeze on one bar and θ vanishes, as it always is in real life: the honest answer to “what is the probability this interval contains θ?” is 0 or 1, and you cannot see which. That is the same flipped conditional as reading a p-value, P(data | H₀), as if it were P(H₀ | data).

Now the coverage statement, which is the single most misread sentence in statistics. People say "there is a 95% chance the true value lies in this interval", and that is not carelessness. It is a genuine confusion about which object is random, and both readings sound identical in English.

The picture settles it. θ is a fixed number and it never moves — it is the vertical line that holds still through all hundred rows. The interval is the random thing, redrawn with every sample. About 95 of the hundred bars cross the line and about five do not, and those five are not defective, because they were simply unlucky draws. Once your interval is on screen, nothing in it is random any more. The randomness was spent when you drew the sample.

And the interval and the p-value were never competitors. They are two readings of one picture.

The interval is the test, read backwards — sweep the hypothesized value across the axis, and the ones that survive are the interval.
H₀'s cloud — re-centred on every θ₀ you try gold tails = p · a gap this big, by luck alone θ̂ = +0.080 · fixed, it is your data −0.075 +0.235 click the axis, or drag the slider → two green marks sit on the axis — predict, or sweep, to see what ties them p 1 .001 α 0.306
DRAG θ₀ · THE VALUE H₀ CLAIMS
t = +1.03 · t* = 2.001
α · WHERE YOU DREW THE LINE
PREDICT · WHERE p CROSSES α, THE INTERVAL'S EDGE IS…
Drag θ₀ across the axis. Every stop gets judged and painted. What are those two green marks?
θ₀ = +0.000 survives · p = 0.306
What you're looking at — one test run at every hypothesized value at once, and the survivors collected.
the curve — H₀'s cloud, re-centred on whatever θ₀ you claim. Your estimate θ̂ = +0.080 never moves.
the tails and the gauge — the p-value: how often luck alone opens a gap this wide.
green cells — every θ₀ the test let live. That block is the interval, −0.075 to +0.235.
red cells — rejected: the tail shrank past α.
Fig. 15. The same signal as before — θ̂ = +0.080% a day with SE = 0.0775 on 59 degrees of freedom — but now the question is asked of every candidate value, not just of zero. Drag θ₀ and the null curve slides to sit on it while your estimate stays nailed down, because the data never changes; only the claim does. The gold tails are the p-value, and the gauge reads it on a log scale so the crossing is visible rather than crushed into the floor. Every value you visit is painted: green if the test let it live, red if it did not. Run the sweep and the survivors turn out not to be scattered at all — they are one solid block, −0.075 to +0.235, which is precisely the 95% confidence interval you would have got from the formula. The tie lines say why: "survives" means |θ̂ − θ₀| ≤ t*·SE, and rearranging that one inequality for θ₀ gives θ̂ ± t*·SE. Same sentence, read from the other end. Switch α and watch the block breathe: at 0.01 it widens to −0.126–+0.286, at 0.10 it tightens to −0.049–+0.209. And note what the block tells you that p = 0.306 never could — it names the sizes of effect your data cannot rule out, and that range still spans a losing strategy and a very good one.

Drag the hypothesized value across the axis and watch the p-value rise through α at exactly the moment the value crosses the interval's edge. That is what duality means here. The interval is the set of null values that would not be rejected, which is why it carries more information than a p-value: it reports the size of the effect, not only the surprise.

Let us cash the whole template out on the test a quant actually runs most weeks. Two order-routing algorithms, 1,000 orders each: algorithm A fills 540 of them and algorithm B fills 500.

Fill in the template's row. The estimate is p̂₁ − p̂₂ = 0.04 and the null value is 0. The SE comes from Chapter 12's Bernoulli variance p(1−p), divided by n by Chapter 13's √n law, and added across two independent arms.

One detail in that SE is stated in every textbook and justified in almost none. You compute it with a pooled fill rate, p̂ = 1040/2000 = 0.52, rather than with the two separate rates. Here is why, and it comes straight from the keystone. We are drawing the cloud that H₀ generates, and in H₀'s world there is exactly one true fill rate. Estimating two of them would be estimating something that world says does not exist.

CodeRun — the weekly A/B test: 540 fills against 500, 1,000 orders per arm. Pooled or unpooled? And was 1,000 even enough?
$ python ab_test.py --n 1000 arm A 500/1000 pA = 0.5000 arm B 540/1000 pB = 0.5400 gap pB - pA = +0.0400 H0: ONE rate p = 0.5200 SE = sqrt( p(1-p)(2/n) ) = 0.022343 z = 0.0400 / 0.022343 = 1.7903 two-sided p = 0.0734 NOT SIGNIFICANT (alpha .05) # power: the move nobody makes power vs a TRUE +4pt = ????? n per arm for 80% = ????? p < 0.05 only from n = 1199 H0’S WORLD POOLED arm A arm B ONE rate = 0.5200 both arms drink from ONE urn POWER · true gap +4pt 43.3% 80% 0 43% @ 1000 80% @ 2450 500 5000 SEALED was 1,000 per arm enough? answer it, then this opens
WHICH SE?tap
SEALED PREDICTIONpick one
p = 0.073, not significant. Was n = 1,000 per arm ENOUGH to catch a real +4pt gap?
ORDERS PER ARMdrag →
Both SEs agree to 4 dp. Pooling isn’t about the number — it’s about WHOSE world.
p 0.0734 · NOT significant
What you’re looking at — one week’s A/B test, run end to end, then cross-examined. p answers “how weird is this if H0 is true?” — never “is H0 true?”
H0’s world has ONE fill rate, so the noise is measured there: pool both arms into 1040/2000 = 0.5200 and SE = 0.022343.
z = gap / SE = 1.7903 — signal over noise — and p = 0.0734. Drag n and watch p slide under 0.05 at n = 1199 on rates that never moved.
the slip: unpooled estimates two rates inside a world that has one. It only shifts SE by 0.000018 — the reason to pool is logic, not size.
power = 43.3% at n = 1,000; 80% needs about 2,450 per arm. So “not significant” convicted the experiment, not the algorithms.
Fig. 16. Here is the whole template cashed out on the test a desk actually runs. Arm B filled 540 of 1,000 orders, arm A filled 500, and the honest first move is to ask how often luck alone makes a gap that big. That question is asked inside H0’s world — and H0’s world has exactly one fill rate, so you pool both arms into 1040/2000 = 0.5200 before computing the noise. Flip the switch to UNPOOLED and the urn splits in two: you have just estimated two rates in a world that has one. It moves the SE by 0.000018, which is the point — you don’t pool for the number, you pool because the noise must be measured where the null lives. Then z = 0.0400 / 0.022343 = 1.7903, signal over noise, and p = 0.0734. Not significant. And that is where almost every desk stops. Answer the sealed question and the second half opens: against a genuinely real +4pt gap, this test had a 43.3% chance of ever seeing it — worse than a coin flip — and 80% power needed about 2,450 orders per arm, not 1,000. Now drag n on rates that never change and watch p slide under 0.05 at n = 1199. Significance was bought with orders. So “p = 0.073” never said the algorithms are the same; it said this experiment was too small to tell — a verdict on the test, not on B.

That gives SE = 0.0223, so z = 0.04/0.0223 = 1.79 and the two-sided p = 0.073. Not significant. Most memos stop there and write "the algorithms are the same," which is a claim the data cannot support.

So make the move almost nobody makes, and compute the power. Against a true four-point gap, this test had a 43% chance of detecting it. It was a coin flip whether a real difference would show up at all. To get to 80% power you needed about 2,450 orders per arm, not 1,000.

Notice what just happened. The chapter's own machinery convicted the experiment, not the algorithms. That distinction is roughly the whole difference between a practitioner and a person quoting a number.

11What the machine can never do

Three closing honesties, and each one is a habit rather than a formula.

The first honesty: you never accept H₀. Failing to reject is failing to see, which is not the same as seeing nothing. We just watched a real four-point gap go undetected by an experiment with 43% power, and we watched a real Sharpe-0.5 edge survive a whole year of testing unnoticed 92 times in 100. Absence of evidence is not evidence of absence, and now you can put a number on the difference.

The second: significance is not size. These are two different words and they must stay two different words.

Two dials, two verdicts — the n-dial moves only significance, the cost-dial moves only profit. Neither one can do the other's job.
significance_vs_size.py python CODE 1 2 3 4 5 6 7 8 edge = 0.001 # %/trade sigma = 0.2 # %/trade n = 1,000,000 se = sigma/sqrt(n) t = edge/se p = 2*(1-Phi(t)) ci = edge ± 1.96*se cost = 0.00200 %/RT STDOUT SE = 0.000200 %/trade t = 5.00 p = 0.00000057 CI = [0.00061, 0.00139]% AHA — n moves only gold. Blue never crosses red. AXIS 1 · STATISTICAL dial 1 → t = signal ÷ noise 0 1.96 5 10 16 t = 5.00 p = 5.7e-7 AXIS 2 · ECONOMIC dial 2 → edge per trade, % · vs cost cost 0.00200 −.003 0 .001 +.005 net = −0.00100 %/trade
PREDICT — CAN MORE DATA FIX IT?
A real edge of 0.001% a trade. Seal a guess, then push n. One verdict moves. The other never does.
DIAL 1 — n, THE SAMPLE SIZE
n = 1,000,000 · t = 5.00
DIAL 2 — ROUND-TRIP COST
cost = 0.00200 %/trade
SIGNIFICANT: yes · p=5.7e-7
WORTH TRADING: no · net −0.00100
What you're looking at — one genuinely real edge, judged twice, by two questions that never touch.
t and p — the statistical axis. t is the edge measured in standard errors; p is the tail area beyond it. Dial 1 (n) moves this and nothing else.
the 95% interval — every per-trade edge the data cannot rule out. More n shrinks it onto 0.001%; it never walks it anywhere.
the cost line and the shaded loss zone left of it. Dial 2 moves this and nothing else — it is the only dial that can flip verdict 2.
the white tick at 0.001% — the true edge, and the 1.96 gate on axis 1. Both are fixed facts; no sample size touches either.
Fig. 17. Here is a strategy that is not a fantasy: it really does earn +0.001% a trade, and you have measured it over 1,000,000 trades whose per-trade noise is σ = 0.2%. Run the eight lines. The standard error is σ/√n = 0.2/1000 = 0.000200% — Chapter 16's formula, unchanged — so the t-statistic is t = 5.00, which is nothing more exotic than the edge measured in standard errors: a signal-to-noise ratio. Feed it to the normal tail and p = 0.00000057. That is not "significant"; that is significant past every threshold anyone has ever proposed, by a factor of about ninety thousand. And the 95% interval prints [0.00061%, 0.00139%] against a round-trip cost of 0.002%the entire interval sits below the cost line. Every edge the data cannot rule out still loses money on every single trade.

So seal a guess before you touch anything: can more data fix that? Most readers say yes, because a p-value of 0.00000057 feels like a statement about how good the strategy is. Press push n → 10M and watch the two panels disagree. The gold bar sprints from t = 0.16 to t = 15.81, blowing through the 1.96 gate at about n = 154,000 and dragging p from 0.87 down to roughly 1e−56. Meanwhile the blue interval does exactly one thing: it shrinks onto 0.001%. It does not drift right. It cannot — look at line 4, where n lives. n enters through se and nowhere else, so it can only ever change how precisely you know the edge, never how big the edge is. More data does not make this strategy profitable; it makes you more and more certain that it isn't. Then move the second dial. Drop the cost under 0.001% and the second verdict flips instantly, at any n you like. One dial owns one verdict; neither can do the other's job.

Which is the whole point, and it is Chapter 10 walking back in through a different door. A p-value is P(data this extreme | H₀ is true). It is not P(H₀ is true | data), and it was never P(this is worth trading | data) either — a question about money that no tail area was ever asked. Flipping a conditional felt harmless when it was mammograms and base rates; here it is a desk trading a genuinely real edge into the ground with a t-stat of 5 pinned to the wall behind it. That is why the phrase must stay two words: significance is a claim about luck, and size is a claim about money, and a large enough n manufactures the first while leaving the second exactly where it found it. (How the same arithmetic gets abused when you search hundreds of variants for the best-looking t-stat is Chapter 19's problem, and it is worse than this one.)

Here is an edge of 0.001% a trade — a tenth of a basis point — measured across a million trades. The standard error collapses to 0.0002%, so t = 5.00 and p = 0.00000057. That is about as significant as anything in finance ever gets. And the 95% interval runs from 0.00061% to 0.00139% a trade, while the round-trip cost is 0.002%. The entire interval sits below the cost.

So the edge is real, overwhelmingly significant, and loses money on every single trade. Large n manufactures significance without manufacturing anything worth having.

The third honesty is the one that opens the next chapter, and it is arithmetic rather than a warning. When H₀ is genuinely true, the p-value is uniform on [0,1]. Every value is equally likely, by construction, because p is the tail area at your own randomly-placed statistic.

CodeRun — 10,000 tests where H₀ is TRUE, then 20 strategies built from pure noise. Seed 20260813, nothing hidden.
A · 10,000 TRUE nulls one test, H₀ true the tail area is the p-value 452 0 p‑value 0.5 1 mean of the 10,000 p’s 0.5022 p < 0.05 · 452/10,000 4.52% B · 20 looks at nothing TRUE EDGE, BUILT IN 0.0000% 5% line 0 |t| 1 1.96 2.6 press LOOK · 0 of 20 tested no winner yet · nothing to ship 12‑month return Sharpe · max drawdown
PREDICT · HITS IN 20pick one
PANEL Atap
PANEL B · THE SEARCHpress ↓
Panel A measures the rectangle. Panel B spends it: 20 noise strategies, α = 5%, and 1 − 0.9520 = 0.6415 — a false hit is more likely than not.
20 looks at nothing. Predict first.
What you're looking at — the same 5% of a flat rectangle, measured on the left and then spent on the right.
10,000 p‑values from tests where H₀ is true every time. Counts 950…1039, mean 0.5022: a p‑value under a true null is uniform on [0,1] — not "usually big".
the tail area a random statistic cuts off. Press WHY IS IT FLAT: the statistic is random, so its tail area is random too — and a tail area is uniform by construction. That is the whole proof.
the slice below 0.05: 452 of 10,000 = 4.52%. Take 20 looks and P(at least one) = 1 − 0.9520 = 0.6415. Ours hit at |t| = 2.071, p = 0.0393.
the same noise with every daily return's sign flipped: +20.21%, Sharpe 2.07, drawdown 4.17%. True edge, throughout: 0.0000%.
Fig. 18. Ask what a small p‑value means and almost everyone answers the same way: p = 0.0393, so there's a 96% chance this strategy is real. That sentence is the single most expensive mistake in applied statistics, and this figure is built to make you watch it fail with your own eyes. A p‑value is P(data this extreme given H₀ is true). It is not P(H₀ is true given the data). Those are the two conditionals of Chapter 10 — P(A|B) versus P(B|A), the same machinery that turned a 99%-accurate test into a coin flip — returning here in their most costly form. Panel A pins down the first one exactly. Ten thousand tests were run in a world where nothing is going on, every single time, so we know H₀ is true; the p‑values pile into ten bins as 950, 1007, 1026, 982, 1005, 992, 1018, 1039, 958, 1023. That is not a hump near 1, which is what most readers expect. It is a flat rectangle, mean 0.5022. Press WHY IS IT FLAT? and the mechanism shows itself in one move: a random statistic lands on the null curve, the tail area beyond it sweeps out, and that area drops onto the p axis. The statistic is random, so the area it cuts off is random too — and the area beyond a random draw is, by construction, uniform on [0,1]. There is no fine print. A p‑value under a true null is a fair spinner. Which fixes the number that matters: 452 of 10,000 landed below 0.05 — 4.52%, the 5% you asked for, because 5% of a flat rectangle is 5% however many times you draw. Panel B then spends that number. Twenty strategies are built from pure noise; the plate reading true edge 0.0000% never changes, because there is nothing there to find. Press LOOK and test them one at a time — and notice the widget will not let you stop when you like, because the whole trick of a search is that you only remember where you stopped. Their |t| values run from 2.071 down to 0.053 and exactly one clears the line, at p = 0.0393. Nothing went wrong. No fraud, no bug, no bad data: 20 × 5% is one expected false hit, and P(at least one) = 1 − 0.9520 = 0.6415 — a false discovery in twenty honest looks is more likely than not. The winner's equity curve draws in and it loses 16.81%, which feels like a reprieve until you press FLIP SIGN. Reverse every daily return — buy where it sold — and the identical noise becomes +20.21%, Sharpe 2.07, maximum drawdown 4.17%: a tearsheet any desk would fund, from a strategy whose edge is exactly zero. (The coincidence is not one: over a single year of daily data a Sharpe of 2.07 is a t‑statistic of 2.07 — t = Sharpe × √years — so the significance and the tearsheet are the same number wearing two hats.) Press RERUN a few times and the tally reports back: sometimes two hits, sometimes none, roughly two runs in three with at least one — 0.6415, arriving on schedule. So the p‑value never lied. It answered its own question honestly and we asked it a different one. It says this would be surprising if nothing were going on; we heard nothing is going on. The gap between those two sentences is where the money goes, and Chapter 19 is about closing it: how to correct for the fact that you looked twenty times, and what happens to your answer when you finally supply the thing a p‑value never had — the base rate of real edges before you started searching.

Ten thousand true nulls, and the histogram of their p-values is a flat rectangle — decile counts 950, 1007, 1026, 982, 1005, 992, 1018, 1039, 958, 1023. Read the consequence straight off that rectangle. Five per cent of a flat rectangle is five per cent, no matter how many times you draw from it.

So twenty honest tests on pure noise produce, on average, one result under 0.05. The chance of at least one is 1 − 0.9520 = 64%. We ran exactly that: twenty strategies, every one of them made of noise with an edge of exactly zero. One of the twenty came back at p = 0.0393. Traded in the direction the test pointed, it returns +20.2% for the year, with an annualised Sharpe of 2.07 and a maximum drawdown of 4.2%.

There is no fraud in that, no bug, and nothing anyone would call p-hacking, because it is simply what twenty looks does. Which means a p-value is a property of your result and of the search that produced it, and reporting one without the other is reporting half a number.

The fixes that are actually in reach are small and boring. Pre-register the hypothesis, the tail and α before you look. Report intervals and effect sizes rather than verdicts. Count and disclose the looks. Chapter 19 is where the looks get priced properly, with Bonferroni and false-discovery-rate control, and where the prior this chapter kept refusing to supply finally gets handed over.

Six slots were planted in Fig. 1. Here they are — filled, all six on the same cloud. Name the feature before you click.
ONE CLOUD · SIX READINGS click a reading ▸ name the feature first every reading below is a feature of THIS one curve — pick one a real effect lives here the cloud a boring world would make dashed = t · σ estimated, fatter tails 95% CI α = 0.05 −2 SE 0 +3 SE +5 SE your result · z = 2.2 1 7 · the one missing P(H₀ | data) empty needs a plug a prior → Ch 19 PART 2 · WHERE THIS TAIL TURNS UP NEXT 17here 18two vars 19the looks 20slopes 21in / out 27N(d₂) 30Sharpe 32fat tails

Before each click: say out loud which part of the curve that reading is. Then press and check.

FEATURE — none lit yet

Six rules is six things to memorise. One object with six features is one thing to see. Every reading in this chapter is a part of the curve a boring world would generate — except one.

read 0 of 6 · the 7th cannot be lit

click a reading ▸
What you're looking at — the whole chapter as one object, not six rules
the cloud — what luck alone produces if H₀ (nothing going on) is true. Every reading is a feature of it.
your result, its tail (the p‑value) and its interval — the gold parts move only when your data does.
the line you drew at α and the false alarms past it — Type I error is the cloud's own area, by construction.
the second cloud, where the effect is real — past the same line is power, behind it is the miss.
Fig. 19. Every piece of apparatus in this chapter is a feature of one object: the cloud a boring world would generate. The tail is the p‑value; the line is α; the cloud's own area past that line is Type I error; the same line on a second cloud is power; the centres that survive are the confidence interval; and which cloud exactly is the z‑versus‑t question. The seventh reading — the probability the boring world was true — has no feature anywhere on the picture, because it needs a prior the test never asked for. That is Ch 19's door.

Look back at what you are holding. It is one picture: the cloud a boring world would generate. The p-value is its tail. α is a line drawn on it before the data. Type I error is the area past that line, power is the same line measured on a second cloud, and a confidence interval is the set of boring worlds that would have tolerated your data. Whether it is z or t is only the question of which cloud exactly.

That is one object with six readings, in place of six rules with no object. And it has a permanently missing seventh reading, which is the probability that the boring world was true. Chapter 18 takes the same machinery and points it at two variables instead of one, where a new and much more seductive error is waiting.

iolinked.com
Written by Ajai Raj