Conditional Probability
Conditional probability is the probability of an event when you already know that another event has happened, written \(P(A\mid B)\). The known event shrinks the sample space, so \(P(A\mid B)=\dfrac{P(A\text{ and }B)}{P(B)}\). In NSW Year 10 Advanced maths you find conditional probabilities from lists, tables, Venn diagrams and tree diagrams (NESA outcome MA5‑PRO‑P‑01).
You will find probabilities given a condition on dice rolls, numbers and draws without replacement, use the formula forwards and backwards, and test whether events are independent. Tree diagrams cover students who study for a test, faulty bolts from two machines, rain on two days in a row and a bag of apricots. Harder questions find an unknown number of counters and prove that two mutually exclusive events cannot be independent. It is part of Year 10 Advanced Probability.
Every question with a fully worked solution.
- Conditional Probability - Video - Conditional Probability Watch
Theory
A conditional probability \(P(A\mid B)\) is the probability of \(A\) when you already know \(B\) has happened: \(P(A\mid B)=\dfrac{P(A\cap B)}{P(B)}\). This Year 10 Advanced maths page covers the restricted sample space, the formula, conditional probabilities from Venn diagrams, tables and tree diagrams, reversing a tree, and testing independence.
\(P(A\mid B)\) is read "the probability of \(A\) given \(B\)". The condition \(B\) is information that has already been learned, so outcomes outside \(B\) are no longer possible. The sample space shrinks to \(B\).
With equally likely outcomes, \(P(A\mid B)=\dfrac{n(A\cap B)}{n(B)}\): count the outcomes in both, and divide by the number in the condition, not by the original total.
The order matters. \(P(A\mid B)\) and \(P(B\mid A)\) have the same numerator but different denominators, so they are usually different. A test that is positive for \(80\%\) of people with an illness does not mean \(80\%\) of positive people have it.
Events are independent when the condition makes no difference: \(P(A\mid B)=P(A)\), which is the same as \(P(A\cap B)=P(A)\times P(B)\). Mutually exclusive events with non-zero probabilities are never independent, because \(P(A\mid B)=0\).
| Given information as | \(P(A\mid B)\) is |
|---|---|
| a list of equally likely outcomes | count \(A\) among the outcomes in \(B\) |
| a Venn diagram | overlap \(\div\) whole circle \(B\) |
| a two-way table | cell \(\div\) row or column total for \(B\) |
| a tree diagram (forwards) | read the second-stage branch after \(B\) |
| a tree diagram (backwards) | the path with both \(\div\) the sum of all paths ending in \(B\) |
How to find a conditional probability
- Identify the condition: the part after "given that", "if", or the item already known ("a student who…").
- Restrict the sample space to the condition. Find its size or probability.
- Count the event inside it: the outcomes in both the event and the condition.
- Divide: both \(\div\) condition. Simplify.
Other question types
- Find \(P(A\cap B)\): multiply \(P(A)\) by \(P(B\mid A)\). For \(A\) and not \(B\), multiply by \(1-P(B\mid A)\).
- Reverse a tree: add every path that ends in the given outcome to get the denominator, then divide the path you want by it (Example 3).
- Test independence: compare \(P(A\mid B)\) with \(P(A)\), or \(P(A\cap B)\) with \(P(A)P(B)\).
- Unknown counts: write the conditional probability with a pronumeral, such as \(\dfrac{n-1}{n+3}\), and solve (Example 4).
- Two items at once: a die and a coin, or two dice, can be listed as ordered pairs. Cross out the pairs outside the condition, then count.
(i) A card is chosen from cards numbered \(1\) to \(30\). Given that the number is odd, find the probability that it is prime.
(ii) Two dice are rolled. Given that the sum is \(7\), find the probability that one of the dice shows a \(2\).
(i) The condition leaves the \(15\) odd numbers. The odd primes up to \(30\) are \(3, 5, 7, 11, 13, 17, 19, 23, 29\): \(9\) of them (\(1\) is not prime).
| \(P(\text{prime}\mid\text{odd})\) | \(=\) | \(\dfrac{9}{15}=\boldsymbol{\dfrac{3}{5}}\) |
(ii) A sum of \(7\) leaves \(6\) outcomes: \((1,6), (2,5), (3,4), (4,3), (5,2), (6,1)\). Two of them contain a \(2\).
| \(P(\text{a } 2\mid\text{sum } 7)\) | \(=\) | \(\dfrac{2}{6}=\boldsymbol{\dfrac{1}{3}}\) |
Without the condition, \(P(\text{a } 2 \text{ on either die})=\dfrac{11}{36}\). The condition changes the answer.
(i) Find \(P(A\mid B)\) and \(P(B\mid A)\).
(ii) Are \(A\) and \(B\) independent?
(i) Divide the probability of both by the probability of the condition.
| \(P(A\mid B)\) | \(=\) | \(\dfrac{P(A\cap B)}{P(B)}=\dfrac{0.09}{0.25}=\boldsymbol{0.36}\) |
| \(P(B\mid A)\) | \(=\) | \(\dfrac{P(A\cap B)}{P(A)}=\dfrac{0.09}{0.5}=\boldsymbol{0.18}\) |
(ii) \(P(A\mid B)=0.36\) but \(P(A)=0.5\). Knowing \(B\) happened changes the chance of \(A\), so they are not independent. Check: \(P(A)\times P(B)=0.125\neq 0.09\).
(i) Find \(P(+)\).
(ii) A patient tests positive. Find the probability that they have the flu, correct to \(3\) decimal places.
(i) Two paths in the tree end in a positive result. Add them.
| \(P(+)\) | \(=\) | \(0.3\times 0.8+0.7\times 0.15\) |
| \(\) | \(=\) | \(0.24+0.105=\boldsymbol{0.345}\) |
(ii) The condition is a positive test, so divide the flu-and-positive path by \(P(+)\).
| \(P(F\mid +)\) | \(=\) | \(\dfrac{0.24}{0.345}\) |
| \(\) | \(\approx\) | \(\boldsymbol{0.696}\) |
Notice \(P(F\mid +)\approx 0.696\) is not the same as \(P(+\mid F)=0.8\).
(i) Find \(n\).
(ii) Find the probability that both balls are green.
(i) After one green ball is removed, \(n-1\) green and \(4\) yellow are left, \(n+3\) balls in total.
| \(\dfrac{n-1}{n+3}\) | \(=\) | \(\dfrac{1}{2}\) |
| \(2(n-1)\) | \(=\) | \(n+3\) |
| \(n\) | \(=\) | \(\boldsymbol{5}\) |
(ii) The box starts with \(5\) green and \(4\) yellow, \(9\) balls.
| \(P(GG)\) | \(=\) | \(P(G_1)\times P(G_2\mid G_1)\) |
| \(\) | \(=\) | \(\dfrac{5}{9}\times\dfrac{4}{8}=\boldsymbol{\dfrac{5}{18}}\) |
Common pitfalls
Frequently asked questions
What is conditional probability?
It is the probability of an event when you already know that another event has happened. Written \(P(A\mid B)\), it uses only the outcomes in \(B\) as the sample space.
What is the formula for conditional probability?
\(P(A\mid B)=\dfrac{P(A\cap B)}{P(B)}\). With equally likely outcomes this is the number of outcomes in both, divided by the number in \(B\).
How do you find a conditional probability from a tree diagram?
The second-stage branches already show conditional probabilities. To go backwards, add the probabilities of all paths that end in the given outcome, then divide the path you want by that sum.
How do you know if two events are independent?
\(A\) and \(B\) are independent if \(P(A\mid B)=P(A)\), or equivalently if \(P(A\cap B)=P(A)\times P(B)\). Knowing one happened does not change the chance of the other.
Why is P(A given B) different from P(B given A)?
Both use the outcomes in \(A\) and \(B\) for the numerator, but one divides by the number in \(B\) and the other by the number in \(A\). Unless \(A\) and \(B\) are the same size, the answers differ.