AUROC Calculator

Turn a reported AUROC into sensitivity, specificity, PPV and NPV at a threshold and prevalence you choose. AUROC is the same at every threshold and every prevalence, so one AUROC fits very different PPVs; drag along the ROC curve to see the trade-off.

AUROC = P(score of a random case with disease > score of a random case without) = integral from 0 to 1 of sensitivity d(1 − specificity)

The chance that a randomly chosen case with disease scores higher than one without, which is also the area under the ROC curve. It averages over every threshold and ignores prevalence, so PPV and NPV need two more things: where the threshold sits and how common the disease is.

Input Parameters

Area under the ROC curve, also called the C statistic. 0.5 is chance; 1 is perfect ranking.
Percent of people with the disease where the test will be used, e.g. 3 for 3%. AUROC does not change with prevalence; PPV and NPV do.
Operating point
ROC curve shape (equal variances, b = 1)
SD of scores without disease divided by SD of scores with disease. 1 gives the symmetric curve. Below 1, common in imaging studies, means scores in disease are more spread out, which skews the curve toward high specificity; any value other than 1 makes the curve dip below the chance line at one end.

Calculated Statistics

Enter an AUROC and prevalence

Positive Predictive Value (PPV) --
Negative Predictive Value (NPV) --
SensitivityOn the ROC curve at this operating point --
SpecificityOn the ROC curve at this operating point --
Youden index JSensitivity + specificity − 1 --
Likelihood Ratio (+) --
Likelihood Ratio (-) --
Flagged positiveShare of all cases the test calls positive --

Drag the operating point

Every point on the ROC curve has the same AUROC. Drag the point on the curve, the line on the right or the sliders to trade sensitivity for specificity, and watch PPV and NPV at your prevalence.

Enter an AUROC and prevalence to explore operating points.

PPV and NPV across prevalence

Sensitivity and specificity at the operating point are held fixed while prevalence changes. Click or drag to set the prevalence.

Enter an AUROC and prevalence to draw the curves.

PPV and NPV by AUROC and prevalence

Each point is a test with the AUROC on the vertical axis, used at the prevalence on the horizontal axis.

PPV

NPV

2×2 Contingency Table (per 10,000 people)

Disease PresentDisease AbsentTotal
Test Positive------
Test Negative------
Total----10,000

Report summary

Plain-language summary of the inputs, the assumptions and the results, ready to paste into a note or a manuscript.

Enter an AUROC and prevalence to build the summary.

Key Formulas

AUROC = P(X_disease > X_no disease) = ∫₀¹ Sens d(1 − Spec)
Binormal ROC curve: Sens = Φ(a + b·Φ⁻¹(1 − Spec)), AUROC = Φ(a / √(1 + b²)), so a = √(1 + b²)·Φ⁻¹(AUROC)
Equal variances (b = 1): a = d′ = √2·Φ⁻¹(AUROC); maximum Youden index at Sens = Spec = Φ(d′ / 2)
Any b: maximum Youden index where (b² − 1)z² + 2ab·z + a² − 2 ln b = 0, with z = Φ⁻¹(1 − Spec)
At prevalence p: PPV = Sens·p / [Sens·p + (1 − Spec)(1 − p)], NPV = Spec(1 − p) / [Spec(1 − p) + (1 − Sens)p]
LR+ = Sens / (1 − Spec) is the slope from (0, 0) to the operating point in ROC space; post-test odds = LR+ × p / (1 − p)
Equal-PPV lines run through (0, 0): Sens = (1 − Spec) × [PPV / (1 − PPV)] × [(1 − p) / p]; equal-NPV lines run through (1, 1)

References

  • Hanley JA, McNeil BJ. The meaning and use of the area under a receiver operating characteristic (ROC) curve. Radiology. 1982;143(1):29-36. doi:10.1148/radiology.143.1.7063747
  • Metz CE. Basic principles of ROC analysis. Semin Nucl Med. 1978;8(4):283-298. doi:10.1016/s0001-2998(78)80014-2
  • Youden WJ. Index for rating diagnostic tests. Cancer. 1950;3(1):32-35.
  • Saito T, Rehmsmeier M. The precision-recall plot is more informative than the ROC plot when evaluating binary classifiers on imbalanced datasets. PLoS One. 2015;10(3):e0118432. doi:10.1371/journal.pone.0118432
  • Pepe MS. The Statistical Evaluation of Medical Tests for Classification and Prediction. Oxford: Oxford University Press; 2003.

Assumes the ROC curve is binormal, which fits many scores well but is not guaranteed; a published curve can bend differently, so the sensitivity at a given specificity here is an estimate. Also assumes sensitivity and specificity carry over to your population, which fails when case mix or disease spectrum differs. Results are point estimates without confidence intervals; for those, use the 2×2 counts in the Diagnostic Calculator. For a reported F1 score, see the F1 Score Calculator.