Bayes · how to change your mind

An interactive introduction

How to
change your mind

Bayes' theorem is the exact mathematics of learning from evidence. Here is how it works — and why ignoring it fools even careful people.

A disease affects 1 in 100 people. A test for it is 90% accurate — it catches 90% of real cases, and wrongly flags only 10% of healthy people.

Your test comes back positive. What's the chance you actually have the disease?

≈ 8%

Not 90%. Not even close. Because the disease is rare, the healthy majority produces far more false alarms than the sick minority produces true ones. That gap — between how it feels and what's true — is exactly what Bayes' theorem measures. By the end of this page, you'll compute it yourself.

Scroll to begin

01 — The core idea

Evidence should move you — but by how much?

Every day you hold beliefs, and then you run into evidence. A cough. A test result. A stranger's testimony. A search hit. The honest question is never simply “what does this evidence say?” It's “how far should this evidence move me, given everything I already knew?”

Bayes' theorem answers that question precisely. It takes what you believed before the evidence, combines it with how strongly the evidence points one way or another, and returns exactly what you should believe after. Nothing mystical — just bookkeeping for belief.

Three quantities do all the work. It's worth meeting them by name now, because every example on this page is built from the same three, wearing different clothes:

The prior
what you believed before

How likely the hypothesis was before this new evidence arrived. Often this is just a base rate — how common the thing is in the first place.

The posterior
what you believe after

Your updated belief, after weighing the evidence against the prior. This is the answer Bayes' theorem hands back to you.

Here's the single most useful habit for thinking about all of this, and it requires no algebra at all. Instead of juggling percentages, imagine a concrete crowd of people and simply count.

Natural frequencies · the disease from the top of the page

Picture 1,000 people. Since the disease hits 1 in 100, about 10 are actually sick and 990 are healthy. The test catches 90% of the sick — so it flags 9 of those 10. But it also wrongly flags 10% of the healthy — and 10% of 990 is 99 false alarms. So 108 people test positive, but only 9 are truly sick. Nine out of 108 is about 8%. The false alarms simply outnumber the real cases.

That's the whole intuition. When a hypothesis is rare, evidence has to fight against a large crowd of “false alarms” before it can make the hypothesis probable. Bayes' theorem is just this counting argument, written compactly enough to handle any numbers you throw at it. Let's write it down.

02 — The theorem itself

The equation, one piece at a time

We'll write H for the hypothesis (the thing that might be true) and E for the evidence (what you observed). The vertical bar | is read “given”: P(H | E) means “the probability of H, given that we've seen E.”

P(H | E) = · P(H) P(E)
what you believe after the evidence

Read it left to right as a recipe. To find what you should believe after seeing the evidence — the posterior — you take how well the evidence fits your hypothesis — the — multiply it by how plausible the hypothesis was to begin with — the prior — and then divide by how likely that evidence was overall — the evidence term, which simply rescales everything so the probabilities add up correctly.

P(H | E)
posterior

The probability the hypothesis is true, after accounting for the evidence. The number you actually want.

P(H)
prior

How probable the hypothesis was before the evidence — usually the base rate. Ignore it at your peril.

P(E)
total evidence

How likely the evidence was at all, whether or not the hypothesis is true. The great normalizer.

Unfolding the denominator

That bottom term, P(E), is a little abstract on its own — “how likely was the evidence overall?” In practice we almost always compute it by splitting the world into two cases: the evidence can show up when the hypothesis is true, or when it's false. Add those two paths together and you have the total. Written out, the full working form of the theorem is:

P(H | E) = P(H) P(H) + P(¬H)

The symbol ¬H means “not H” — the hypothesis is false. So P(¬H) is just 1 − P(H), and is the false-alarm rate: how often the evidence appears even when the hypothesis is false. Look closely and you'll see the numerator — the “true hits” — sitting inside the denominator alongside the “false alarms.” The posterior is nothing but the true hits as a fraction of all the hits. That is precisely the counting we did with 1,000 people, now in symbols.

Two paragraphs of algebra can only take intuition so far. The next section turns this equation into something you can push around with your hands.

03 — See it

A thousand people, and the trouble with rare things

