Overview
Even an accurate test can give mostly false alarms if the condition is rare. This uses Bayes' theorem to find the chance that a positive result is actually real.
Enter how common the condition is, the test's sensitivity and its false positive rate. For a medical result, always discuss it with a clinician.
Worked examples
| Inputs | Result |
|---|---|
| Prevalence (%)3Sensitivity (%)94False Positive Rate (%)7 | Posterior probability P(ConditionPositive): 29.34%False-alarm share among positives: 70.66% |
Show 2 more examples
| Prevalence (%)1Sensitivity (%)99False Positive Rate (%)5 | Posterior probability P(ConditionPositive): 16.67%False-alarm share among positives: 83.33% |
| Prevalence (%)20Sensitivity (%)90False Positive Rate (%)10 | Posterior probability P(ConditionPositive): 69.23%False-alarm share among positives: 30.77% |
How it works
Out of everyone who tests positive, some truly have the condition (prevalence × sensitivity) and some don't (the rest × the false positive rate). The chance a positive is real is the first group's share of all positives. Everything else is a false alarm.
The formula
| p | Prevalence |
| sens | Sensitivity |
| FPR | False positive rate, 100% − specificity |
Practical tips
- At 3% prevalence, 94% sensitivity and a 7% false positive rate, only 29.34% of positives are real.
- At 1% prevalence, even a 99% sensitive test with a 5% false positive rate gives about 16.67%.
- A second, independent test greatly raises confidence, because the prevalence for the second test is now the first test's result.
Frequently asked questions
Why are most positives false for rare conditions?
Because the healthy group is so large that even a small false positive rate produces more false alarms than true cases.
What's the false positive rate?
The share of people without the condition who test positive anyway. It equals 100% minus specificity.
Does this apply to spam filters and fraud alerts?
Yes, the same math applies to any test for something rare.