Bayes' theorem is the mathematical foundation for correctly updating a belief or probability in light of new evidence, and its most famous, genuinely counterintuitive application — medical test interpretation — reveals exactly why intuition alone routinely gets conditional probability wrong, and why the base rate (how common something is to begin with) matters just as much as a test's own accuracy.

The core confusion Bayes' theorem exists to resolve is mixing up two genuinely different conditional probabilities that sound superficially similar: P(B|A), the probability of evidence B given that hypothesis A is actually true (a test's sensitivity — how likely a genuinely sick person is to test positive), and P(A|B), the probability that hypothesis A is actually true given that evidence B was observed (the real-world question anyone receiving a positive test result actually cares about — given that I tested positive, what's the real probability I'm actually sick). These two probabilities are not the same number, and conflating them — assuming a test's stated accuracy directly answers 'given my positive result, what's my real risk' — is exactly the base rate fallacy, one of the most common and consequential probability misunderstandings in everyday reasoning about risk.

The worked example in this calculator's own defaults illustrates the fallacy concretely: a test that's 90% accurate (meaning P(B|A) = 90%, correctly flagging 90% of people who genuinely have the condition) applied to a condition with only a 1% base rate in the population produces a real positive-predictive probability of just 9% — meaning a randomly selected person receiving a positive result on this test actually has only about a 1-in-11 chance of genuinely having the condition, despite the test's headline 90% accuracy figure sounding much more reassuring (or alarming, depending on framing) than that real 9% number.

The reason this happens becomes clear once you think through the actual population math rather than focusing purely on the test's own accuracy in isolation. Imagine 10,000 people tested: at a 1% base rate, 100 of them genuinely have the condition, and at 90% test sensitivity, about 90 of those 100 correctly test positive (true positives). But among the remaining 9,900 people who don't have the condition, the test's false-positive rate (in this example, implied by the numbers, working out to roughly the remaining share needed to reach the given overall 10% positive rate) still produces a substantial number of false positives — people without the condition who nonetheless test positive. Because the healthy population (9,900) is so much larger than the genuinely sick population (100), even a relatively low false-positive rate applied to that much larger healthy group can produce more total false positives than true positives, which is exactly why a randomly selected positive result is more likely, in this specific numeric example, to be a false positive than a genuine true positive — the rarity of the condition itself, not any flaw in the test's own accuracy, is what drives this surprising result.

This exact pattern — rare conditions producing counterintuitively low real-world positive-predictive values even from genuinely accurate tests — is why base rate is such a critical, and so frequently overlooked, factor in correctly interpreting real-world test results, whether medical, security-screening, fraud-detection, or any other 'test for a rare thing' scenario. Bayes' theorem is exactly the tool for correctly combining a test's own known accuracy with the base rate of what's actually being tested for, producing the genuinely meaningful answer to the question people actually care about (given my result, what's my real probability) rather than the easily-misinterpreted raw test-accuracy figure alone.