Bayes' Theorem: Updating What You Believe
Bayes' theorem is a rule for changing your mind in an orderly way. It tells you how far a piece of evidence should move your confidence in a claim, taking into account both how confident you already were and how expected that evidence would be if the claim were true and if it were false. It is less a piece of mathematics to memorise than a discipline for reasoning under uncertainty.
Where it comes from
The result is named after an eighteenth-century English clergyman and mathematician whose work on inverse probability was published after his death. Other mathematicians later generalised the idea into what is now called Bayesian statistics. For a long time the approach was admired but impractical, because the calculations grow quickly; widespread computing is what turned it into an everyday tool.
The four ingredients
- The prior: what you believed about the hypothesis before seeing the new evidence.
- The likelihood: how probable the evidence would be if the hypothesis were true.
- The evidence: how probable the evidence is overall, summing over every hypothesis you are considering.
- The posterior: your revised belief once the evidence is taken into account.
In symbols, the posterior probability of a hypothesis H given evidence E equals the likelihood of E given H, multiplied by the prior of H, divided by the probability of E.
Read more
Working in odds
Many people find the odds form easier to use in practice. Posterior odds equal prior odds multiplied by the likelihood ratio, which is how much more expected the evidence is under one hypothesis than under its alternative. The awkward denominator cancels out, so you can reason with a simple comparison: does this observation make the claim more likely, and by roughly how much?
Kinds and flavours
- The frequentist and Bayesian viewpoints differ in how they treat probability: as long-run frequency, or as a degree of belief that can be attached to any statement.
- Conjugate models pair certain priors with certain likelihoods so the arithmetic stays simple.
- Naive Bayes classifiers apply the idea to sorting text and other messy data by treating features as independent.
- Bayesian networks and hierarchical models arrange many related quantities into a single structure.
- When exact calculation is out of reach, sampling methods approximate the answer instead.
The classic mistake
People routinely ignore the base rate. A test that is rarely wrong can still produce a majority of false alarms when the thing being tested for is uncommon, simply because there are so many more unaffected cases. Related to this is confusing the probability of the evidence given the hypothesis with the probability of the hypothesis given the evidence; they are not the same number, and one can be large while the other is small. Whenever you meet a striking conditional probability, ask which direction it points.
Practical tips for beginners
Start by writing down an honest prior, then ask how surprising the evidence would be if you were wrong. Consider what else could have produced the same observation. Finally, check whether your conclusion depends heavily on your starting assumption; if it does, you need more evidence, not a stronger opinion. Update in small steps and let repeated evidence accumulate.