Back to the on-screen lesson ·

Conditional probability

Conditional probability from counts and from probabilities, the test for independence, and the addition rule.

Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.

1. What you will learn

In this lesson you learn what it means to work out a probability given that something has already happened: the group you are choosing from shrinks, and $P(B \mid A)$ is the share of the $A$s that are also $B$s. You build every one of these probabilities out of whole-number counts in a two-way table, so the arithmetic stays exact. You then use the same counts to test whether two events are independent, by checking whether $P(A \cap B)$ really is $P(A) \times P(B)$, and to apply the addition rule $P(A \cup B) = P(A) + P(B) - P(A \cap B)$, which subtracts the overlap so that nobody is counted twice.

2. What you bring to this

You can write a probability as a fraction of counts — six red counters out of twenty is $\frac{6}{20} = \frac{3}{10}$ — you can read a two-way table, and you can multiply and subtract fractions. Every probability in this lesson is built out of whole-number counts, so nothing here needs rounding and every answer is exact.

3. Words you will need

Two-way table: counts split by two properties at once, with the four inner cells adding to the grand total.

Margins (marginal totals): the row and column totals down the side and along the bottom. They are where $P(A)$ and $P(B)$ come from.

Intersection $A \cap B$: both events happen. Union $A \cup B$: at least one of them happens.

Conditional probability $P(B \mid A)$: the probability of $B$ given that $A$ has happened. Read the bar as "given".

Independent: knowing that one event happened changes nothing about the other — $P(A \cap B) = P(A) \times P(B)$, equivalently $P(B \mid A) = P(B)$.

Mutually exclusive: the two events cannot both happen, so $P(A \cap B) = 0$. A different idea entirely from independence.

4. Conditioning, independence and the addition rule

Conditional probability narrows the group you are choosing from: $P(B \mid A) = \frac{P(A \cap B)}{P(A)}$, which with counts is simply how many of the $A$s are also $B$s. Take $200$ students, of whom $48$ play sport and music, $72$ play sport only, $32$ do music only and $48$ do neither. The margins give sport $120$ and music $80$. Then $P(\text{music} \mid \text{sport}) = \frac{48}{120} = \frac{2}{5}$: the sport players are the whole denominator and the other $80$ students are gone. Now test independence: $P(\text{sport}) = \frac{120}{200} = 0.6$, $P(\text{music}) = \frac{80}{200} = 0.4$, and $0.6 \times 0.4 = 0.24$, which is exactly $\frac{48}{200}$ — so these two are independent, and indeed $P(\text{music} \mid \text{sport}) = 0.4 = P(\text{music})$. Change one cell and it fails: in a term where $18$ of $60$ rainy days had a late bus but only $14$ of $140$ dry days did, $P(\text{late} \mid \text{rain}) = \frac{18}{60} = 0.3$ against $P(\text{late}) = \frac{32}{200} = 0.16$, so rain and lateness are not independent. Finally the addition rule: $P(A \cup B) = P(A) + P(B) - P(A \cap B)$, because adding the two counts puts everyone in the overlap in twice. Here $0.6 + 0.4 - 0.24 = 0.76$, and counting directly gives $\frac{48 + 72 + 32}{200} = 0.76$ too.

Another way: picture

The two-way table with its margins written in. Conditioning on sport means covering everything except the sport row: the row total $120$ becomes the new whole, and the $48$ inside it is the part. Nothing was recalculated — you simply looked at a smaller table.

Another way: story

Given means you already know. Before you are told anything, all $200$ students are possible. The moment somebody says "she plays sport", $80$ of them stop being possible, and the fraction you want is measured against what is left.

5. Three things that trip people up

Dividing by everybody after the question has already narrowed the group. Given that the student plays football throws away every student who does not. The denominator is the football players, not the year group; the rest are no longer candidates at all.

