Twenty teams test a pill that does nothing at all. Guess how many find it “significant”, then watch their results land.
Significant by chance
Studies of a pill that does nothing, 30 people per group, each tested at 0.05 (seed 8282).
Twenty studies of a pill that does nothing. Each compares 30 people on the pill with 30 on a placebo, all drawn from the same bell.
Predict first. Of 20 studies of a pill that does nothing, how many will come out "significant", below 0.05?
Describe this picture
Three panels that stay apart. The first, “the population of studies”, shows the setting: one bell for pill and placebo alike, because the pill has no effect. The second, “one study”, shows the two groups of 30 people of one study as rows of dots, pill and placebo, with a line at each group’s mean, and the study’s p-value from a two-sided z-test. The third, “the p-values”, is a line from 0 to 1 with the stretch below 0.05 shaded. Before the clip a question asks how many of 20 studies will come out below 0.05: none, about one, or about five. A tap picks one and starts the clip. In the clip the 20 studies run (seed 8282) and their p-values drop onto the line one by one, stacking where they land; those below 0.05 are drawn in a second colour. One lands there, study 4. At the end a dashed line appears at 0.05/20 = 0.0025, Bonferroni’s stricter cut. Readouts count the studies, those below 0.05 and those below 0.05 divided by the number of studies. After the clip a slider sets the number of studies from 20 to 200 in steps of 10, and the dashed line moves to 0.05 divided by that number.
A pill that does nothing
Before the clip you guessed. The pill does nothing, yet about one study in twenty comes out “significant” at 0.05. In the clip’s run, 1 of the 20 did. That is not a fault in the studies. It is what the 5 % false-alarm level of Significance tests promises: when nothing is going on, 5 % of tests still cross the line.
Look at where the p-values land: spread evenly along the line from 0 to 1, with no pile anywhere. That is also no accident, as the section on even spreads below shows.
The p-value
A test with a fixed threshold says only “above” or “below”. A p-value says how far into the tail the result fell:
It is a chance computed as if were true. I write it , because a bare is a chance of success on this site. A small means: if nothing were going on, data this extreme would be rare. Rejecting whenever is the same as the 5 % test of the last page.
A coin. A coin said to be fair lands heads 61 times in 100 flips. If it is fair, the count is , and the chance of 61 or more heads is
That is the one-sided . If a result as far below 50 would have been just as surprising, count both tails: .
The bell gives nearly the same. With the half-bar step of The central limit theorem, , so the one-sided tail is and the two-sided .
Shuffling: a p-value you can count
Two page layouts were timed on four people each. The old layout took 10, 11, 12 and 16 seconds, mean 12.25; the new one took 14, 15, 17 and 19 seconds, mean 16.25. The new layout looks 4.0 seconds slower. Could that be chance?
If the layout makes no difference, the labels “old” and “new” are arbitrary: any four of the eight times could have been the “new” ones. So deal the eight times into two groups of four in every possible way, and see how often the difference is as large as 4.0.
Every way to shuffle the groups
Eight task times split into two groups of four in all 70 ways, by difference of group means.
Old layout 10, 11, 12, 16 s; new layout 14, 15, 17, 19 s. The new group is slower by 4.0 s on average.
Describe this picture
All 70 ways to split the eight task times into two groups of four, drawn as dots stacked on an axis of “difference of group means, new − old”, from −5 to 5 s. The observed split, old against new, is marked at 4.0 by a dashed line. The clip builds the stack split by split; then the dots at least that large are shaded: 3 of the 70, p-value 3/70 = 0.0429. Readouts count the splits shown, those at 4.0 or more, and the p-value. There is no control.
There are ways to choose which four times are “new”. Only 3 of them give a difference of 4.0 or more. So
one-sided, and counting a difference of 4.0 in either direction. This is a shuffle test, or permutation test: the p-value is a fraction of shuffles you can count. With 4 values per group the smallest p-value it can ever give is .
What a p-value is not
Watch out
Three readings of a p-value are common and wrong. Surveys find them widespread, even among people who teach statistics.
- ” means a 3 % chance that is true.” The p-value is computed by assuming is true; it cannot also be the chance that it is. How likely is depends on how plausible it was beforehand, as the base-rate section below shows.
- ” means a 97 % chance the result will replicate.” A repeat study has its own random result; with a modest effect it misses the line often.
- “A small means a large or important effect.” With enough data a tiny effect gives a tiny p-value. The size of an effect is read from an estimate and its interval, not from the p-value.
p-values when is true
Why did the twenty p-values spread evenly? For a continuous statistic, when is true,
A p-value below 0.05 happens 5 % of the time, below 0.5 half the time, below 0.01 one time in a hundred. The threshold on the p-value is a threshold on the statistic in other units, so the chance of falling below it is exactly its level.
With a real effect, p-values pile up near 0. For the bells 3 apart of Significance tests, a one-sided p-value falls below 0.05 with chance , below 0.01 with chance , and below 0.001 with chance .
Many tests
Run 20 independent tests of things that do nothing, each at 0.05. The chance that at least one crosses the line is
More likely than not, something looks significant. With independent tests it is .
The simplest fix, the Bonferroni correction, tests each of the at . For 20 tests that is each, and, for independent tests, the chance of any false alarm falls to , just under 5 %. After the clip, drag the number of studies and watch the lower line: it is the Bonferroni threshold.
How many discoveries are false
A small p-value does not say how likely an effect is to be real. That depends on how many of the ideas tested were real to begin with, the base rate of Bayes’ theorem.
Picture 1000 pills tested, of which 10 % really work. With power 0.8, the tests find 80 of the 100 that work. Of the 900 that do nothing, 5 %, or 45, also pass. So 125 pills come out “significant”, and 45 of them, 36 %, do nothing.
In general, if a fraction of the ideas tested are real, the share of “discoveries” that are false is
Here is a local letter for that share.
Worked example
1. The coin. For 61 heads in 100 flips: one-sided , two-sided . The test says that a fair coin would rarely do this. It does not say the coin is fair with chance 0.035.
2. The layouts. The shuffle test gives one-sided and two-sided. Whether the new layout counts as slower at the 5 % level depends on which question was fixed before the data: “slower” or “different”.
3. Twenty studies. Expected significant results: 1. Chance of at least one: . With Bonferroni at each: .
4. The pills. With 10 % real effects, power 0.8 and : 36 % of the significant results are false.
Try it yourself. In 5 tests of nothing at 0.05, the chance of at least one false alarm is . A coin that lands heads 7 times in 7 flips has one-sided . Under , the chance that is 0.5. In 100 tests of useless pills, expect 5 significant.
Where you’ll meet this
Reporting experiments. Papers in medicine, psychology and biology report p-values for their main results. Many journals now ask for effect sizes and intervals beside them, because a p-value alone says so little.
A/B tests. Checking a running test every day and stopping at the first is many tests in disguise, and it collects false wins.
Genetics. A genome scan tests hundreds of thousands of positions at once, so it uses thresholds far below 0.05, the Bonferroni idea at scale.
Headlines. “A study found a link” often means one test of many crossed 0.05. The base rate of real links among those tested decides how much it means.
In signal processing · many tests in a detector
A radar tests every range bin for a target, thousands per sweep. A threshold with a 5 % false-alarm rate per bin would fill the screen with false targets, so detectors set rates far smaller: the many-tests problem. Radar signal processing in the signal processing course sets such thresholds.
Reference card
| Quantity | Formula | Notes |
|---|---|---|
| p-value | computed assuming | |
| Two-sided | both tails | double a symmetric one-sided value |
| Shuffle test | share of shuffles at least as extreme | exact for small groups |
| Under | spread evenly on 0 to 1 | |
| Many independent tests | 0.6415 for 20 | |
| Bonferroni | test each at | |
| False discoveries | the share of real effects | |
| Not | the chance is true, the chance of replication, the size of the effect |