Bayes' theorem is the mathematical rule for updating a belief in light of new evidence. It underlies medical testing, spam filters, legal reasoning, and everyday judgment calls β and it's also the source of one of the most common probability mistakes people make: trusting a piece of evidence without accounting for how rare the thing being tested for actually is.
How the calculator works
The Bayes' Theorem tab applies P(A|B) = P(B|A)Β·P(A) / P(B) directly to whatever prior, likelihood, and evidence you enter. The Medical Test tab is the same formula wearing different labels: sensitivity is the likelihood P(B|A), prevalence is the prior P(A), and the evidence P(B) β the overall chance of testing positive β is derived automatically from sensitivity, specificity, and prevalence, since you rarely know it directly for a real test.
Why the base rate matters more than the test
A test's accuracy (sensitivity and specificity) tells you how good the test is at spotting true cases and true non-cases. But the posterior β what a positive result actually means for you β depends just as much on the prevalence, or base rate. When a condition is rare, the pool of healthy people is enormous compared to the pool of sick people, so even a small false-positive rate produces more false alarms than true detections. Ignoring this is the base-rate fallacy, and it's why doctors, forecasters, and fraud analysts are trained to always ask 'how common is this to begin with?' before trusting a single positive signal.
Direct vs. medical framing β same formula, two names
The Direct tab and the Medical Test tab compute the identical Bayes' theorem calculation; they just use domain-specific names for the same three ingredients. If you switch a scenario's numbers between the two tabs consistently (prior = prevalence, likelihood = sensitivity, evidence = the derived positive-test rate), you'll get the same posterior either way β a useful sanity check for understanding the formula, and the reason the calculator's default values on both tabs tell the same rare-disease story.