You test positive for a rare disease with a 95%-accurate test. How worried should you actually be? Bayes' theorem gives the exact answer, and it's not what most people guess.
By Petrus Sheya
July 22, 2026 · 8 min read
You test positive for a rare disease. The test is 95% accurate. How worried should you be?
Most people's gut says "very." The test is right 95% of the time, so a positive result feels like a 95% chance you're sick.
That gut feeling is wrong. Not slightly wrong, wrong by an order of magnitude. And the reason why is Bayes' theorem, one of the most useful and most misunderstood ideas in all of math.
Here's the shift in thinking we need to make first. Probability, in this context, isn't a property of the world. It's a measure of your belief, and beliefs move.
Picture an old-fashioned balance scale. Before any evidence comes in, the scale sits at some starting position, your prior belief. Maybe you think it's unlikely you're sick, so the scale tips heavily toward "healthy."
Then evidence arrives, the positive test. Evidence is a weight you drop onto one side of the scale. It tips things toward "sick." But here's the thing: how much it tips depends on how much more likely that evidence is if you're sick versus if you're healthy.
A weak clue barely moves the scale. A strong clue can flip it completely. Bayes' theorem is just the arithmetic for how much to tip the scale. Nothing more mystical than that.
Let's make this concrete before touching a single formula.
Picture 1,000 people. 1% of them actually have the disease, so that's 10 sick people and 990 healthy ones. Everyone takes the test.
The test catches 95% of sick people (that's called sensitivity). But it also has a false alarm rate, it wrongly flags about 10% of healthy people as positive too (90% specificity).
1,000 people. Amber and red dots both tested positive, only the amber ones are actually sick. Drag prevalence down and watch red swallow amber.
true positives10
false positives94
P(sick | positive)9.6%
Count the amber dots. Those are the true positives, people who are sick and correctly flagged. Now count the red dots. Those are false positives, healthy people the test wrongly flagged.
Notice something? There are way more red dots than amber ones. Out of roughly 1,000 people, about 10 are truly sick and test positive, but around 99 healthy people also test positive by mistake. Simply because there are so many more healthy people to begin with, even a small false-alarm rate produces a flood of false positives.
So if you test positive, your actual odds of being sick are roughly 10 out of 109, about 9%. Not 95%. The rarer the condition, the more a positive result is dominated by false alarms, no matter how accurate the test sounds.
Drag the prevalence slider down toward something like flu-season-rare, and watch the amber dots almost vanish under red. This is called the base rate fallacy, and it's the single most common way people misread real-world test results, from medical screening to spam filters to airport security.
So how do we actually calculate that 9%, instead of eyeballing a grid of dots?
We need two ingredients. First, the prior, what we believed before any evidence. Second, the likelihood ratio, how much more likely the evidence is under one hypothesis versus the other.
Let's use a courtroom instead of a hospital, same math, different flavor. A detective is 30% sure a suspect is guilty, based on the case so far. That's the prior. Then a fingerprint at the scene matches the suspect. How much should that shift things?
A detective starts 30% sure the suspect is guilty. Drag the evidence slider and watch the beam tilt toward guilty or innocent.
likelihood ratio1.00
posterior P(guilty)30.0%
The evidence weight slider controls the likelihood ratio, how many times more likely that fingerprint match would be if the suspect really did it, versus if they didn't. At 1×, the fingerprint is uninformative and the beam doesn't move. Push it up to 8×, meaning the match is eight times more likely under guilt, and watch the beam swing hard toward guilty.
We write this relationship as:
posterior odds=prior odds×likelihood ratio
Odds are just a different way of writing probability. Prior odds of 0.3 to 0.7 (guilty to innocent) become the ratio 0.3/0.7≈0.43. Multiply by the likelihood ratio, and you get the posterior odds directly, no need to touch fractions of populations at all.
This is the multiplicative heart of Bayes' theorem. Each new piece of evidence doesn't add to your belief, it multiplies your odds.
Real evidence rarely shows up all at once. It trickles in, one observation at a time. Bayes' theorem handles that beautifully, you just multiply in each new piece as it arrives.
Imagine a coin with an unknown bias, maybe it's fair, maybe it's rigged toward heads. We don't know. So we start by considering every possible bias from 0 to 1 as equally plausible, a flat, uninformative starting belief.
Set the coin's hidden bias, then press play. Each flip multiplies into the posterior, watch belief pile up around the true value.
flips0 (0H)
posterior mean0.500
Set the coin's real, hidden bias, then hit play. Each flip is one piece of evidence. Heads makes high-bias hypotheses a little more plausible, and pulls weight away from low-bias ones. Tails does the reverse.
Watch the bars. At the start, they're flat, every bias from 0 to 1 looks equally likely. After a dozen flips, a hump starts forming. After a hundred, it's a sharp spike sitting almost exactly on the true bias.
Nothing here is doing anything except this rule, applied over and over: multiply each hypothesis's current weight by how well it predicted the latest flip, then renormalize so everything still sums to one. That's it. That's the entire mechanism behind everything from spam filters to medical diagnosis to the GPS in your phone.
Here's a worry you might have. What if your prior is bad? What if you start out convinced of something false?
Teal starts sure the coin is fair. Orange starts sure it favors tails. Drag n forward and watch both get dragged to the same truth.
skeptic estimate0.500
optimist estimate0.221
gap0.279
Two observers watch the same sequence of coin flips. The teal one starts out sure the coin is fair, centered right on 0.5. The amber one starts out sure it's biased the other way, toward tails. Both are wrong, the coin's real bias is 0.75.
Drag the flips-seen slider forward. At n=0, the two estimates are far apart, each stuck in their own starting belief. But watch the gap number in the corner shrink as n grows. By a hundred flips or so, both estimates have been dragged to nearly the same answer, close to the truth.
Enough evidence overwhelms almost any reasonable starting belief. Priors matter most when data is scarce. Once evidence piles up, it does the talking, and different reasonable people converge to the same conclusion. This is why science works even though every scientist starts with slightly different hunches.
We've built every piece. Time to write it in one line.
For a hypothesis H and evidence E:
P(H∣E)=P(E)P(E∣H)P(H)
Let's name each piece using the disease example.
P(H) is the prior, how likely you thought H was before any evidence (1% chance of disease).
P(E∣H) is the likelihood, how likely the evidence is if H is true (95% chance of testing positive, if sick).
P(E) is the total probability of the evidence, across every way it could happen, sick or healthy. We write this as:
P(E)=P(E∣H)P(H)+P(E∣¬H)P(¬H)
That denominator is the entire reason rare conditions produce so many false alarms. It sums up every path to a positive test, not just the sick one. Plug in the disease numbers:
Spam filters use exactly this rule. The prior is "most email isn't spam." The evidence is the words in the message. Words like "free" and "winner" have a high likelihood ratio, far more common in spam than in real mail, so they tip the odds hard toward "spam" with each one that appears.
Medical screening programs use it to decide who should get expensive follow-up tests, since a positive result on a rare-disease screen, as we saw, is mostly noise unless it's followed by a second, independent test that multiplies in more evidence.
Machine learning classifiers, from your phone's face unlock to fraud detection at your bank, are Bayesian updates at their core, just with more hypotheses and more evidence streams than our coin or our detective.
Bayes' theorem tells you how to update a belief when new evidence arrives. Start with a prior, how likely something seemed before. Multiply by a likelihood ratio, how much more consistent the evidence is with one hypothesis over its rivals. The result is your posterior, your updated belief.
The formula:
P(H∣E)=P(E)P(E∣H)P(H)
Three things worth carrying with you. A positive result on a rare condition is mostly false alarms, because there are so many more people who don't have it. Evidence multiplies odds, it doesn't just add to a feeling, which is why weak evidence barely moves a strong prior. And enough evidence eventually overwhelms almost any starting belief, which is why careful reasoners with different hunches tend to agree once the data comes in.
None of this is exotic. It's just careful bookkeeping for a question we ask constantly: given what I just saw, what should I actually believe now?