True positive (sick, test+) False positive (healthy, test+) False negative (sick, test−) True negative (healthy, test−)

Bayesian Diagnostic Test Simulator

This simulator computes real Bayes'-theorem statistics for a diagnostic screening test and renders them as a 10,000-person natural-frequency grid, so the counts are visible rather than abstract. Set a disease prevalence, a test sensitivity and a test specificity, and every one of the 10,000 squares is recoloured according to its actual simulated disease status and test result — true positive, false positive, false negative or true negative — with the exact counts derived from the same PPV/NPV formulas printed in the panel. It is the standard illustration of why, for a rare disease, most positive results on an accurate test are still false alarms: shrink prevalence and watch the false-positive block outgrow the true-positive block even as sensitivity and specificity stay high.