All revision notes topics

4.13 Bayes' theoremIB Maths: Analysis and Approaches HL: Revision notes

Section 1

What problem does Bayes' theorem solve?

Often we know how likely an observation is given a cause, such as P(positive∣condition)P(\text{positive} \mid \text{condition}), but we want the reverse: how likely the cause is given the observation, P(condition∣positive)P(\text{condition} \mid \text{positive}). Bayes' theorem turns one conditional probability round into the other.

The starting probability of the cause, before the evidence, is the prior. The updated probability, after the evidence, is the posterior.

Key termsBayes' theoremprior probabilityposterior probability
Common mistake

Treating P(A∣B)P(A \mid B) and P(B∣A)P(B \mid A) as the same. A test that detects 95% of cases does not mean a positive result is 95% certain.

Section 2

Bayes' theorem for two events

From the formula booklet: P(B∣A)=P(B)P(A∣B)P(B)P(A∣B)+P(B′)P(A∣B′).P(B \mid A) = \frac{P(B)P(A \mid B)}{P(B)P(A \mid B) + P(B')P(A \mid B')}. The numerator is the probability of the route through BB that produces AA. The denominator is P(A)P(A), found by the law of total probability: add the probability of every route that produces AA.

Example: 2% have a condition CC; P(+∣C)=0.95P(+ \mid C) = 0.95, P(+∣C′)=0.10P(+ \mid C') = 0.10. Then P(+)=0.019+0.098=0.117P(+) = 0.019 + 0.098 = 0.117 and P(C∣+)=0.0190.117=0.162P(C \mid +) = \frac{0.019}{0.117} = 0.162.

Key termslaw of total probability
Exam tip

Think of a tree: the first set of branches is the cause, the second is the evidence. Multiply along branches, add the branches that end in the evidence, then divide.

Section 3

Bayes' theorem for three events

If B1B_1, B2B_2, B3B_3 are mutually exclusive and together cover every outcome (a partition), then P(Bi∣A)=P(Bi)P(A∣Bi)P(B1)P(A∣B1)+P(B2)P(A∣B2)+P(B3)P(A∣B3).P(B_i \mid A) = \frac{P(B_i)P(A \mid B_i)}{P(B_1)P(A \mid B_1) + P(B_2)P(A \mid B_2) + P(B_3)P(A \mid B_3)}. Example: machines A, B, C make 50%, 30%, 20% of bolts with defect rates 2%, 3%, 5%. P(D)=0.010+0.009+0.010=0.029P(D) = 0.010 + 0.009 + 0.010 = 0.029, so P(C∣D)=0.0100.029=1029P(C \mid D) = \frac{0.010}{0.029} = \frac{10}{29}. Machine C makes only 20% of the bolts but accounts for about 34% of the defective ones.

Key termspartitionmutually exclusive
Common mistake

Leaving out one of the three routes in the denominator. Every route that leads to the evidence must be included.

Section 4

Working with unknowns and complements

Some questions give P(A)P(A) and ask you to find a missing conditional probability first. Write the law of total probability as an equation: if P(R)=0.3P(R) = 0.3, P(L∣R)=0.4P(L \mid R) = 0.4, P(L∣R′)=pP(L \mid R') = p and P(L)=0.19P(L) = 0.19, then 0.12+0.7p=0.190.12 + 0.7p = 0.19, so p=0.1p = 0.1.

For the evidence not happening, use the complementary branches: P(L′∣R)=0.6P(L' \mid R) = 0.6 and P(L′)=1−0.19=0.81P(L') = 1 - 0.19 = 0.81, so P(R∣L′)=0.180.81=29P(R \mid L') = \frac{0.18}{0.81} = \frac{2}{9}.

Exam tip

Check your answers are sensible: every posterior must lie between 0 and 1, and the posteriors for a partition must add up to 1.

Section 5

Interpreting the answer in context

Bayes' theorem explains why screening a population for a rare condition gives many false positives: although the test is accurate, most people tested do not have the condition, so their false positives outnumber the true positives. With 2% prevalence, only about 16% of positives actually have the condition.

A second, independent piece of evidence updates the probability again. Multiply along a path through all the evidence: for a scam filter, P(S∣F∩W)=(0.1)(0.7)(0.9)0.0756=56P(S \mid F \cap W) = \frac{(0.1)(0.7)(0.9)}{0.0756} = \frac{5}{6}, up from 722\frac{7}{22} after one check. IB questions often ask you to comment: say what the number means for the person or the system.

Key termsfalse positive

Must know

  • Bayes' theorem reverses a conditional probability: from P(A∣B)P(A \mid B) to P(B∣A)P(B \mid A).
  • Numerator: the one route through the cause of interest. Denominator: P(A)P(A), the sum of all routes.
  • Up to three events in a partition: B1B_1, B2B_2, B3B_3.
  • Use the law of total probability to find unknown probabilities first.
  • Interpret the result: rare causes give low posteriors even with accurate tests.

That's the notes covered.

Carry on to the next subtopic.