Turning the bar round. $P(\text{mislabelled} \mid \text{flagged})$ and $P(\text{flagged} \mid \text{mislabelled})$ are different numbers with different denominators, and swapping them is the single most expensive mistake in this whole topic. Say the condition out loud — what am I already standing inside? — before you write anything down.

Reading independent as "no overlap". Mutually exclusive events are the opposite of independent: if $A$ happening rules $B$ out completely, then knowing $A$ tells you everything about $B$. Independence is one equation, $P(A \cap B) = P(A) \times P(B)$, and it is tested, never eyeballed.

6. $P(\text{music} \mid \text{sport})$ from a table of $200$ students

  1. The sport row holds $48$ who also do music and $72$ who do not, so its total is $120$.

    Conditioning on sport makes that row total the denominator.

  2. Of those $120$, the ones who also do music number $48$: $\frac{48}{120}$.

  3. $\frac{48}{120} = \frac{2}{5} = 0.4$.

    Exact, because both numbers are counts.

7. Independent? And what is $P(\text{sport} \cup \text{music})$?

  1. $P(\text{sport}) = \frac{120}{200} = 0.6$ and $P(\text{music}) = \frac{80}{200} = 0.4$, so the product is $0.24$.

    The margins give the two single-event probabilities.

  2. $P(\text{sport} \cap \text{music}) = \frac{48}{200} = 0.24$: the same, so the two events are independent.

    Equal, not merely close — the test is exact.

  3. $P(\text{sport} \cup \text{music}) = 0.6 + 0.4 - 0.24 = 0.76$.

    Check by counting: $48 + 72 + 32 = 152$ out of $200$.

8. Your turn: of $90$ club members, $54$ swim, and $36$ of the swimmers also run

  1. Given that the member swims, the denominator is the $54$ swimmers.

    The other $36$ members are no longer candidates.

  2. Your turn: work this step out. Its working is at the end of the packet.

    $P(\text{runs} \mid \text{swims}) = \frac{36}{54} = \frac{2}{3}$.

9. Guided practice

A year group has 50 students. Of them, 31 play hockey, and 14 students both play hockey and learn the piano. One of the students who play hockey is chosen at random. What is the probability that this student also learns the piano? Give the probability as a fraction in its lowest terms.

answer

10. Guided practice

55 students were surveyed, and each one falls in exactly one of the four boxes below. Complete the row totals, the column totals and the grand total.

Has a bus passNo bus passTotal
Cycles to school165
Does not cycle1618
Total

11. Practice

A survey of 100 commuters recorded whether each one owns a bicycle (event $A$) and whether each one holds a bus pass (event $B$). Of them, 70 are in $A$, 70 are in $B$, and 49 are in both. Are $A$ and $B$ independent?

12. Practice

A shop asked 51 customers what they had bought. 20 bought coffee, 19 bought eggs, and 3 of them bought both. One customer is chosen at random. What is the probability that this customer bought coffee or eggs, or both? Give the probability as a fraction in its lowest terms.

Answer:

13. Somewhere new

A parcel depot passes every parcel under a scanner, which flags the ones it thinks are mislabelled. Last week the scanner flagged 21 parcels, and 6 of those really were mislabelled. It also let 4 mislabelled parcels through unflagged. The supervisor says: “when this scanner flags a parcel, the parcel is more likely than not to be mislabelled.” Is she right?

14. Lesson test

Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.

15. Test question

A year group has 45 students. Of them, 24 play football, and 17 students both play football and sing in the choir. One of the students who play football is chosen at random. What is the probability that this student also sings in the choir? Give the probability as a fraction in its lowest terms.

answer

16. What you can do now

You can complete a two-way table, read a conditional probability from it, test two events for independence and apply the addition rule. Without looking back, say why $P(A \cup B)$ subtracts $P(A \cap B)$, and why two events that can never happen together are the opposite of independent.

Working for the steps left to you

8. Your turn: of $90$ club members, $54$ swim, and $36$ of the swimmers also run, step 2