Updating a belief with evidence, exactly
Bayes' theorem answers the question every test, search and diagnosis really asks: the evidence fired: now how likely is the hypothesis? It reverses the conditional you know (how often the evidence appears when the hypothesis holds) into the one you want (how often the hypothesis holds when the evidence appears), corrected by how common the hypothesis was to begin with.
A condition affects 1% of people. A test catches 99% of true cases and false-alarms on 5% of healthy people. You test positive. Intuition shouts "99%". Bayes calculates: true positives contribute 0.99 × 0.01 = 0.0099; false positives contribute 0.05 × 0.99 = 0.0495, five times as many. P(condition | positive) = 0.0099 ÷ 0.0594 = 0.1667. One in six. The test is good; the condition is simply rare, so the positive pool is dominated by the healthy majority's false alarms.
The base rate is not a detail
Every term matters, but the prior, P(A) before evidence, is the one intuition discards. Rare hypotheses need extraordinary evidence precisely because the false-alarm stream from the vast not-A population swamps the true signal. Run this calculator with the prior at 0.5 and the same test returns 0.95: the identical evidence, a different world.
Confusing P(B | A) with P(A | B), the prosecutor's fallacy. "The test is 99% accurate" states the first; your chance, given a positive, is the second. They coincide only when the prior is near 50%.
Frequently asked questions
Why does the answer feel so wrong in the example?
Because '99% accurate' sounds like a property of your result, when it is a property of the test applied to people who have the condition. Your result mixes two populations, and the healthy one is 99 times larger.
What if I have two pieces of evidence?
Chain the theorem: the posterior from the first test becomes the prior for the second. Sequential updating is Bayes in its working clothes.