Bayes' Theorem Visualizer

Bayes' theorem helps us update our beliefs based on new evidence. This interactive tool visualizes how prior probability, sensitivity, and specificity affect the posterior probability in a medical testing scenario.

Adjust the sliders below and see how the results change in real-time!

Adjust Parameters

0.01 0.5
0.5 1
0.5 1
  • Prior Probability (Prevalence): The initial probability of having a disease before testing
  • Sensitivity: The ability to correctly identify those with the disease (true positive rate)
  • Specificity: The ability to correctly identify those without the disease (true negative rate)
  • Posterior Probability: The updated probability of having the disease after a positive test
  • True Positive: Correctly identified as having the disease
  • False Positive: Incorrectly identified as having the disease (also called a "Type I error")
  • True Negative: Correctly identified as not having the disease
  • False Negative: Incorrectly identified as not having the disease (also called a "Type II error")
Try These Examples
Disease Prevalence (Prior Probability) Test Sensitivity (True Positive Rate) Test Specificity (True Negative Rate)