How to use it
- From a table. Fill in the four cells: true positives, false positives, false negatives and true negatives. The rates and their 95% intervals appear as you type.
- From rates. Switch to “Prevalence and rates” if you only know how common the condition is and what the test’s sensitivity and specificity are. The predictive values then follow from Bayes’ theorem. No counts means no intervals.
- The address bar holds your numbers, so a link brings the same table back.
What each figure is
| Condition present | Condition absent | |
|---|---|---|
| Test positive | TP | FP |
| Test negative | FN | TN |
- Sensitivity = TP / (TP + FN): of those with the condition, the share the test finds.
- Specificity = TN / (TN + FP): of those without it, the share the test clears.
- Positive predictive value = TP / (TP + FP) and negative predictive value = TN / (TN + FN): how often a positive, or a negative, result is right. They change with how common the condition is.
- Likelihood ratios: LR+ = sensitivity / (1 − specificity) and LR− = (1 − sensitivity) / specificity.
- Diagnostic odds ratio = (TP · TN) / (FP · FN), which equals LR+ / LR−.
The intervals
Each interval is a Wilson score interval at 95% (z = 1.96). It stays inside 0 to 100% and does not collapse at 0 or 100%, which the familiar p ± 1.96·√(p(1 − p)/n) does. Sources: E. B. Wilson, Journal of the American Statistical Association 22 (1927); R. G. Newcombe, Statistics in Medicine 17 (1998).
Example. Of 1,000 people, 100 have the condition and the test finds 90 of them; of the 900 without it, the test wrongly flags 90. Sensitivity 90%, specificity 90%, but only 90 of the 180 positives are real: the positive predictive value is 50%.