Challenge your conclusionLesson 24 of 30 · 7 min

Look often enough and something looks special

Explain why selecting the smallest p-value changes the false-positive rate.

A false positive is rejection of a true null hypothesis under a specified decision rule. A test with a 0.05 false-positive rate under its assumptions does not give the same rate to a procedure that runs twenty tests and reports only the smallest p-value.

If tests are independent and each has a 0.050.05 chance of rejection under its null, the chance of at least one rejection among mm tests is 1−(1−0.05)m1-(1-0.05)^m. Independence is an assumption of this formula, not a general property of many metrics.

The simulation uses independent normal metrics with no mean effect. A Bonferroni rule compares each p-value with 0.05/m0.05/m to control the probability of any false rejection at no more than 0.050.05 when the individual tests are valid, even without independence. Prespecify a primary outcome, report the search and treat discoveries as candidates for fresh confirmation.

One test versus a search
012.52537.55000.250.50.751ProbabilityNumber of tests
012.52537.55000.250.50.751ProbabilityNumber of tests
P(any false rejection)=1−(1−0.05)mP(\text{any false rejection})=1-(1-0.05)^m
P(any false rejection)=1−(1−0.05)m\begin{gathered}P(\text{any false rejection})\\=1-(1-0.05)^m\end{gathered}
  • Unadjusted: independent tests
  • Bonferroni error bound
Reference formula under independent true-null tests with a 0.05 false-positive rate each. With 20 tests, the chance of at least one false rejection is about 64%. The dashed Bonferroni bound needs valid individual tests, but not independence.

Will twenty independent null tests produce at least one p<0.05 in only 5% of experiments?

Write a prediction (optional)

Run the prepared example

This page puts the example in the Python editor. Select Run Python with the code unchanged.

Seeded simulation

Editor tools
About Python ↗

Ctrl+Enter or ⌘+Enter runs the code.

What to compare

Compare Any p<0.05 fraction with Independent-test formula. Then compare both with Any Bonferroni rejection fraction. Which rule accounts for checking several metrics?

Published example output

The site ran the original code to produce this reference. Build environment ↗

Any p<0.05 fraction: 0.645
Independent-test formula: 0.642
Any Bonferroni rejection fraction: 0.033

Searching across 20 metrics yields many more false alarms than a single test under this model. Bonferroni uses a stricter cutoff for each test.

Change and run again

In the Python editor, change m = 20 to m = 1 and select Run Python. Repeat with m = 50. Compare the three printed fractions. How does checking more metrics affect the chance of any false alarm under each rule? Return to the Python editor

What this example supports. The simulation uses independent metrics. Real outcomes can be correlated and may require a multiplicity strategy suited to the scientific question.

Try a fresh case

You inspect 40 outcomes and report the only one with p<0.05. What must the report disclose?

Choose an answer

Hints for this question
  1. Describe the whole procedure that generated the reported finding.
  2. Include the outcomes that did not look interesting.
Your notes