Exam PProbability foundationsFree to read

Bayes' theorem and the law of total probability

Reverse a conditional probability: weight each cause by its prior and its likelihood, then normalise. The denominator is always the law of total probability.

The formulas

Law of total probability
Bayes
Two-event form
Odds form

Where it comes from

  1. The partition cuts into disjoint pieces , so .
  2. Bayes is then just with both parts rewritten using the multiplication rule.
  3. The odds form drops the shared denominator, which is why it is faster when only a ratio is asked for.

Worked example

A motor book is 50% low risk, 30% standard and 20% high risk, with annual claim probabilities of 2%, 5% and 11%. A policyholder claims this year. What is the probability they are high risk?

  1. Total probability of a claim: .
  2. Bayes numerator for high risk: .
  3. .
  4. The high-risk group is 20% of the book but 46.8% of the claimants — the prior has been sharply updated.

Answer: 0.4681

This answer is recomputed from the site’s own interest-theory and probability functions every time the test suite runs, so the page and the mathematics cannot drift apart.

Memory hooks

  • Numerator is one prior times one likelihood; denominator is the sum of all of them. The posteriors must sum to 1 — check it.
  • The denominator IS the law of total probability. Compute it once and reuse it for every class.

Traps

  • Forgetting a class in the denominator, so the posteriors do not sum to 1.
  • Swapping prior and likelihood — the prior is the class probability, the likelihood is the event probability GIVEN the class.

Related

Drill this: the Exam P question bank has original questions on this topic, and today’s free round is open to everyone.