Conditional probability

Conditional probability

IB MYP Maths Extended: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • P(A∣B)P(A\mid B) is the probability of AA given that BB has happened; BB becomes the new sample space.
  • P(A∣B)=P(A and B)P(B)P(A\mid B)=\frac{P(A\text{ and }B)}{P(B)}, and P(A∣B)≠P(B∣A)P(A\mid B)\ne P(B\mid A) in general.
  • In a table or Venn diagram, use only the row, column or circle you are told about as the total.
  • Without replacement, events are dependent: P(A and B)=P(A)×P(B∣A)P(A\text{ and }B)=P(A)\times P(B\mid A).
  • If P(A∣B)=P(A)P(A\mid B)=P(A) the events are independent.

What it means

It is the probability of an event given that another event has already happened.

We write P(A∣B)P(A\mid B), read "the probability of AA given BB". Knowing that BB has happened shrinks the sample space to the outcomes in BB.

P(A and B)=0.12P(A\text{ and }B)=0.12 and P(B)=0.4P(B)=0.4 give P(A∣B)=0.120.4=0.3P(A\mid B)=\frac{0.12}{0.4}=0.3. Note that P(A∣B)P(A\mid B) and P(B∣A)P(B\mid A) are usually different.

A only0.12B only 0.28
A is the left circle, B the right circle. Knowing B happened limits us to the right circle (total 0.4); the overlap is 0.12, so P(A | B) = 0.12 ÷ 0.4 = 0.3.
  • Conditional probabilityP(A∣B)=P(A and B)P(B)P(A\mid B)=\dfrac{P(A\text{ and }B)}{P(B)}

Worked example

P(A and B)=0.12P(A\text{ and }B)=0.12 and P(B)=0.4P(B)=0.4. Find P(A∣B)P(A\mid B).

P(A and B)=0.15P(A\text{ and }B)=0.15 and P(B)=0.5P(B)=0.5. What is P(A∣B)P(A\mid B)?

Two-way tables

Use only the row or column you are told about as the total.

A two-way table shows two features of the same group. To find a conditional probability, use only the row or column you are told about as the total.

P(instrument∣Year 10)=2740P(\text{instrument}\mid\text{Year 10})=\frac{27}{40} (the Year 10 total is 40). P(Year 9∣instrument)=1845=25P(\text{Year 9}\mid\text{instrument})=\frac{18}{45}=\frac25 (the player total is 45).

0510152025Year 9Year 10Year groupStudents
  • Plays instrument
  • Does not play
The two-way table as a chart. For P(instrument | Year 10) use only the Year 10 bars: 27 out of 27 + 13 = 40.

Plays instrument

Year 9:
18
Year 10:
27
Total:
45

Does not play

Year 9:
22
Year 10:
13
Total:
35

Total

Year 9:
40
Year 10:
40
Total:
80

Worked example

Use the table to find P(instrument∣Year 10)P(\text{instrument}\mid\text{Year 10}).

Using the table, find P(Year 10∣does not play)P(\text{Year 10}\mid\text{does not play}).

Venn diagrams

Use only the circle for the event that is given.

In a Venn diagram the circles show events and the overlap shows "both". Fill in the overlap first, then the "only" regions, then the outside.

50 students; 30 study French (FF), 22 study Spanish (SS), 8 study both. French only =22=22, Spanish only =14=14, neither =6=6.

For P(S∣F)P(S\mid F) use only the French circle (30 students), of whom 8 also study Spanish: 830=415\frac{8}{30}=\frac{4}{15}. For P(F∣S)P(F\mid S) use the Spanish circle: 822=411\frac{8}{22}=\frac{4}{11}.

228146
50 students: F = French (left), S = Spanish (right)

Worked example

Find P(S∣F)P(S\mid F).

Find P(S∣not F)P(S\mid\text{not }F), the probability a student studies Spanish given they do not study French.

Dependent events and trees

The second set of branches shows conditional probabilities, so multiply along branches for "and" and add routes for "or".

Two events are dependent if the first outcome changes the probability of the second. This happens when you take items without replacement.

With 6 ripe and 4 unripe mangoes, after a ripe mango is removed, 5 ripe and 4 unripe remain among 9. So P(unripe second∣ripe first)=49P(\text{unripe second}\mid\text{ripe first})=\frac49.

P(same)=3090+1290=4290=715P(\text{same})=\frac{30}{90}+\frac{12}{90}=\frac{42}{90}=\frac{7}{15}.

00.050.10.150.20.250.30.35ripe, riperipe, unripeunripe, ripeunripe, unripeTwo mangoes picked without replacementProbability
The four routes through the tree (30/90, 24/90, 24/90, 12/90). They add up to 1.

Calculation

ripe, ripe:
610×59\frac{6}{10}\times\frac59
ripe, unripe:
610×49\frac{6}{10}\times\frac49
unripe, ripe:
410×69\frac{4}{10}\times\frac69
unripe, unripe:
410×39\frac{4}{10}\times\frac39

Probability

ripe, ripe:
3090\frac{30}{90}
ripe, unripe:
2490\frac{24}{90}
unripe, ripe:
2490\frac{24}{90}
unripe, unripe:
1290\frac{12}{90}
  • Dependent eventsP(A and B)=P(A)×P(B∣A)P(A\text{ and }B)=P(A)\times P(B\mid A)

Worked example

6 ripe and 4 unripe mangoes: two are taken. Find P(same condition)P(\text{same condition}).

A ripe mango has been taken. What is P(unripe second)P(\text{unripe second})?

Using conditional probability

Compare P(A∣B)P(A\mid B) with P(A)P(A) to see whether BB makes AA more or less likely.

If P(A∣B)>P(A)P(A\mid B)>P(A), then BB makes AA more likely. If P(A∣B)<P(A)P(A\mid B)<P(A), it makes AA less likely. If P(A∣B)=P(A)P(A\mid B)=P(A), the events are independent.

P(S)=2250=0.44P(S)=\frac{22}{50}=0.44 but P(S∣F)=415=0.267P(S\mid F)=\frac{4}{15}=0.267, so studying French makes studying Spanish less likely. Write your conclusion in words about the context, and say what the limits of the data are.

00.10.20.30.4P(S)P(S | F)probability
Does studying French change the chance of studying Spanish?

P(A∣B)=0.5P(A\mid B)=0.5 and P(A)=0.3P(A)=0.3. What does knowing BB do to AA?

Try an exam question

Of 5050 students, 3030 study French (FF), 2222 study Spanish (SS) and 88 study both. Find P(F∣S)P(F\mid S).

[3 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Given that the student is in Year 10, what is the probability that the student plays an instrument?

1 mark, marked against the mark scheme

Revision notes