Below is a crowd of 1,000. Each square is a person. Drag the three dials and watch who tests positive — and, among them, who is actually affected. This one picture contains the whole theorem.

The natural-frequency grid

live · 1,000 people
Sick — test positive (true hit) Healthy — test positive (false alarm) Sick — test negative (missed) Healthy — test negative
If you test positive, chance you're affected
8%

Sensitivity is the share of truly affected people the test catches — its true-positive rate, . Specificity is the share of unaffected people it correctly clears; one minus specificity is the false-alarm rate . Try this: leave the test excellent — sensitivity and specificity both at 95% — and slide the base rate down toward 1%. Watch the amber false alarms swamp the red true hits. A near-perfect test can still be wrong most of the time it says “yes,” purely because the thing it looks for is rare. That's not a flaw in the test. It's the prior, refusing to be ignored.

04 — Worked examples

Three walks through the equation

The theorem earns its keep on real problems. Each example below is broken into steps: read the situation, name the three quantities, then watch belief travel from prior to posterior. Use Next to advance.

05 — Do it yourself

The Bayes calculator

Now bring your own numbers. Set how common the hypothesis is, how well the evidence fits when it's true, and how often that same evidence shows up when it's false. The equation fills in as you go — and translates itself back into a crowd of 1,000.

Bayesian update

