Bayes' Theorem
Bayes' Theorem is a formula that lets you update the probability of an event based on new information or evidence. It answers the question: given that something has already happened, how likely is it that a particular cause was responsible?
Bayes' Theorem provides a method for computing the posterior probability — the probability of event given that event has occurred — using the prior probability of , the likelihood of given , and the total probability of . It is derived directly from the definition of conditional probability and the law of total probability. The theorem is foundational in statistical inference, where it allows us to revise beliefs as new data becomes available.
Key Formula
Where:
- = the posterior probability of A given that B has occurred
- = the likelihood — the probability of observing B if A is true
- = the prior probability of A before observing B
- = the total probability of B across all possible causes
Worked Example
Problem: A disease affects 1% of a population. A test for the disease is 95% accurate: it correctly identifies a sick person 95% of the time (sensitivity) and correctly identifies a healthy person 90% of the time (specificity). If a person tests positive, what is the probability they actually have the disease?
Step 1: Define the events and identify the known probabilities.
P(D) = 0.01$, $P(\text{Pos} \mid D) = 0.95$, $P(\text{Pos} \mid D^c) = 0.10
Step 2: Calculate the total probability of testing positive using the law of total probability.
Step 3: Apply Bayes' Theorem to find the probability of having the disease given a positive test.
Answer: There is roughly an 8.8% chance the person actually has the disease, even after testing positive. The low prior probability (1%) means most positive results are false positives.
Why It Matters
Bayes' Theorem is central to medical testing, spam filters, machine learning, and forensic analysis — anywhere you need to interpret evidence. In AP Statistics, it appears in questions about diagnostic tests and two-way tables. The medical testing example above shows why understanding Bayes' Theorem matters: without it, a 95%-accurate test might make you think a positive result is almost certain proof of disease, when the actual probability can be surprisingly low.
Common Mistakes
Mistake: Confusing with
Correction: These are not the same. The probability of testing positive given you have a disease is very different from the probability of having the disease given a positive test. This mix-up is so common it has a name: the prosecutor's fallacy.
Mistake: Forgetting to account for the full denominator
Correction: You must include all the ways can happen — not just the case where is true. Use the law of total probability: .
