Bayes' Theorem (AA HL)

Bayes' theorem answers a question conditional probability alone can't: given the result of a test, what's the probability of the underlying cause? It reverses a conditional probability you already know into the one you actually want - the classic "positive test result, probability of actually having the condition" problem. It's part of the broader Probability topic.

13 questions on this sub-topic.

Practise Bayes' theorem → Try exam-style questions

Reversing a conditional probability

Covered under IB syllabus reference AHL4.13: use of Bayes' theorem for a maximum of three events - building on the conditional probability and independence work from SL4.6.

Bayes' theorem

\[P(B\mid A)=\dfrac{P(A\mid B)P(B)}{P(A)}\]

Given a test result, find the probability of the underlying cause - the classic "positive test, actually has the condition" question.

Not in the formula booklet - prior knowledge

Finding \(P(A)\) first

Bayes' theorem needs \(P(A)\) in the denominator. Usually you don't have it directly - build it with the law of total probability, summing \(P(B_i)P(A\mid B_i)\) over every way \(A\) can happen.

Need the full syllabus wording and formula-booklet reference table? See Probability.

Worked examples

1
Hard
No calc
[5 marks]

Event \(A\) has \(P(A) = 0.3\). Event \(B\) is such that \(P(B|A) = 0.8\) and \(P(B|A\prime) = 0.2\).

(a)  Find \(P(B)\).

(b)  Find \(P(A|B)\), giving your answer as a fraction.

Worked solution

(a)   \(P(B) = P(B|A)P(A) + P(B|A\prime)P(A\prime)\) M1
\(= 0.8(0.3) + 0.2(0.7) = 0.24 + 0.14 = 0.38\) A1

(b)   \(P(A|B) = \dfrac{P(B|A)P(A)}{P(B)}\) M1
\(= \dfrac{0.24}{0.38}\) M1
\(= \dfrac{12}{19}\) A1

M1 Total prob A1 P M1 Bayes M1 Substitute A1 Fraction
2
Hard
Calc
[6 marks]

A test is 95% accurate. 2% of people have a disease. If someone tests positive, find the probability they actually have it.

Worked solution

\(D\) = has disease, \(+\) = positive. \(P(D)=0.02,\ P(+|D)=0.95,\ P(+|D')\) M1 \(=0.05.\) A1
\(P(+) = 0.95(0.02) + 0.05(0.98)\) M1 \(= 0.068.\) A1
\(P(D|+) = \dfrac{0.019}{0.068}\) M1 \(\approx 0.279.\) A1

M1 Set up the conditional probabilities A1 Correct values M1 Law of total probability A1 \(P(+)=0.068\) M1 Bayes' theorem A1 Correct answer of \(\approx0.279\)
On the GDC, evaluate \(0.019/0.068\) directly once the tree diagram has organised the terms.

Common mistakes

Ready to practise properly?

11 Bayes' theorem questions, marked instantly like the real exam.

Quick answers

What is Bayes' theorem?

\(P(B\mid A)=\dfrac{P(A\mid B)P(B)}{P(A)}\). It lets you reverse a conditional probability - work out \(P(B\mid A)\) when you're given \(P(A\mid B)\) instead.

Is Bayes' theorem in the formula booklet?

No. It has to be derived from the conditional probability formula each time, usually by first finding \(P(A)\) with the law of total probability. For calculator tips, see the Probability GDC section.

← Back to Analysis & Approaches HL topics