Research toolsDiagnostics

Diagnostic accuracy

Evaluates a diagnostic or screening test against a reference standard, producing sensitivity, specificity, predictive values, likelihood ratios and Youden's index — and projecting the predictive values onto any prevalence you specify.

Disease presentDisease absent
Test positive
Test negative

Optional. Recomputes the predictive values for a population with this prevalence.

Results

Sensitivity
90.0%95% CI 82.6% to 94.5%
Specificity
80.0%95% CI 71.1% to 86.7%
Positive predictive value
81.8%95% CI 73.6% to 87.9%
Negative predictive value
88.9%95% CI 80.7% to 93.9%
Likelihood ratio, positive
4.50
Likelihood ratio, negative
0.125
Accuracy
85.0%
Youden's index
0.700
Prevalence in this sample
50.0%200 observations

Sensitivity and specificity are properties of the test. Predictive values are not — they move with prevalence, which is why the projection field exists.

When to use it

  • Reporting a diagnostic accuracy study.
  • Appraising a published test before adopting it in a different population.
  • Showing why a test that performs well in a specialist clinic can perform badly as a population screen.

Formula

                 Disease +    Disease −
  Test +            TP           FP
  Test −            FN           TN

  Sensitivity = TP / (TP + FN)        Specificity = TN / (TN + FP)
  PPV         = TP / (TP + FP)        NPV         = TN / (TN + FN)
  LR+         = Sens / (1 − Spec)     LR−         = (1 − Sens) / Spec
  Accuracy    = (TP + TN) / N         Youden's J  = Sens + Spec − 1

Predictive values at a specified prevalence π, by Bayes' theorem:

  PPV = ( Sens · π ) / ( Sens · π + (1 − Spec)(1 − π) )
  NPV = ( Spec · (1 − π) ) / ( (1 − Sens) · π + Spec · (1 − π) )

Proportions are given Wilson score confidence intervals.

Worked example

A test evaluated in 200 people: 100 with the disease and 100 without.

True positives
90
False negatives
10
False positives
20
True negatives
80

Sensitivity 90.0% (82.6 to 94.5). Specificity 80.0% (71.1 to 86.7). LR+ 4.50, LR− 0.125. Youden's J 0.70.

In this sample, where prevalence is 50%, the positive predictive value is 81.8%. Projected onto a population with 1% prevalence, it collapses to 4.3% — 23 of every 24 positive results would be false. The test has not changed; the population has.