Base rates
How common something is can matter more than how good your test is. See what happens to the same test when prevalence changes.
What runs in CodeSplash
- Diagnostic accuracy (sensitivity, specificity, PPV, NPV) Verified in Python and R
You will be able to
- Compute a predictive value from sensitivity, specificity and prevalence
- Predict how a positive result's meaning changes with the base rate
- Connect base rates to false discoveries among significant results
Read first
How common is it?
ReadThe base rateBase rateHow common something is before you look at any evidence about the case in front of you. is how common something is before you look at any evidence. It's easy to forget, because it isn't part of the test result, yet it can decide what the result means.
In a liver-scan study, sensitivity is 89.5% and specificity is 62.8%. Disease was common among those scanned: 75.0%. So a positive scan meant disease 87.8% of the time.
Same test, different clinic
PredictPredict first
You use the same scan, with the same sensitivity and specificity, in a clinic where only 10% of patients have the disease. What happens to the chance that a positive scan means disease?
Reveal
It falls a lot, to about 21%:
Sensitivity and specificity barely changed, and the meaning of a positive result changed completely.
Move the prevalence
ExploreGuess first. Then change Prevalence, Sensitivity and Specificity, and watch PPV and NPV. Which change moves PPV the most when a disease is rare?
HExplorable · What a positive test means
If a good test comes back positive, how likely is the disease?
A person tests positive. What is the chance they have the disease?
- Disease, test +: 19
- No disease, test + (false positive): 49
- Disease, test − (missed): 1
- No disease, test −: 931
Commit your prediction above to see the result
Make your prediction to see the result.
Base rates for hypotheses
ExploreThe same arithmetic applies to research. Treat each study as a test of an idea, with the share of true ideas as the base rate, power as sensitivity, and as specificity.
Lower Share of studies with a real effect and watch False discoveries.
BExplorable · Truth and decision: the four quadrants
Out of many studies, how many significant results are real?
Of the significant results, what share will be false alarms?
- Real effect, significant: 50
- No effect, significant (false alarm): 45
- Real effect, missed: 50
- No effect, not significant: 855
Commit your prediction above to see the result
Make your prediction to see the result.
Check your reading
CheckpointCheck yourself
A test has 95% sensitivity and 95% specificity, and the disease affects 2% of people. What is the positive predictive value? Give two decimals.
Show the answer
Answer: 0.28
Out of 10,000: 200 have it, and 190 test positive. Of the 9,800 without it, 490 test positive. So .
Check yourself
Why do screening programs often retest people who first test positive?
Show the answer
Answer: b
Those who tested positive are a group with a higher base rate. The posterior from one test becomes the prior for the next, if the two tests' errors are reasonably independent.
Check yourself
A team tests many long-shot ideas at α = .05, with low power. What should you expect of its significant results?
Show the answer
Answer: a
The α controls how often true nulls get flagged, and it doesn't set the share of flags that are false. When true effects are rare and power is low, false alarms can dominate.
Adjust for a different prevalence
In the appIn a diagnostic accuracy analysis, turn on Predictive values at another prevalence and set the Population prevalence for your setting. Then the card reports PPV and NPV for that setting as well.
Where do you see this?
ReflectThink of an alert you rely on: a fraud flag, a monitoring alarm, a churn score. How common is the real event? Out of 100 alerts, how many would you guess are real?
Recap
Recap- A predictive value depends on the base rate as well as the test.
- A good test for a rare condition still produces mostly false positives.
- The same logic applies to significant results: rare true effects and low power mean many false alarms.
Concepts in this lesson