any two-outcome problem
Before any evidence, out of everyone, what fraction fits the hypothesis?
1%
When the hypothesis is true, how often does this evidence appear? (A test's sensitivity.)
90%
When the hypothesis is false, how often does the same evidence still appear? (The false-alarm rate.)
10%
8.3%
posterior — belief after the evidence

06 — The shortcut

The gambler's form: odds and the evidence ruler

The fraction you've been computing has a sleeker twin. Rewrite everything in odds — the ratio of “for” to “against” — and Bayes' theorem collapses into a single multiplication.

Odds and probability say the same thing in different accents: a probability of 75% is odds of 3 : 1 (three ways for, one against). Now define the likelihood ratio — how many times more often the evidence appears when the hypothesis is true than when it's false:

posterior odds = prior odds ×

That's the entire theorem. No denominator, no normalizing — the awkward P(E) cancels itself out. A test with 90% sensitivity and a 10% false-alarm rate has LR = 90/10 = 9: a positive result makes any hypothesis exactly nine times more likely, in odds, no matter where it started. The evidence has one fixed strength; only your starting point varies.

And it gets better. Take logarithms and multiplication becomes addition: every piece of evidence simply pushes you a fixed distance along a ruler of belief. This is precisely the trick Turing used at Bletchley Park — he measured evidence in decibans, where 10 db means an LR of 10, 20 db means 100, and each independent clue adds its decibans to the pile. Slide the two controls and watch evidence move you:

The evidence ruler

log-odds · decibans
prior
posterior
Evidence shift
+9.5 db
Prior → posterior odds
1:99 → 1:11
Posterior probability
8.3%

Drag the evidence slider left of center and the LR drops below 1 — evidence against, pushing you down the ruler by the same rule. Notice what the log scale reveals: moving from 50% to 91% takes exactly as much evidence as moving from 91% to 99.1%. Extraordinary claims sit far down the ruler, which is why they demand extraordinary evidence — not as a slogan, but as arithmetic.

07 — Evidence over time

The evidence lab: belief as a trajectory

Real inquiry rarely stops at one clue. The Bayesian move is to chain updates: today's posterior becomes tomorrow's prior, and belief traces a path. Run the experiment yourself — set a starting belief, then stack up positive and negative results and watch where the path goes.

Sequential updating

posterior in, prior out
Current belief
1%
Each result multiplies the odds by its likelihood ratio. Independent evidence compounds.

Try the classic sequence: prior at 1%, test at 90/90, then press + Positive three times. One positive lifts you only to 8% — but the second reaches ~45%, and the third ~88%. Each result adds the same +9.5 db; it's your position on the ruler that makes the same evidence feel weak or decisive. This is why medicine confirms surprising screens with follow-up tests, and why science trusts replication over any single dramatic study. Mix in a negative and watch belief fall by the mirror-image rule — honest updating runs in both directions.

One caution the mathematics insists on: the multiplication is only valid if the pieces of evidence are independent. Re-running the same flawed test — same reagent, same bias — doesn't add new decibans; it repeats old ones. Ten copies of one rumor is one rumor.

08 — Play it

Monty Hall: the puzzle that fooled a thousand PhDs

Three doors. Behind one, a car; behind the others, goats. You pick a door. The host — who knows where the car is — opens a different door, always revealing a goat, and offers you a switch. When a magazine columnist wrote that you should take it, thousands of readers, many with doctorates, wrote in to insist she was wrong. She wasn't. Play, and see.

The game

host always reveals a goat
Pick a door.
Strategy: stay
— (0 games)
Strategy: switch
— (0 games)

Why switching wins — in Bayesian dress

Your first pick has a 1⁄3 prior of being right. Then comes evidence: the host opens a particular door. Here's the move almost everyone misses — that action is more probable in some worlds than others. If the car is behind your door, the host had two goat doors to choose from, so the one he opened had likelihood . If the car is behind the other unopened door, he was forced — likelihood . An LR of 2 in favor of “the car is behind the other door,” applied to its 2-to-1... run it through and the posterior lands at exactly 2⁄3 for switching, 1⁄3 for staying.

The deep lesson isn't about game shows. It's that evidence includes how the evidence was produced. A host who opens doors at random (and just happened to reveal a goat) gives you no reason to switch — same open door, different likelihoods, different posterior. Who selected what you're seeing, and by what rule, is part of the data. That principle has a modern name in science — selection effects — and forgetting it is how survivorship bias, cherry-picked studies, and too-good-to-be-true headlines get their power.

09 — When it's ignored

Five ways good minds go wrong

Every one of these mistakes is what Bayes' theorem looks like when a piece of it is dropped. They're not signs of stupidity — they're the default settings of human intuition. Naming them is how you catch yourself.

F1Base-rate neglect›

Judging how probable something is purely from how well the evidence fits, while forgetting how common the thing was to begin with. This is the mistake that makes the positive disease test feel like bad news.

The taxicab problem. A city's cabs are 85% Green and 15% Blue. A witness to a night-time accident says the cab was Blue. Tested under the same conditions, the witness is right 80% of the time. So the cab was probably Blue — right?

The intuitive answer

“The witness is 80% reliable and said Blue, so there's an 80% chance it was Blue.”

The Bayesian answer

Blue cabs correctly called Blue: 15% × 80% = 12%. Green cabs wrongly called Blue: 85% × 20% = 17%. So Blue is 12 ⁄ (12+17) ≈ 41%. Despite the witness, the cab was more likely Green.

The witness's reliability is the ; the 85/15 split is the prior. Drop the prior and you land on 80%. Keep it, and the rarity of Blue cabs pulls the true answer below a coin flip.

F2Confusing the inverse — the prosecutor's fallacy›

Treating as if it were P(innocent | evidence). These are different questions, and swapping them has sent innocent people to prison.

The courtroom. A DNA sample matches the defendant. An expert testifies that the chance of such a match “if the defendant were innocent” is 1 in a million. The prosecutor concludes: therefore, a 1-in-a-million chance the defendant is innocent.

The fallacy

“One-in-a-million to match by chance” is quietly re-read as “one-in-a-million chance of innocence.” The direction of the conditional has been flipped.

The correction

If the pool of possible suspects is, say, 5 million people, then about 5 of them would match by pure chance. The match alone puts the defendant among ~5 equally-matching people — far from a 1-in-a-million certainty.

The rarity of the match is real and important, but it is — the false-alarm rate — not the posterior. Only the full theorem, fed with the size of the suspect pool (the prior), tells you what the match is worth.

F3The false-positive paradox›

Assuming that an accurate test yields accurate results. When the condition being tested for is rare, most positive results are false — even for an excellent test. This isn't a paradox at all once you've watched the grid.

Mass screening. Screen a whole population for a condition that affects 1 in 1,000, using a test that's 99% sensitive and 99% specific. A person tests positive. Their chance of actually having the condition is not 99% — it's about 9%.

Count it out · 100,000 people

100 are affected; the test catches 99 of them. Of the 99,900 unaffected, 1% are wrongly flagged — that's 999 false alarms. Among the 1,098 positives, only 99 are real: 99 ⁄ 1,098 ≈ 9%.

It's the same shape as base-rate neglect, but it carries a practical lesson of its own: this is why doctors confirm a surprising positive with a second, independent test before acting. A second positive multiplies the evidence and drags the posterior upward — try it in the calculator by feeding the first result's posterior back in as a new prior.

F4The conjunction fallacy›

Judging a detailed, story-like scenario as more probable than a plainer one it's contained in — because the detail makes it feel more representative. But adding conditions can only ever make something less likely, never more.

The Linda problem. Linda is 31, outspoken, and deeply concerned with social justice. Which is more probable — that Linda is (a) a bank teller, or (b) a bank teller who is active in the feminist movement? Most people choose (b).

Why (b) tempts us

Option (b) fits the vivid description better. Representativeness — how well a story matches a stereotype — masquerades as probability.

Why (a) must win

Every feminist bank teller is already a bank teller, so (b) is a subset of (a). A subset can't be larger than the whole. P(teller ∧ feminist) ≤ P(teller), always.

In Bayesian terms, the extra detail raises the — the story fits — while quietly shrinking the prior, since fewer people satisfy two conditions than one. Intuition feels the first pull and misses the second.

F5Conservatism — updating too little›

The mirror image of every fallacy above. Sometimes we don't over-read evidence — we under-read it, clinging to the prior when the data has already spoken. Psychologists demonstrated this with a famous experiment using two bags of poker chips: one mostly red, one mostly blue. Draw chips one at a time from a hidden bag and ask people how confident they are about which bag it is.

What people do

After a run of draws that should make the answer nearly certain, people report middling confidence — around 70% — revising far more timidly than the evidence warrants.

What the evidence says

Each draw carries a fixed likelihood ratio, and independent draws multiply. A handful of consistent draws can push the true posterior past 95% while intuition is still hedging.

Try it in the evidence lab: a few stacked results move belief much faster than feels natural. Being a good Bayesian cuts both ways — it forbids overreacting to one flashy clue, and it forbids shrugging off a steady accumulation. The prior is a starting point, not a fortress.

10 — In the world

Where Bayes actually lives

You now have the whole machine: the equation, the intuition behind it, the traps that spring when it's ignored. This last section is for the curious — where this one idea came from, how far it reaches into working science, and why philosophers have argued over it for two centuries. None of it is required to use Bayes' theorem. All of it is worth knowing.

A history in brief

For an idea now woven through statistics, medicine, and artificial intelligence, Bayes' theorem had a strikingly slow start — published by accident, generalized by someone else, exiled for half a century, and rescued only when computers grew strong enough to make it practical.

1763

An essay found in a drawer

Thomas Bayes, a Presbyterian minister with a gift for mathematics, worked out how to reason backwards — from observed effects to their likely causes — by imagining balls rolled across a table and inferring where an unseen first ball must lie. He never published it. His friend Richard Price found the essay among Bayes' papers and sent it to the Royal Society, two years after Bayes had died.

1774

Laplace makes it a science

Working independently in France, Pierre-Simon Laplace rediscovered the principle and turned it into a general method he called the “probability of causes.” He used it to estimate the mass of Saturn from astronomical data — stating the odds his figure was off by more than a hair — and to argue, from birth records, that slightly more boys are born than girls. For roughly a century, this was simply how careful people reasoned about uncertainty.

1920s

The great eclipse

A new generation — Ronald Fisher, Jerzy Neyman, Egon Pearson — built the framework of p-values and significance tests that still fills textbooks. They dismissed reasoning from prior belief as unscientific “inverse probability.” Bayes' approach fell out of respectable use for decades, kept alive only at the margins.

1939–54

Kept alive by a stubborn few

The geophysicist Harold Jeffreys, the Italian actuary Bruno de Finetti — who insisted that probability is nothing but a coherent degree of belief — the statistician Leonard Savage, and the physicist Richard Cox rebuilt the foundations. Cox proved something remarkable: any consistent system for reasoning about uncertainty must, in the end, obey the rules of probability.

1941

A secret at Bletchley Park

To break the German navy's Enigma cipher, Alan Turing and I. J. Good used a sequential Bayesian method, accumulating “weight of evidence” in units Turing named the ban and the deciban. It worked — and it stayed classified for thirty years, so its influence on the field went quietly unseen.

1990

The computational explosion

Bayes' theorem is easy to write and, for real-world problems, was long almost impossible to compute — the denominator could hide an intractable sum or integral. A family of algorithms called Markov chain Monte Carlo, able to sample from ferociously complex distributions, changed that. Once ordinary computers could run them, Bayesian methods swept through nearly every quantitative field within a decade.

Today

The quiet default

From the spam filter guarding your inbox to the confirmation of gravitational waves, Bayesian inference is now so embedded in science and engineering that it usually goes unremarked. A minister's posthumous footnote about billiard balls became, in the end, infrastructure.

Where it shows up in science

The same three-part move — prior, evidence, updated belief — reappears wherever people must draw conclusions from imperfect data. A few of the places it does real work:

Medicine & trials

Diagnosing, and deciding

A positive test is only the start. Adaptive Bayesian trial designs let researchers update as each patient's data arrives, stopping a study early when a treatment is clearly working — or clearly futile. Regulators now accept such designs where a fixed-sample trial would be too slow or too large to justify.

Cosmology & physics

Weighing black holes

When a detector records a gravitational wave, it never “sees” the colliding black holes; it infers their masses, spins, and distance by asking which sources would most probably have produced the exact ripple observed. The same reasoning reads the age and composition of the universe out of the cosmic microwave background.

Search & rescue

Finding the lost

Bayesian search theory turns hunches into a probability map of where something lies, then redraws that map as each swept area comes up empty. It helped recover a hydrogen bomb lost off Spain in 1966, locate the submarine USS Scorpion in 1968, and find the wreckage of Air France 447 on the Atlantic floor in 2011 — after conventional searches had run out of ideas.

Machine learning

Teaching machines to doubt

The first workable spam filters simply scored each message by the words it contained, naive-Bayes style. Judea Pearl earned computing's highest honor for Bayesian networks — maps of cause and effect that let software reason under uncertainty — and Bayesian methods still tune the settings of the neural networks that came after.

Evolution & genomics

Reading the tree of life

To reconstruct how species — or virus strains — are related, biologists ask which branching history would most probably have produced the DNA we can sequence today. Bayesian phylogenetics has become a standard way to date evolutionary splits and to trace an outbreak back toward its source.

Law & forensics

The weight of evidence

A DNA match or a fingerprint carries no fixed meaning; its force depends on the prior and on the alternatives. Courts increasingly speak of likelihood ratios — the Bayesian measure of how far a piece of evidence should move belief — and of the prosecutor's fallacy that strikes whenever they forget to.

The philosophical stakes

Bayes' theorem is a piece of mathematics, and mathematics is never controversial. What has been argued over for two hundred years is what the numbers mean — and that argument reaches into the heart of how we know anything at all.

Two kinds of probability. Ask “what's the probability this coin lands heads?” and a frequentist answers: the long-run fraction of heads over endless tosses — a fact about the coin and the world. Now ask “what's the probability it rained in Rome on a particular day in 1631?” The frequentist has nothing to say; it either rained or it didn't, and there is no long run to appeal to. The Bayesian answers both questions the same way: probability is a degree of belief, a number describing how confident you ought to be given what you know. On that reading, updating with Bayes' theorem isn't a special trick at all — it is simply what it means to hold beliefs rationally as evidence comes in.

The Dutch book · why coherence isn't optional

Suppose your degrees of belief break the rules of probability — you're somehow 60% sure it will rain and also 60% sure it won't. Then a clever bookmaker can offer you a bundle of bets, each of which looks fair by your own numbers, that together guarantee you lose money no matter what the weather does. That bundle is called a “Dutch book,” and the argument — from Frank Ramsey and Bruno de Finetti — delivers a startling verdict: probabilistic coherence isn't an aesthetic preference. It is the price of not being a guaranteed loser.

Isn't it all just subjective? The oldest objection is that priors are arbitrary: your 10% and my 40% are mere opinions, so any conclusion we reach is tainted from the start. There are two replies. The first is practical: evidence tends to overwhelm priors. Feed two people who begin in disagreement the same steady stream of data and, under mild conditions, their posteriors converge — the starting priors “wash out,” and the world drags both toward the same answer. The second reply is more ambitious: perhaps there are principled, least-committal priors to begin from — the objective-Bayesian program pursued by Jeffreys and by E. T. Jaynes, who called probability theory “the logic of science,” the unique consistent extension of ordinary logic to reasoning under uncertainty. The subjectivity critics fear is, if not fully banished, at least disciplined.

The honest catch. None of this dissolves every difficulty. Where does the first prior come from? How should you reason when the true explanation is one you haven't even thought to consider? Bayesianism is a theory of how to update belief, not how to conjure it from nothing — and its critics press hard on exactly these seams. But as an account of how evidence ought to move a mind that already believes something, it remains the most complete one we have. That is why it now underwrites not only statistics but much of the philosophy of science itself: the study of how theories earn, and lose, our confidence.

Which returns us to where we began. Bayes' theorem was never really about tests or trials or taxicabs. It is a discipline for holding beliefs honestly — and, followed carefully, a surprisingly complete answer to the oldest question in the theory of knowledge: how should experience change what we believe?

11 — Prove it to yourself

Six questions, no stakes

The real test of understanding is whether the traps stop working on you. Each question below is one of this page's ideas in disguise. Answer, and you'll get the reasoning either way.

12 — Carry this with you

Eight things worth keeping

  1. Evidence updates belief; it rarely replaces it.The posterior is the prior adjusted by evidence — not the evidence taken at face value.
  2. Your prior is data, not bias.The base rate is a genuine fact about the world. Ignoring how common something is is the error, not a way of avoiding one.
  3. P(A | B) is not P(B | A).“How likely is this evidence if I'm sick?” and “how likely am I sick given this evidence?” are different numbers. Keep the arrow pointing the right way.
  4. Rare hypotheses demand strong evidence.The rarer the thing, the more false alarms it must outshine. A one-in-a-million claim needs roughly one-in-a-million-quality evidence to become probable.
  5. An accurate test is not an accurate answer.When the base rate is low, most positives are false. Accuracy and predictive value are not the same quantity.
  6. Independent evidence multiplies.A second, independent test that also comes back positive lets you feed one posterior in as the next prior — and belief compounds.
  7. When in doubt, count a crowd of 1,000.Translate every probability into natural frequencies and the answer usually becomes obvious without any algebra at all.
  8. Odds make it easy: multiply by the likelihood ratio.Posterior odds = prior odds × LR. In log-odds, evidence simply adds — which is why extraordinary claims, sitting far down the ruler, require extraordinary evidence.

Bayes' theorem isn't really about tests or trials or cabs. It's a discipline for holding beliefs honestly: stating what you thought before, saying out loud how much the evidence should count, and letting those two things — not your first impression — decide what you believe next. That's the whole art of changing your mind well.

The vocabulary, on one card

Prior — P(H)
Your belief before the evidence; often just the base rate.
Posterior — P(H | E)
Your belief after weighing the evidence. Tomorrow's prior.
How probable the evidence is if the hypothesis is true.
How often the same evidence appears when the hypothesis is false.
Base rate
How common something is in the population — the usual source of a prior.
Share of true cases a test catches; its true-positive rate.
Share of non-cases a test correctly clears; 1 − specificity is the false-alarm rate.
P(E | H) ÷ P(E | ¬H): the strength of a piece of evidence, independent of any prior.
Odds
Probability restated as for-to-against: 75% is 3 : 1. Bayes in odds form is one multiplication.
Deciban
Turing's unit of evidence: 10 × log₁₀(LR). Independent clues add their decibans.
Natural frequencies
Probabilities restated as counts of people — the format human intuition handles best.
Conditional probability
P(A | B): the probability of A given that B holds. The bar always reads “given.”