Bayes' theorem

About this lesson: Bayes' theorem

In short

Bayes’ theorem finds P(A | B) from P(B | A): P(A | B) = P(B | A)P(A)/P(B), with P(B) from the law of total probability.

What you'll explore

The theorem: Turning a condition round
Bayes’ theorem finds P(A | B) from P(B | A): P(A | B) = P(B | A)P(A)/P(B), with P(B) from the law of total probability.
Machines: Which machine made the faulty item?
Machine A makes 60% of items with 2% faulty; machine B makes 40% with 5% faulty. An item is faulty. Find the probability A made it.
Explore: A positive medical test
A disease affects a fraction p of people. The test detects it 95% of the time but wrongly says "positive" for f of healthy people.
Working: The test numbers, step by step
p = 0.01, sensitivity 0.95, false positive rate 0.05. Use a tree, then divide the "disease and positive" branch by all positive branches.
Check yourself: Bayes
Divide the branch by the total.

Also in this lesson

  • Bayes in detail
  • Common mistakes

Key words

Bayes' theorem
P(A | B) = P(B | A)P(A)/P(B).
Prior
Probability before evidence.
Posterior
Probability after evidence.
Sensitivity
P(positive | disease).
False positive
A positive result for a healthy person.
Base rate
How common a condition is.

Sources

  • NIE Sri Lanka, G.C.E. (A/L) Combined Mathematics syllabus, Grade 12 and 13, 2017 (competency level II 4.5).

An interactive lesson with a live experiment: move the sliders, press the buttons and answer quick questions. 5 short steps and a 30-question quiz. Part of the Family plan. Written and checked by Shalo Lab. Last updated 21 November 2026.

← Independent events

All lessons in Unit 35 · Probability · A/L Combined Maths

A/L Combined Maths past papers 2019–2025: analysis and 10 model papers with answers

මේ පිටුව සිංහලෙන් කියවන්න