Bayes' Theorem: Reversing a Conditional Probability | Analysis and Approaches IB Maths notes
Free preview: Bayes' Theorem: Reversing a Conditional Probability
Bayes' Theorem for Two Events
Analysis and approaches: HL only (AHL 4.13)
Let's start with a question you can already answer with a tree. A test for a disease is positive. How likely is it that the person really has the disease? The tree gives P(positive | disease), but we want it the other way round. Make a guess now: if the test catches 90% of cases, is the answer about 90%? Hold on to your guess.
What you already know
- means "the probability of A, given that B has happened".
- The multiplication rule: . On a tree, you multiply along the branches.
- means "not B", and .
Bayes' theorem
- Bayes' theorem is a formula for reversing a conditional probability: it finds P(B | A) when you know P(A | B).
- It is the same calculation you did on trees in the last note, written as one formula.
- The IB asks for it with two events (B and B′) or three events (B₁, B₂, B₃).
Where the formula comes from
- Write P(A ∩ B) in two ways, using the multiplication rule: and .
- Set them equal and divide by P(A): .
- Now P(A) itself comes from the two paths on a tree that end in A, one through B and one through B′: .
- Put that on the bottom:
💡 In plain words
- Top: the one tree path that goes through B and ends in A.
- Bottom: every path that ends in A (here, two of them).
- B is the event that happens first (the cause). A is the event you observe (the evidence).
- So the answer is: of all the ways to see the evidence, what fraction came through this cause?
The same thing on a tree
Here is the tree for the medical test below, written as a list of its four paths. Each path probability is the product of its two branches.
| First branch | Second branch | Path probability | Ends in +? |
|---|---|---|---|
| D (0.01) | + (0.9) | yes | |
| D (0.01) | − (0.1) | no | |
| D′ (0.99) | + (0.05) | yes | |
| D′ (0.99) | − (0.95) | no |
- Bayes' theorem only uses the paths that end in the evidence, +. The other two paths are ruled out by what we saw.
- Check: the four path probabilities add to 1.
The recipe
- Name the events. B = the cause, A = the evidence. Why: the question asks for P(cause | evidence).
- Write down the four probabilities: P(B), P(B′), P(A | B), P(A | B′).
- Top: multiply along the path through B to A.
- Bottom: add the two paths that end in A.
- Divide, and ask whether the answer makes sense.
👀 Watch me do it: 1% of a population has a disease D. A test is positive (+) for 90% of people with the disease and for 5% of people without it. Find P(D | +)
| What I write | Why I do it |
|---|---|
| Cause: D. Evidence: +. Want | Step 1: name the events. |
| P(D) = 0.01, P(D′) = 0.99, P(+ | D) = 0.9, P(+ | D′) = 0.05 | Step 2: "5% of people without it" is P(+ | D′). |
| Top: | Step 3: the path through D. |
| Bottom: | Step 4: both paths that end in +. |
| (3 s.f.) | Step 5: divide. |
| Only about 15%! Much smaller than the guess of 90%. | Sense check on the next line. |
- Why so small? The disease is rare, so the 5% false positives from the huge healthy group outnumber the true positives.
- This is why Bayes' theorem matters: our instincts get these questions badly wrong.
✏️ YOUR TURN 1
Try this first:
2% of parts from a factory are faulty. A detector flags 95% of faulty parts and 10% of good parts. A part is flagged. Find the probability that it is faulty.
Answer:
Unlock the full note: start 7 days free.
Log in or subscribe to read the rest of this note. Members also get the AI tutor, practice quizzes, mock exams and flashcards for this topic.
All notes in Probability (SL 4.5, 4.6, 4.11; AHL 4.13)
- Sample Spaces, Venn Diagrams and Set Notation in Probability
- Mutually Exclusive and Independent Events with Tree Diagrams
- Conditional Probability: The Formula, Venn Diagrams and Two-Way Tables
- Conditional Probability on Tree Diagrams and Testing for Independence
- Bayes' Theorem: Reversing a Conditional Probability
What's inside for this topic
5 teacher notes, 71 practice questions, 38 flashcards, 2 quizzes.
Get the full notes, every practice question, flashcards, quizzes and mock papers.
Previous note: Conditional Probability on Tree Diagrams and Testing for Independence