Bayes' Theorem Formula
The Formula
When to use: Start with a prior belief, then reweight it by how likely the evidence is under each hypothesis.
Quick Example
Notation
What This Formula Means
Bayes' theorem gives the posterior probability of a hypothesis given evidence: P(H|E) = \frac{P(E|H) \cdot P(H)}{P(E)}.
Start with a prior belief, then reweight it by how likely the evidence is under each hypothesis.
Formal View
Worked Examples
Example 1
mediumSolution
- 1 Prior: P(\text{spam})=0.3, P(\text{legit})=0.7
- 2 Likelihoods: P(\text{free}|\text{spam})=0.8, P(\text{free}|\text{legit})=0.1
- 3 Law of total probability: P(\text{free}) = 0.8(0.3) + 0.1(0.7) = 0.24 + 0.07 = 0.31
- 4 Bayes: P(\text{spam}|\text{free}) = \frac{P(\text{free}|\text{spam}) \times P(\text{spam})}{P(\text{free})} = \frac{0.8 \times 0.3}{0.31} = \frac{0.24}{0.31} \approx 0.774
Answer
Example 2
hardCommon Mistakes
- Confusing P(A|B) with P(B|A) โ the probability of having a disease given a positive test is NOT the same as the probability of testing positive given the disease
- Forgetting to compute the total probability P(B) using the law of total probability, which accounts for both P(B|A) and P(B|A^c)
- Ignoring the base rate (prior probability) โ a rare disease with a 99% accurate test still yields many false positives when the prior is very low
Why This Formula Matters
Bayes' theorem is the foundation of modern probabilistic reasoning, powering spam filters, medical diagnostics, and machine learning. It teaches us how to rationally update our beliefs when we receive new evidence, which is critical in fields from epidemiology to courtroom forensics.
Frequently Asked Questions
What is the Bayes' Theorem formula?
Bayes' theorem gives the posterior probability of a hypothesis given evidence: P(H|E) = \frac{P(E|H) \cdot P(H)}{P(E)}.
How do you use the Bayes' Theorem formula?
Start with a prior belief, then reweight it by how likely the evidence is under each hypothesis.
What do the symbols mean in the Bayes' Theorem formula?
P(A) prior, P(Bmid A) likelihood, P(Amid B) posterior.
Why is the Bayes' Theorem formula important in Math?
Bayes' theorem is the foundation of modern probabilistic reasoning, powering spam filters, medical diagnostics, and machine learning. It teaches us how to rationally update our beliefs when we receive new evidence, which is critical in fields from epidemiology to courtroom forensics.
What do students get wrong about Bayes' Theorem?
The base rate (prior probability P(H)) is the most commonly neglected factor โ ignoring it leads to the base-rate fallacy and wildly overconfident conclusions.
What should I learn before the Bayes' Theorem formula?
Before studying the Bayes' Theorem formula, you should understand: conditional probability, probability, sample space.