Probability trees from written information, forwards and backwards
What this lesson covers
- Each branch of a tree carries a probability conditional on the branches before it.
- Working backwards through a tree finds the probability of an earlier event given a later one.
From words to a tree
- The exam gives a paragraph, not a tree.
- Drawing the tree is part of the question.
- First event first, then what depends on it.
| Information | Means | On the tree |
|---|---|---|
| 60% of customers | pay by card | first stage |
| 15% of card payers | buy a warranty | second stage, card branch |
| 5% of cash payers | buy a warranty | second stage, cash branch |
Build the tree
- First stage: card 0.6, cash 0.4.
- After card: warranty 0.15, none 0.85.
- After cash: warranty 0.05, none 0.95.

Try it: multiply along, add across
Multiply along each path
- Card and warranty: 0.6 × 0.15 = 0.09.
- Every path gets its product.
- The four products add to 1.

The four paths
- Along a path: multiply.
- Check: the four total 1.
- card, W: 0.6 × 0.15 = 0.09
- card, none: 0.6 × 0.85 = 0.51
- cash, W: 0.4 × 0.05 = 0.02
- cash, none: 0.4 × 0.95 = 0.38
- check: 0.09 + 0.51 + 0.02 + 0.38
- = 1
Add across paths
- Two paths end in W.
- Across paths: add.
- P(W) = 0.6 × 0.15 + 0.4 × 0.05
- = 0.09 + 0.02multiply along
- = 0.11add across
Working backwards
- Given W: only the W paths.
- The path ÷ the total.
- P(card | W)
- = P(card and W) ÷ P(W)
- = 0.09 ÷ 0.11
- = 0.81818…calculator
- = 0.81824 d.p.
Try it: the reverse question
Why the answer is so high
- Only 60% pay by card.
- But 82% of W buyers did.
- P(card) = 0.6forwards
- 0.15 ÷ 0.05 = 3card rate ÷ cash rate
- P(card | W) = 0.8182backwards: 82%
An unknown on the tree
- Call P(card) p.
- Multiply along, add across.
- P(card) = pthe unknown
- P(cash) = 1 − pbranches add to 1
- P(card and W) = 0.15pmultiply along
- P(cash and W) = 0.05(1 − p)multiply along
- 0.15p + 0.05(1 − p) = 0.12add: P(W) = 0.12
Solve for p
- Expand, collect, solve.
- Check in the equation.
- 0.15p + 0.05(1 − p) = 0.12
- 0.15p + 0.05 − 0.05p = 0.12expand
- 0.1p + 0.05 = 0.12collect p terms
- 0.1p = 0.07subtract 0.05
- p = 0.07 ÷ 0.1 = 0.7divide by 0.1
- P(card) = 0.7: 70% by card
- check: 0.15 × 0.7 + 0.05 × 0.3
- = 0.105 + 0.015 = 0.12
Where the marks are
- Achieved: a path probability.
- Merit: adding paths, and working backwards.
- Excellence: forming and solving an equation.
What to take away
- Along, multiply. Across, add. Backwards, divide.
| Build | first event, then conditional branches |
| Each set of branches | adds to 1 |
| Along a path | multiply |
| Across paths | add |
| Backwards | the path ÷ the total |
| Unknown | an equation from the tree |
Common mistakes
- P(warranty) = 0.15 + 0.05 = 0.2Multiply along each path first, then add across: 0.6 × 0.15 + 0.4 × 0.05 = 0.11.
- A warranty buyer is chosen, so P(card | warranty) = 0.15.0.15 is P(warranty | card). Backwards is path ÷ total: 0.09 ÷ 0.11 = 0.8182.
- P(cash and no warranty) = 0.4 × 0.05 = 0.02After cash, no warranty is 1 − 0.05 = 0.95, so the path is 0.4 × 0.95 = 0.38. Each set of branches adds to 1.
- Tested positive, so P(has the condition) = 0.9.That is P(positive | condition). Backwards: 0.036 ÷ 0.1128 = 0.3191, because most positives come from the 96% without it.
Your turn: four questions
- Draw the tree first.
- Four decimal places.
| Question | |
|---|---|
| Info | 4% have it. Positive: 90% if they do, 8% if not. |
| 1 | P(a random person tests positive)? |
| 2 | P(has the condition | tests positive)? |
| 3 | P(does not have it and tests negative)? |
| 4 | Of 1000 people tested, how many positives expected? |
Show answer
1. 0.04 × 0.9 + 0.96 × 0.08 = 0.036 + 0.0768 = 0.1128. 2. 0.036 ÷ 0.1128 = 0.3191. 3. 0.96 × 0.92 = 0.8832. 4. 1000 × 0.1128 = 112.8, about 113.
The answers: questions 1 and 2
- 1. P(not C) = 1 − 0.04 = 0.96C: has the condition
- P(pos) = 0.04 × 0.9 + 0.96 × 0.08two positive paths
- = 0.036 + 0.0768multiply along
- = 0.1128add across
- 2. P(C | pos) = 0.036 ÷ 0.1128path ÷ total
- = 0.31914…
- = 0.31914 d.p.
The answers: questions 3 and 4
- 3. P(neg | not C) = 1 − 0.08branches add to 1
- = 0.92
- P(not C and neg) = 0.96 × 0.92multiply along
- = 0.8832
- 4. expected = 1000 × P(pos)
- = 1000 × 0.1128
- = 112.8
- about 113 positiveswhole people
Sample question: Achieved
70% of students at a Hamilton school catch the bus. 10% of bus students are late on a given day, and 25% of the other students are late. Find the probability that a randomly chosen student catches the bus and is late.
Hint
Draw the tree with bus first, then late or on time. "And" along a path means multiply.
Answer
P(bus and late) = 0.07
Step by step
- Start the tree with the first event: bus 0.7 and not bus 0.3. These add to 1.
- From the bus branch, draw late 0.1 and on time 0.9. From the not-bus branch, draw late 0.25 and on time 0.75.
- The 10% is only for bus students, so it goes on the bus branch. That is what "of bus students" means.
- We want bus and late, which is one path through the tree.
- Along a path, multiply: 0.7 × 0.1 = 0.07.
- The classic mistake is to give 0.1. That is the chance a bus student is late, not the chance a random student is a late bus student.
- Check: 0.07 is smaller than 0.7 and smaller than 0.1, as an "and" probability must be.
Full working
- P(bus) = 0.7, P(late given bus) = 0.1read from the tree
- P(bus and late) = 0.7 × 0.1multiply along the path
- P(bus and late) = 0.07
Sample questions: Merit
70% of students at a Hamilton school catch the bus. 10% of bus students are late on a given day, and 25% of the other students are late. A student is late. Find the probability that they caught the bus.
Hint
Find P(late) by adding the two late paths, then divide the bus-and-late path by it.
Answer
P(bus given late) = 0.4828
Step by step
- Draw the tree: bus 0.7, not bus 0.3; then late 0.1 on the bus branch and late 0.25 on the other branch.
- "A student is late" is the given part. We only look at the paths that end in late.
- Bus and late: 0.7 × 0.1 = 0.07. Not bus and late: 0.3 × 0.25 = 0.075.
- Across paths, add: P(late) = 0.07 + 0.075 = 0.145.
- Working backwards: P(bus given late) = P(bus and late) ÷ P(late) = 0.07 ÷ 0.145.
- 0.07 ÷ 0.145 = 0.48276, so 0.4828.
- In words: although 70% catch the bus, only about 48% of late students are bus students, because bus students are rarely late.
- The classic mistake is to divide by 1 or by 0.7. The total is P(late), because "given late" restricts us to the late paths.
- Check: the late paths split as 0.4828 bus and 0.5172 not bus, and these add to 1.
Full working
- P(bus and late) = 0.7 × 0.1 = 0.07
- P(not bus and late) = 0.3 × 0.25 = 0.075
- P(late) = 0.07 + 0.075 = 0.145add across paths
- P(bus given late) = 0.07 ÷ 0.145the path ÷ the total
- P(bus given late) = 0.4828
A bag has 5 green and 3 yellow lollies. Mere takes two lollies without replacement. Find the probability they are the same colour. Given they are the same colour, find the probability they are both green.
Hint
Draw a tree where the second-draw numbers drop by one. Same colour is two paths: add them, then divide.
Answer
P(same colour) = 1328 = 0.4643; P(both green given same colour) = 1013 = 0.7692
Step by step
- First draw: green 58, yellow 38.
- Without replacement, 7 lollies are left for the second draw. After a green: green 47, yellow 37. After a yellow: green 57, yellow 27.
- Both green: 58 × 47 = 2056. Both yellow: 38 × 27 = 656.
- Same colour means green-green or yellow-yellow. They cannot both happen, so add: 2056 + 656 = 2656 = 1328 = 0.4643.
- For the second part, "given same colour" means we only look at those two paths.
- P(both green given same) = (2056) ÷ (2656) = 2026 = 1013 = 0.7692.
- There are more green lollies, so most same-colour pairs are green. 0.7692 makes sense.
- The classic mistake is to use 58 × 58 for both green. That puts the first lolly back in the bag.
- Check: green-green 20, green-yellow 15, yellow-green 15, yellow-yellow 6, all out of 56. 20 + 15 + 15 + 6 = 56.
Full working
- P(GG) = 58 × 47 = 2056without replacement
- P(YY) = 38 × 27 = 656
- P(same) = 2656 = 1328 = 0.4643add the two paths
- P(GG given same) = 2056 ÷ 2656 = 1013the path ÷ the total
- 0.4643 and 0.7692
Sample questions: Excellence
A screening test for a condition gives a positive result for 95% of people who have the condition, and for 5% of people who do not. In a large town, 10% of people tested get a positive result. Find the proportion p of people tested who have the condition. Hence find the probability that a person with a positive result has the condition, and explain what this means for someone who tests positive.
Hint
Put p on the first branch and 1 − p on the other. Adding the two positive paths gives an equation equal to 0.1.
Answer
p = 118 = 0.0556; P(condition given positive) = 0.5278
Step by step
- The unknown is the first branch, so call P(condition) = p and P(no condition) = 1 − p.
- Second stage: positive 0.95 after condition, positive 0.05 after no condition.
- Multiply along the positive paths: 0.95p and 0.05(1 − p).
- Add across them and set equal to the given total: 0.95p + 0.05(1 − p) = 0.1.
- Expand: 0.95p + 0.05 − 0.05p = 0.1, so 0.9p = 0.05.
- p = 0.05 ÷ 0.9 = 118 = 0.0556. About 5.6% of people tested have the condition.
- Working backwards: P(condition given positive) = P(condition and positive) ÷ P(positive).
- P(condition and positive) = 0.95 × 118 = 0.052778. Divide by 0.1: 0.5278.
- Meaning: even with a positive result, there is only about a 53% chance the person has the condition. About 47% of positives are false alarms.
- Why: the condition is rare, so the 5% false positives from the large healthy group are almost as many as the true positives.
- So a positive result should lead to a second, more accurate test, not a diagnosis.
- Check: 0.95 × 0.0556 + 0.05 × 0.9444 = 0.0528 + 0.0472 = 0.1. Correct.
Full working
- P(C) = p, P(not C) = 1 − p
- 0.95p + 0.05(1 − p) = 0.1add the two positive paths
- 0.9p = 0.05, p = 118 = 0.0556
- P(C and pos) = 0.95 × 118 = 0.052778
- P(C given pos) = 0.052778 ÷ 0.1the path ÷ the total
- p = 0.0556; P(C given pos) = 0.5278
A bag holds n red balls and 3 blue balls, with more red than blue. Two balls are taken without replacement. The probability that they are the same colour is 12. Find n.
Hint
Write P(same colour) in terms of n from the tree. Set it equal to 12 and you get a quadratic.
Answer
n = 6
Step by step
- There are n + 3 balls at the start, and n + 2 after one is taken out.
- Both red: nn + 3 × n − 1n + 2 = n(n − 1)(n + 3)(n + 2).
- Both blue: 3n + 3 × 2n + 2 = 6(n + 3)(n + 2).
- Same colour is both red or both blue, so add: n(n − 1) + 6(n + 3)(n + 2) = 12.
- Cross-multiply: 2(n² − n + 6) = (n + 3)(n + 2).
- Expand both sides: 2n² − 2n + 12 = n² + 5n + 6.
- Collect everything on one side: n² − 7n + 6 = 0.
- Factorise: (n − 1)(n − 6) = 0, so n = 1 or n = 6.
- Both make the probability 12, but the question says there are more red than blue, so n = 1 is out. n = 6.
- Check n = 6: both red 69 × 58 = 3072, both blue 39 × 28 = 672. Total 3672 = 12. Correct.
- The classic mistake is to forget that the second denominator is n + 2, not n + 3.
Full working
- P(RR) = n(n − 1)(n + 3)(n + 2)without replacement
- P(BB) = 6(n + 3)(n + 2)
- 2(n² − n + 6) = (n + 3)(n + 2)set the sum equal to 12
- n² − 7n + 6 = 0, so (n − 1)(n − 6) = 0
- n = 1 or 6; more red than blue, so n = 6check: 3072 + 672 = 12
- n = 6
Practise this
Report a mistake
More in AS 91267
Probability: when to add and when to multiply7 min
Two-way tables and conditional probability6 min
Probability trees from written information, forwards and backwards8 min
Expected value and expected numbers7 min
Relative risk: above 1, below 1, and evaluating a claim7 min
The normal distribution: probabilities and z-values8 min
Inverse normal: finding a value, the mean or the standard deviation8 min
Comparing distributions: shape, centre and spread7 min
Probability rules: 7 exam questions solved step by step10 min
Two-way tables: 7 exam questions solved step by step10 min
Probability trees: 7 exam questions solved step by step10 min
Expected value: 7 exam questions solved step by step10 min
Relative risk: 7 exam questions solved step by step9 min
Normal distribution: 7 exam questions solved step by step10 min
Inverse normal: 7 exam questions solved step by step10 min
Comparing distributions: 7 exam questions solved step by step10 minIs your child on track?
Take the free placement test