Bayes' Theorem: Updating Beliefs with Evidence
Bayes' Theorem updates your belief in a cause after seeing new evidence. It's used in medical diagnostics to interpret test results and in spam filters. The common footgun is ignoring the base rate—how likely the cause was *before* the evidence appeared.
WHY IT EXISTS We often know the probability of an effect given a cause, like the chance of a fire alarm going off if there's a fire. But what we really want to know is the reverse: the probability of a cause given an effect, like the chance there's a fire if the alarm is going off. Bayes' theorem was developed to solve this exact problem of inverting conditional probabilities.
THE MENTAL MODEL Think of Bayes' theorem as a formal way to update your beliefs in light of new evidence. You start with an initial belief about something (the "prior"). When you observe new data (the "evidence"), the theorem tells you precisely how to adjust your initial belief to form a new, more informed belief (the "posterior"). It's a mathematical rule for learning from experience.
HOW IT WORKS The theorem calculates the probability of a cause given an effect, P(Cause|Effect). To do this, it combines three pieces of information. First, the "prior" or base rate, P(Cause): how likely was the cause before any evidence? Second, the "likelihood", P(Effect|Cause): how likely is this effect if the cause is true? Third, the overall probability of the effect, P(Effect). The formula uses the likelihood and prior to determine the updated probability of the cause.
WHEN TO USE IT Use Bayes' theorem whenever you need to infer a hidden state or cause from observed data. It's fundamental in data science and machine learning. Key applications include medical diagnostics (calculating the probability of a disease given a test result), spam filtering (classifying an email as spam based on its words), and A/B testing (determining which version of a product is better given user data).
WHEN NOT TO USE IT The theorem's output is only as good as its inputs. If your prior probability is a wild guess or your likelihood model is wrong, the result will be unreliable. It's less useful for simple systems where events are truly independent, as there is no meaningful conditional relationship to analyze or invert.
ONE CANONICAL EXAMPLE Imagine a disease present in 1% of the population. A test for it is 99% accurate (it correctly identifies 99% of sick people and 99% of healthy people). If you test positive, what's the chance you have the disease? Intuition says 99%, but Bayes' theorem reveals it's only about 50%. Why? Because the vast number of healthy people (99% of the population) still produces a number of false positives that is roughly equal to the number of true positives from the small sick population. Ignoring the low base rate (the 1% prevalence) is a classic error called the base rate fallacy.
Read the original → en.wikipedia.org
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.