happytails.ai

Diagnostic accuracy calculator

Compute sensitivity, specificity, predictive values, likelihood ratios and other accuracy metrics with confidence intervals from a confusion matrix or labelled rows. It describes test performance on your data and gives no clinical advice.

Your result

Report a problem or share an idea.

How to use Diagnostic accuracy calculator
  1. Enter the four confusion counts, or switch to labelled CSV rows with actual and predicted columns.
  2. Optionally enter a declared prevalence to see predictive values for another population.
  3. Choose Wilson or Clopper-Pearson intervals and the confidence level.
  4. Calculate and download the JSON report or the CSV metrics table.

Useful next steps

What is computed

Sensitivity, specificity, PPV, NPV, accuracy and sample prevalence are proportions with Wilson score intervals (Wilson 1927, JASA 22:209) or Clopper-Pearson exact intervals (Clopper and Pearson 1934, Biometrika 26:404). Likelihood ratios use log intervals (Simel, Samsa and Matchar 1991, J Clin Epidemiol 44:763). Balanced accuracy, F1, Youden J, the diagnostic odds ratio and the Matthews correlation (Matthews 1975) are point estimates.

Prevalence changes predictive values

PPV and NPV from the table use the sample prevalence. If you declare a prevalence, the tool also reports predictive values from Bayes' rule with your sensitivity and specificity, which is how a test behaves where the condition is more or less common. No interval is given for those adjusted values.

Limits

A ratio with a zero denominator is reported as not defined. A likelihood ratio interval is also not defined when the ratio is 0, or when sensitivity and specificity are both 0 or 1 (its log standard error is then zero). Results describe the supplied cases only; they are not clinical advice and do not interpret any patient's result.