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 chance of rejection under its null, the chance of at least one rejection among tests is . 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 to control the probability of any false rejection at no more than when the individual tests are valid, even without independence. Prespecify a primary outcome, report the search and treat discoveries as candidates for fresh confirmation.
- Unadjusted: independent tests
- Bonferroni error bound
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
A saved draft is open. To run the published example, open Editor tools and select Restore example. Recover draft brings your code back.
Execution error
Technical error details
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?
Your result
Result tools
Searching across 20 metrics yields many more false alarms than a single test under this model. Bonferroni uses a stricter cutoff for each test.
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?
Hints for this question
- Describe the whole procedure that generated the reported finding.
- Include the outcomes that did not look interesting.