Diagnostic Test Accuracy Calculator

Evidence-based clinical epidemiology suite. Evaluate screening and diagnostic tests: Sensitivity, Specificity, Predictive Values (PPV/NPV), Likelihood Ratios (LR+/LR-), and Wilson score 95% confidence intervals.

Advertisement
Sponsored Content (728x90)
Diagnostic 2 × 2 Matrix

Enter observed frequencies comparing your index test against the Reference Gold Standard:

Index Test Result Gold Standard (+)
Condition Present
Gold Standard (−)
Condition Absent
Test Positive (+)
True Positive (TP)
False Positive (FP)
Test Negative (−)
False Negative (FN)
True Negative (TN)

By default, PPV & NPV use sample prevalence. Enable this to project predictive values to a specific clinical setting (e.g. primary care screening vs tertiary referral).

Accuracy Metrics Sample Prevalence
Sensitivity (Recall, TPR) -- 95% CI: --
Specificity (TNR) -- 95% CI: --
Positive Predictive Value (PPV) -- 95% CI: --
Negative Predictive Value (NPV) -- 95% CI: --
Positive Likelihood Ratio (LR+) -- 95% CI: -- --
Negative Likelihood Ratio (LR−) -- 95% CI: -- --
Diagnostic Odds Ratio (DOR) -- 95% CI: --
Overall Accuracy & Kappa -- Cohen's κ: --
Fagan's Bayesian Post-Test Probabilities
Pre-Test Probability: --
Post-Test (Positive): --
Post-Test (Negative): --
Publication Statement (STARD / ICMJE Format)
Click "Calculate Diagnostics" to generate a publication-ready accuracy statement.
Advertisement
Sponsored Content (728x90)

Clinical Methodology: Diagnostic Accuracy Assessment

In clinical medicine and evidence-based epidemiology, diagnostic test evaluation requires quantifying how effectively an index test distinguishes patients with a target condition from those without it, benchmarked against an accepted reference standard (gold standard).

1. Core Operational Metrics

Consider a sample of size $N = TP + FP + FN + TN$. The primary performance parameters are defined as:

$$\text{Sensitivity (Se)} = \frac{TP}{TP + FN} = P(\text{Test } + \mid \text{Disease } +)$$
$$\text{Specificity (Sp)} = \frac{TN}{TN + FP} = P(\text{Test } - \mid \text{Disease } -)$$

Confidence Intervals: Exact asymptotic confidence intervals for proportions are computed via the Wilson Score Interval:

$$\tilde{p} = \frac{x + \frac{z^2}{2}}{n + z^2}, \quad CI_{1-\alpha} = \tilde{p} \pm \frac{z}{n + z^2}\sqrt{\frac{x(n-x)}{n} + \frac{z^2}{4}}$$

where $z = \Phi^{-1}(1 - \alpha/2) \approx 1.95996$ for the standard 95% level.

2. Predictive Values & Bayesian Prevalence Dependency

While Sensitivity and Specificity are intrinsic characteristics of the testing instrument, the Positive Predictive Value (PPV) and Negative Predictive Value (NPV) are strongly dependent on the pre-test disease prevalence ($\pi$) in the clinical population:

$$\text{PPV} = \frac{Se \cdot \pi}{Se \cdot \pi + (1 - Sp) \cdot (1 - \pi)}$$
$$\text{NPV} = \frac{Sp \cdot (1 - \pi)}{Sp \cdot (1 - \pi) + (1 - Se) \cdot \pi}$$

When screening in low-prevalence populations ($\pi < 1\%$), even a test with 99% specificity will yield substantial false positives, drastically reducing PPV.

3. Likelihood Ratios & Fagan's Nomogram

Likelihood Ratios ($LR^+$ and $LR^-$) overcome the prevalence-dependency limitation. They describe the relative odds of a given test result occurring in a patient with disease compared to one without:

$$LR^+ = \frac{\text{Sensitivity}}{1 - \text{Specificity}} = \frac{TP / (TP + FN)}{FP / (FP + TN)}$$
$$LR^- = \frac{1 - \text{Sensitivity}}{\text{Specificity}} = \frac{FN / (TP + FN)}{TN / (FP + TN)}$$
Likelihood Ratio Range Clinical Shift in Likelihood (Sackett & Simel Criteria) Diagnostic Utility
$LR^+ > 10$ or $LR^- < 0.1$ Generates large, conclusive changes in probability (> 45% shift) Decisive diagnostic confirmation / exclusion
$LR^+ = 5 - 10$ or $LR^- = 0.1 - 0.2$ Generates moderate shifts in disease probability (30–45%) Clinically useful in most diagnostic pathways
$LR^+ = 2 - 5$ or $LR^- = 0.2 - 0.5$ Generates small, often non-decisive shifts (15–30%) Requires confirmatory testing
$LR^+ = 1 - 2$ or $LR^- = 0.5 - 1.0$ Negligible change in probability (< 15%) Virtually uninformative test

4. Zero-Cell Continuity Correction

When any contingency cell equals zero ($TP=0$, $FP=0$, $FN=0$, or $TN=0$), likelihood ratios and diagnostic odds ratios incur mathematical division by zero. In compliance with Haldane (1955) and Anscombe (1956), LabStats applies a standard $+0.5$ empirical continuity correction to all four cells, guaranteeing bounded, robust estimators.

5. References & Clinical Guidelines