Free access until 31 December 2026 · Physics and Maths questions and notes, updated continuously · Build a test

ExaminerPrep › IGCSE Maths (Edexcel) › Notes

IGCSE Maths (Edexcel) · Topic 6 · 6.4 · Higher only

Conditional probability and tree diagrams

Conditional probability deals with situations where the chance of one event depends on what has already happened. This note covers tree diagrams with and without replacement, the notation \(P(B\mid A)\), and conditional probabilities read from tree diagrams and two-way tables. It matters in medical testing, quality control and any process where outcomes are linked.

Key ideas

Two events are independent if the first result does not change the probability of the second, for example picking a counter and replacing it. Events are dependent if the first result does change the second probability, for example picking a counter and keeping it. When items are taken without replacement, the numbers in the bag change, so the probabilities on the second set of branches are different.

The probability of \(B\) happening given that \(A\) has already happened is called a conditional probability and is written \(P(B\mid A)\). The vertical bar is read "given".

Tree diagrams.

  • Draw the first set of branches with their probabilities. At the end of each branch, draw the second set. If the events are dependent, work out the new probabilities carefully, for example reduce the total by 1 after taking out an item.
  • The probabilities on the branches from any one point always add up to 1. Check this on every pair.
  • Multiply along a path to get the probability of that combination of outcomes. This uses the rule \(P(A\text{ and }B)=P(A)\times P(B\mid A)\).
  • Add the probabilities of all paths that give the result you want.
  • The final probabilities of all paths add up to 1, which is a good check.

Conditional probability from a tree. Suppose you are told the final result and asked about the first stage, such as "given that the train was late, what is the probability that it rained?" The fixed result is the new "total". Use:

\[P(A\mid B)=\frac{P(A\text{ and }B)}{P(B)}\]

Find \(P(B)\) by adding every path that leads to \(B\), and find \(P(A\text{ and }B)\) from the single path where both happen.

Conditional probability from a two-way table. When the data are in a table, the words after "given that" tell you which row or column to use as the total. For example, "the probability that a student plays music, given that the student is a girl" uses only the girls' row as the denominator.

The order matters: \(P(A\mid B)\) is usually not equal to \(P(B\mid A)\). Be clear which condition you are given.

Definitions and formulae

Term or formulaMeaning / when to use
\(P(B\mid A)\)Probability of \(B\) given that \(A\) has happened
\(P(A\text{ and }B)=P(A)\times P(B\mid A)\)Multiply along a path of a tree diagram
Independent events\(P(B\mid A)=P(B)\), so \(P(A\text{ and }B)=P(A)\times P(B)\)
\(P(A\mid B)=\dfrac{P(A\text{ and }B)}{P(B)}\)Probability of \(A\) given \(B\)
Without replacementTotal number of items falls by 1 after each pick
Branches from one pointAlways sum to 1

Worked examples

Example 1 A bag has 6 red and 4 blue counters. Two counters are taken at random without replacement. Find the probability that (a) both are red, (b) they are different colours, (c) at least one is blue.

First pick: \(P(R)=\tfrac{6}{10}\), \(P(B)=\tfrac{4}{10}\). After a red is taken, there are 5 red and 4 blue (9 counters): \(P(R)=\tfrac59\), \(P(B)=\tfrac49\). After a blue is taken, there are 6 red and 3 blue: \(P(R)=\tfrac69\), \(P(B)=\tfrac39\).

(a) \(P(RR)=\tfrac{6}{10}\times\tfrac59=\tfrac{30}{90}=\tfrac13\).

(b) Two paths: \(P(RB)=\tfrac{6}{10}\times\tfrac49=\tfrac{24}{90}\) and \(P(BR)=\tfrac{4}{10}\times\tfrac69=\tfrac{24}{90}\). Total \(=\tfrac{48}{90}=\tfrac{8}{15}\).

(c) "At least one blue" is the opposite of "both red". \(1-\tfrac13=\tfrac23\).

Answer: (a) \(\tfrac13\), (b) \(\tfrac{8}{15}\), (c) \(\tfrac23\).

Example 2 The probability that it rains on a given morning is 0.3. If it rains, the probability that Sam's train is late is 0.4. If it does not rain, the probability that the train is late is 0.1. (a) Find the probability that the train is late. (b) Given that the train is late, find the probability that it rained.

Tree: rain 0.3 (then late 0.4, on time 0.6); no rain 0.7 (then late 0.1, on time 0.9).

(a) Rain and late: \(0.3\times0.4=0.12\). No rain and late: \(0.7\times0.1=0.07\). \(P(\text{late})=0.12+0.07=0.19\).

(b) \(P(\text{rain}\mid\text{late})=\dfrac{P(\text{rain and late})}{P(\text{late})}=\dfrac{0.12}{0.19}=0.6315\ldots\)

Answer: (a) 0.19, (b) \(\tfrac{12}{19}=0.632\) (3 s.f.).

Example 3 80 students were asked whether they study music. Boys: 14 yes, 26 no. Girls: 22 yes, 18 no. A student is picked at random. Find (a) \(P(\text{music}\mid\text{girl})\) and (b) \(P(\text{girl}\mid\text{music})\).

There are \(14+26=40\) boys and \(22+18=40\) girls. The number who study music is \(14+22=36\).

(a) Given that the student is a girl, use only the 40 girls: \(\tfrac{22}{40}=0.55\).

(b) Given that the student studies music, use only the 36 music students: \(\tfrac{22}{36}=\tfrac{11}{18}=0.611\) (3 s.f.).

Answer: (a) 0.55, (b) \(\tfrac{11}{18}\approx0.611\). The two are different because the condition is different.

Common errors

  • Keeping the same denominators on the second branches when items are not replaced. Both the number of favourable items and the total may change.
  • Adding along a path instead of multiplying, or multiplying between different paths instead of adding.
  • Using the grand total as the denominator for a "given that" question. The denominator is the total for the condition only.
  • Reversing the condition, for example giving \(P(\text{girl}\mid\text{music})\) when asked for \(P(\text{music}\mid\text{girl})\).
  • Not checking that each pair of branches adds to 1, which would catch a slip in the numbers early.

Exam tip: Write each branch probability on the diagram as a fraction or decimal, and show the multiplication for the path you use. For a "given that" question, write down the formula first, then find its top and bottom separately.

Check yourself

  1. A bag has 5 red and 3 green counters. Two are taken without replacement. Find the probability that both are green.
    Answer\(\tfrac38\times\tfrac27=\tfrac{6}{56}=\tfrac{3}{28}\).
  2. \(P(A)=0.6\) and \(P(B\mid A)=0.5\). Find \(P(A\text{ and }B)\).
    Answer\(0.6\times0.5=0.3\).
  3. A factory has two machines. Machine A makes 60% of the items and 2% of those are faulty. Machine B makes 40% of the items and 5% of those are faulty. Find the probability that a random item is faulty.
    AnswerA and faulty: \(0.6\times0.02=0.012\). B and faulty: \(0.4\times0.05=0.02\). \(P(\text{faulty})=0.012+0.02=0.032\).
  4. Using question 3, given that an item is faulty, find the probability that it came from machine B.
    Answer\(\dfrac{0.02}{0.032}=0.625=\tfrac58\).