Conditional probability

Conditional probability

Spec M2 · AQA A-Level Maths: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • P(A∣B)=P(A∩B)P(B)P(A|B)=\dfrac{P(A\cap B)}{P(B)}: divide by the probability of the condition (after 'given that').
  • P(A∣B)P(A|B) and P(B∣A)P(B|A) are usually different.
  • On a tree diagram the second-stage branches are conditional on the first; without replacement they change.
  • To reverse a condition, take the intersection from the tree and divide by the total probability of the new condition.
  • AA and BB are independent if P(A∣B)=P(A)P(A|B)=P(A), equivalently P(A∩B)=P(A)P(B)P(A\cap B)=P(A)P(B).

The formula

P(A∣B)P(A|B) is the probability of AA given that BB has occurred. The sample space shrinks to BB, so you divide by P(B)P(B).

Rearranging gives the multiplication rule P(A∩B)=P(B)×P(A∣B)P(A\cap B)=P(B)\times P(A|B).

P(A∣B)P(A|B) and P(B∣A)P(B|A) are usually different: the probability that a Biology student also takes Chemistry is not the probability that a Chemistry student also takes Biology.

Always identify the condition (after 'given that') and divide by its probability.

  1. 1

    Find the condition

    the event after 'given that', B

  2. 2

    Restrict the sample space

    consider only outcomes in B

  3. 3

    Divide

    P(A ∩ B) ÷ P(B)

Calculating P(A|B).
  • P(A∣B)P(A|B)P(A∩B)P(B)\dfrac{P(A\cap B)}{P(B)}
  • P(A∩B)P(A\cap B)P(B)×P(A∣B)P(B)\times P(A|B)

In a class, P(A∩B)=0.2P(A\cap B)=0.2 and P(B)=0.5P(B)=0.5. What is P(A∣B)P(A|B)?

Venn diagrams and tables

A Venn diagram or two-way table turns conditional probability into counting: the denominator is the total in the condition's row or region.

Of 120 students, 70 study Biology, 50 study Chemistry, 20 study both and 20 study neither.

When only some totals are given, work out the numbers in each region first, and check that they add up to the total. A two-way table then gives each total directly.

B only 50Both 20C only 30Neither 20
Venn diagram of 120 students: 70 Biology (B), 50 Chemistry (C), 20 both, 20 neither. B only = 70 − 20 = 50 and C only = 50 − 20 = 30.

Chemistry

Biology:
20
Not Biology:
30
Total:
50

Not Chemistry

Biology:
50
Not Biology:
20
Total:
70

Total

Biology:
70
Not Biology:
50
Total:
120

Worked example

Using the table, find P(Chemistry∣Biology)P(\text{Chemistry}|\text{Biology}) and P(Biology∣not Chemistry)P(\text{Biology}|\text{not Chemistry}).

Using the same table, what is P(not Biology∣Chemistry)P(\text{not Biology}|\text{Chemistry})?

Tree diagrams

The probabilities on the second set of branches are conditional on the first branch. Multiply along branches, add across routes.

On a tree diagram, multiply along branches to find the probability of a combination, and add the results for different routes to the same event.

Without replacement, the second-stage probabilities change. With replacement they stay the same, and the events are independent.

  1. 1

    First counter

    Red 58\frac58, blue 38\frac38

  2. 2

    Second after red

    Red 47\frac47, blue 37\frac37

  3. 3

    Second after blue

    Red 57\frac57, blue 27\frac27

  4. 4

    Multiply along branches

    Then add the routes you want

Two counters taken without replacement from 5 red and 3 blue

Worked example

A bag has 5 red and 3 blue counters. Two are taken without replacement. Find the probability that they are different colours.

Using the same bag, what is the probability that both counters are red?

Reversing the condition

Often the tree gives P(pass∣revised)P(\text{pass}|\text{revised}) but you want P(revised∣pass)P(\text{revised}|\text{pass}). Find the intersection, then divide by the probability of the new condition.

Three steps: find the intersection from the tree, find the total probability of the new condition by adding all routes to it, then divide.

  1. 1

    Intersection

    multiply along the tree branch for both events

  2. 2

    New condition

    add all routes that lead to it

  3. 3

    Divide

    intersection ÷ probability of the new condition

Reversing the condition.
  • P(revised∣pass)P(\text{revised}|\text{pass})P(revised∩pass)P(pass)\dfrac{P(\text{revised}\cap\text{pass})}{P(\text{pass})}

Worked example

70%70\% of students revise. The pass rates are 0.90.9 for students who revised and 0.40.4 for those who did not. Find P(revised∣pass)P(\text{revised}|\text{pass}) and P(not revised∣fail)P(\text{not revised}|\text{fail}).

In the example, what is P(revised∣fail)P(\text{revised}|\text{fail})?

Independence

Events are independent if knowing BB does not change the probability of AA: P(A∣B)=P(A)P(A|B)=P(A).

To test independence, compare P(A∩B)P(A\cap B) with P(A)P(B)P(A)P(B), or P(A∣B)P(A|B) with P(A)P(A).

In the Biology and Chemistry table, P(B)P(C)=35144P(B)P(C)=\frac{35}{144} but P(B∩C)=24144P(B\cap C)=\frac{24}{144}, so the events are not independent.

00.050.10.150.20.25P(B)P(C)P(B ∩ C)ProbabilityValue
Independence test using the Biology and Chemistry table: the two values would be equal if the events were independent.
  • P(A∣B)=P(A)P(A|B)=P(A)P(A∩B)=P(A)P(B)P(A\cap B)=P(A)P(B)

For exactly two passes out of three independent students with pass probability 0.750.75: 3×0.752×0.25=27643\times0.75^2\times0.25=\frac{27}{64}. Given at least one pass, the probability becomes 27/6463/64=37\frac{27/64}{63/64}=\frac37.

P(A)=0.5P(A)=0.5, P(B)=0.4P(B)=0.4 and P(A∩B)=0.2P(A\cap B)=0.2. Are AA and BB independent?

Try an exam question

Machine AA makes 60%60\% of a factory's items and 3%3\% of them are defective. Machine BB makes the rest and 5%5\% of them are defective. An item is chosen at random and found to be defective. Find the probability that it was made by machine AA.

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Given that the student studies Biology, find the probability that they also study Chemistry.

1 mark, marked against the mark scheme

Revision notes