Tree diagrams and reverse conditioning

Lessons and exercises follow the school system and stay in its language.Les leçons et les exercices suivent le système scolaire et restent dans sa langue.Lektionen und Übungen folgen dem Schulsystem und bleiben in seiner Sprache.

About this lesson

Algebra II › Probability and decisions

To save a PDF, choose “Save as PDF” in the print dialog.

Sources and credits

Written with this source as a starting point:

sedifier rewrote the text and added its own examples and exercises.

Written with AI assistance; every answer is checked by our math engine. Not yet reviewed by a teacher.

This lesson: CC BY-SA 4.0, © sedifier · All credits

Tree diagrams and reverse conditioning

Probability and decisions. expected value, fair decisions, simulation, random variables

Warm-up

Three quick questions from earlier lessons.

  1. Two independent machines fail with probabilities 0.2 and 0.2. Find the probability that both fail.
  2. P(A) = 3/10, P(B) = 6/10 and P(A and B) = 18/100. Are A and B independent?
    1. Yes: P(A and B) = P(A)·P(B)
    2. No, because P(A and B) > 0
    3. It cannot be decided
  3. A bag has 3 red and 3 blue marbles. Two are drawn without replacement. Find P(both red).

Discover

1% of people have a condition. A test is positive for 95% of them, and for 5% of healthy people. Of 10,000 people, about how many test positive in total?

  1. About 590
  2. About 5,000

Key idea

A tree organizes conditional probabilities.

First branches: P(A)P(A) and P(not A)P(\text{not } A); second branches: conditional probabilities. Multiply along a path; add the paths that end in BB to get P(B)P(B). Then P(A∣B)=P(A and B)P(B)P(A \mid B) = \dfrac{P(A \text{ and } B)}{P(B)} (reverse conditioning, Bayes' rule).

Worked example

With the numbers above: P(condition | positive).

0.01×0.95=0.00950.01 \times 0.95 = 0.0095
Path: condition, positive.
P(+)=0.0095+0.99×0.05=0.059P(+) = 0.0095 + 0.99 \times 0.05 = 0.059
Both paths to positive.
P(condition∣+)=0.00950.059≈0.16P(\text{condition} \mid +) = \tfrac{0.0095}{0.059} \approx 0.16
Divide.

Your turn, guided

Your turn: P(A) = 0.2, P(B | A) = 0.5, P(B | not A) = 0.25. Find P(B).

0.30.3
0.2 × 0.5 + 0.8 × 0.25.

Practice ★

  1. 12% of a population has a condition. A test is positive for 86% of people with the condition and for 11% of people without it. Find P(positive).
  2. 14% of a population has a condition. A test is positive for 94% of people with the condition and for 8% of people without it. Find P(positive).
  1. 22% of a population has a condition. A test is positive for 81% of people with the condition and for 12% of people without it. Find P(condition | positive).

Watch out!

Practice ★★

  1. A disease affects 1 in 1,000 people. A test is 93% accurate for both sick and healthy people. Your test is positive. What is most likely?
    1. You are still more likely healthy: false positives from the many healthy people outnumber the true positives
    2. You are about 93% likely to be sick
    3. You are certainly sick

Exit ticket

Three questions to check you have got it.

  1. 12% of a population has a condition. A test is positive for 86% of people with the condition and for 11% of people without it. Find P(positive).
  2. 14% of a population has a condition. A test is positive for 94% of people with the condition and for 8% of people without it. Find P(positive).
  3. 28% of a population has a condition. A test is positive for 95% of people with the condition and for 14% of people without it. Find P(positive).

Summary card

Trees

  • Multiply along paths; add paths to the same end.
  • P(A∣B)=P(A and B)/P(B)P(A \mid B) = P(A \text{ and } B)/P(B).

Watch out: with rare events, most positives can be false.

One more step is optional: a challenge. Try it, or finish the lesson now.

Challenge ★★★

  1. 16% of a population has a condition. A test is positive for 93% of people with it and for 13% of people without it. Your test is negative. Find the probability that you do not have the condition.
Sources and credits

Written with this source as a starting point:

sedifier rewrote the text and added its own examples and exercises.

Written with AI assistance; every answer is checked by our math engine. Not yet reviewed by a teacher.

This lesson: CC BY-SA 4.0, © sedifier · All credits