Skip to main content
Interactive 3D/Bayes' Theorem Explorer
Disease Test Settings
Base Rate P(D)0.010
Sensitivity P(T+|D)0.90
Specificity P(T-|D')0.95
Result
P(Disease | Test+)
15.38%
FPR (false alarm)5.0%
FNR (miss rate)10.0%
P(T+)5.85%
Base Rate Neglect
Most people answer 90% (sensitivity). The Bayesian answer is 15.38% because the disease is rare.
Try: Set base rate to 0.001 (rare disease) with 99% sensitivity. Watch the positive predictive value drop below 10%.

Bayes' Theorem Explorer - Interactive Visualization

Bayes' theorem reverses conditional probability: P(Disease|Test+) = P(Test+|Disease)·P(Disease) / P(Test+). Without accounting for base rate, even a 99% accurate test has poor predictive value for rare diseases. This explorer uses the medical testing scenario to make Bayes' theorem visceral - see frequency diagrams and probability trees update live as you adjust base rate, sensitivity, and specificity.

  • Adjust base rate, sensitivity, and specificity with sliders
  • See probability tree and frequency diagram update together
  • Compute P(Disease|Test+) the right way vs common intuition
  • Understand base rate neglect - why rare disease testing is hard
  • Connect to spam filtering, medical AI, and probabilistic classifiers

Part of the EngineersOfAI Interactive 3D - free interactive visualizations covering every major concept in machine learning and AI engineering. Hover any element for a plain-English explanation. No code required.