LearnROC Curves and Diagnostic Accuracy
Advanced10 min readSource-backed

ROC Curves and Diagnostic Accuracy

Evaluate the diagnostic performance of a test or prediction model using ROC curves, AUC, sensitivity, specificity, and optimal cutoff selection.

You'll learn

How to evaluate diagnostic test performance using sensitivity, specificity, and AUC.

Use this when

You have a biomarker or clinical score and want to assess its diagnostic accuracy.

Sensitivity and Specificity

Sensitivity and specificity are the fundamental measures of a diagnostic test's performance at a given cutoff threshold.

  • Sensitivity (True Positive Rate) = TP / (TP + FN): The proportion of true cases correctly identified. High sensitivity → few false negatives. A sensitive test is good for screening (you don't want to miss any cases).
  • Specificity (True Negative Rate) = TN / (TN + FP): The proportion of true non-cases correctly identified. High specificity → few false positives. A specific test is good for confirmation (you need high confidence when positive).
  • Tradeoff: Lowering the threshold increases sensitivity but decreases specificity, and vice versa.

Mnemonic: "Spin" (Specificity rules IN — high specificity ⟹ positive test rules in disease); "Snout" (Sensitivity rules OUT — high sensitivity ⟹ negative test rules out disease).

The ROC Curve

The Receiver Operating Characteristic (ROC) curve plots sensitivity (y-axis) against 1 - specificity (false positive rate, x-axis) across all possible cutoff values. It visualizes the tradeoff between sensitivity and specificity across the full range of thresholds.

  • A perfect test: The curve goes straight up to (0, 1) then across → AUC = 1.0
  • A useless test: The curve follows the diagonal → AUC = 0.5 (no better than random)
  • A good test: The curve bulges toward the top-left corner
  • The optimal cutoff: Often chosen using the Youden index = Sensitivity + Specificity - 1 (maximizes correct classification)

Area Under the Curve (AUC / C-statistic)

AUC (Area Under the ROC Curve) is the single-number summary of a test's discriminative ability. It represents the probability that a randomly selected positive case will have a higher test value than a randomly selected negative case.

  • AUC = 0.50: No discrimination (useless)
  • AUC 0.50–0.70: Poor
  • AUC 0.70–0.80: Acceptable
  • AUC 0.80–0.90: Excellent
  • AUC > 0.90: Outstanding

Compare two tests or models using DeLong's test for the difference between AUC values. A larger AUC is not always clinically better — consider the relative costs of false positives vs. false negatives in your clinical context.

Positive and Negative Predictive Values

Sensitivity and specificity are fixed properties of a test. Predictive values depend on disease prevalence in your target population.

  • PPV (Positive Predictive Value): Given a positive test, what is the probability the patient truly has the disease? PPV decreases as prevalence decreases.
  • NPV (Negative Predictive Value): Given a negative test, what is the probability the patient is truly disease-free?
  • A test with excellent sensitivity/specificity can still have poor PPV in a low-prevalence population (high false-positive rate in screening programs).

Read next

Reading Kaplan-Meier Survival Curves

Learn to read, interpret, and critically evaluate Kaplan-Meier curves — the standard visualization for time-to-event data in clinical research.

Advanced11 min read
Read next