Bayes' Theorem Formula
Bayes' theorem gives the posterior probability of a hypothesis given evidence: P(H|E) = P(E|H) · P(H)/(P(E)).
The Formula
Ask yourself: Am I given and a prior, and asked for the flipped ?
Quick example
Notation
What this formula means
Bayes' theorem gives the posterior probability of a hypothesis given evidence: .
Bayes works like a detective weighing suspects. Before any clue, some suspects are more likely than others: the prior. A clue such as muddy boots fits some suspects better than others: the likelihood. Multiply the two for each suspect and rescale so the chances add to 1. A clue that fits a rare suspect perfectly can still point to a common suspect it fits less well.
Formal view
Worked examples
Example 1
mediumShow solution
Answer
First step
See the full worked solution + why-it-works coaching
SetupKey insightWhy it worksCommon pitfallConnection
Example 2
hardExample 3
mediumCommon mistakes
- Treating as equal to - Bayes flips them, and the prior makes the two differ.
- Ignoring the base rate (prior) - a rare condition keeps the posterior low even after strong evidence.
- Using the wrong denominator - must total over ALL hypotheses (true and false), e.g. true positives plus false positives.
Why this formula matters
Bayes' theorem is how doctors should read test results, how spam filters score emails and how evidence should be weighed in court. Without it people confuse with : they hear that a test catches 90% of cases and conclude that a positive result means a 90% chance of disease, when for a rare disease it can be about 15%. The theorem forces the key question: how common was this to begin with?
Frequently asked questions
What is the Bayes' Theorem formula?
Bayes' theorem gives the posterior probability of a hypothesis given evidence: .
How do you use the Bayes' Theorem formula?
Use Bayes' theorem when you are given a conditional in one direction, such as test accuracy , plus a prior or base rate, and asked for the reverse: how likely the cause is given the evidence. Typical settings are medical tests, spam filters, faulty-machine problems and eyewitness reports. If a two-way table of counts is given, read the conditional directly; if the question asks for two events both happening, use the multiplication rule.
What do the symbols mean in the Bayes' Theorem formula?
is the prior, is the likelihood, is the posterior, and is the total evidence probability.
Why is the Bayes' Theorem formula important in Math?
Bayes' theorem is how doctors should read test results, how spam filters score emails and how evidence should be weighed in court. Without it people confuse with : they hear that a test catches 90% of cases and conclude that a positive result means a 90% chance of disease, when for a rare disease it can be about 15%. The theorem forces the key question: how common was this to begin with?
What do students get wrong about Bayes' Theorem?
The procedure for bayes' theorem is the easy part; the trap is treating as equal to . Asking "Am I given and a prior, and asked for the flipped ?" first is what keeps a correct-looking calculation from being attached to the wrong concept.
What should I learn before the Bayes' Theorem formula?
Before studying the Bayes' Theorem formula, you should understand: conditional probability, probability, sample space.