4.11 Formal conditional probability and independence

4.11 Formal conditional probability and independence

IB Maths: Analysis and Approaches HL: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • P(A∣B)=P(A∩B)P(B)P(A\mid B)=\frac{P(A\cap B)}{P(B)} and P(A∩B)=P(B)P(A∣B)P(A\cap B)=P(B)P(A\mid B).
  • P(A∣B)≠P(B∣A)P(A\mid B)\ne P(B\mid A) in general.
  • P(A∩B′)=P(A)−P(A∩B)P(A\cap B')=P(A)-P(A\cap B).
  • Independent events: P(A∣B)=P(A)=P(A∣B′)P(A\mid B)=P(A)=P(A\mid B'), equivalently P(A∩B)=P(A)P(B)P(A\cap B)=P(A)P(B).
  • Test independence with a numerical comparison, and state the conclusion. Mutually exclusive (P(A∩B)=0P(A\cap B)=0) is not the same as independent.

The formal definition

The probability of AA given BB is the fraction of BB that is also in AA.

Knowing that BB has happened reduces the sample space to BB. We then ask what fraction of BB is also in AA.

Order matters: P(A∣B)P(A\mid B) and P(B∣A)P(B\mid A) are usually different.

Translate words first: 'given that', 'if' and 'of those who' all introduce the conditional probability condition after the bar.

AB
Given B, the sample space shrinks to circle B. P(A | B) is the fraction of B that is also in A: the overlap divided by B.
  • Conditional probabilityP(A∣B)=P(A∩B)P(B), P(B)≠0P(A\mid B)=\dfrac{P(A\cap B)}{P(B)},\ P(B)\ne0

Worked example

P(A)=0.4P(A)=0.4, P(B)=0.5P(B)=0.5 and P(A∩B)=0.12P(A\cap B)=0.12. Find P(A∣B)P(A\mid B) and P(B∣A)P(B\mid A).

P(X∩Y)=0.15P(X\cap Y)=0.15 and P(Y)=0.6P(Y)=0.6. What is P(X∣Y)P(X\mid Y)?

The multiplication form and branches

Multiply along branches for joint probabilities, add the routes to an event, then divide to reverse the condition.

Rearranging the definition gives the multiplication rule. It is how you work along the branches of a tree diagram.

If it rains with probability 0.35 and Kofi is late with probability 0.6 when it rains, P(R∩L)=0.35×0.6=0.21P(R\cap L)=0.35\times0.6=0.21.

Add the routes to find the overall probability: P(L)=P(R)P(L∣R)+P(R′)P(L∣R′)=0.21+0.13=0.34P(L)=P(R)P(L\mid R)+P(R')P(L\mid R')=0.21+0.13=0.34. Then reverse the condition with the definition: P(R∣L)=0.210.34=0.618P(R\mid L)=\frac{0.21}{0.34}=0.618.

  1. 1

    Multiply along branches

    to get each joint probability, e.g. P(R∩L)=0.21P(R\cap L)=0.21

  2. 2

    Add the routes to L

    to get P(L)=0.34P(L)=0.34

  3. 3

    Divide

    the joint route by P(L)P(L) to get P(R∣L)P(R\mid L)

Reversing a condition from a tree
  • Multiplication ruleP(A∩B)=P(B)P(A∣B)=P(A)P(B∣A)P(A\cap B)=P(B)P(A\mid B)=P(A)P(B\mid A)

P(R)=0.35P(R)=0.35 and P(L∣R)=0.6P(L\mid R)=0.6. What is P(R∩L)P(R\cap L)?

Working with complements

Use P(A∩B′)=P(A)−P(A∩B)P(A\cap B')=P(A)-P(A\cap B) and P(B′)=1−P(B)P(B')=1-P(B).

Many questions need P(A∣B′)P(A\mid B'). Using P(A∩B′)=P(A)−P(A∩B)P(A\cap B')=P(A)-P(A\cap B) and P(B′)=1−P(B)P(B')=1-P(B):

P(A∣B′)=P(A)−P(A∩B)1−P(B).P(A\mid B')=\frac{P(A)-P(A\cap B)}{1-P(B)}.

Also, P(A′∣B)=1−P(A∣B)P(A'\mid B)=1-P(A\mid B), because given BB, either AA happens or it does not. The complement goes on AA, not on the condition.

A onlyA and BB only
Venn diagram: A ∩ B′ is the part of A outside B. Remove the overlap from A to get P(A) − P(A ∩ B).
  • Overlap with B′P(A∩B′)=P(A)−P(A∩B)P(A\cap B')=P(A)-P(A\cap B)
  • Complement of BP(B′)=1−P(B)P(B')=1-P(B)
  • Complement of A given BP(A′∣B)=1−P(A∣B)P(A'\mid B)=1-P(A\mid B)

Worked example

P(A)=0.4P(A)=0.4, P(B)=0.5P(B)=0.5 and P(A∩B)=0.12P(A\cap B)=0.12. Find P(A∣B′)P(A\mid B').

Which expression equals P(A′∣B)P(A'\mid B)?

Independent events

Events are independent when knowing one happened does not change the probability of the other.

AA and BB are independent if P(A∣B)=P(A)=P(A∣B′)P(A\mid B)=P(A)=P(A\mid B'), equivalent to P(A∩B)=P(A)P(B)P(A\cap B)=P(A)P(B).

To test for independence, calculate one side of any of these and compare numerically. Conclude 'independent' only if they are equal, and state the numbers you compared. For example P(A)P(B)=0.2≠0.12=P(A∩B)P(A)P(B)=0.2\ne0.12=P(A\cap B), so AA and BB are not independent.

Do not confuse this with mutually exclusive events, for which P(A∩B)=0P(A\cap B)=0. If P(A∩B)=P(A)P(B)P(A\cap B)=P(A)P(B) is given with P(A∪B)P(A\cup B), substitute and solve for an unknown.

00.050.10.150.2P(A)P(B)P(A ∩ B)QuantityProbability
Using the worked numbers: P(A)P(B) = 0.2 but P(A ∩ B) = 0.12. They differ, so A and B are not independent.

Independent

  • P(A∩B)=P(A)P(B)P(A\cap B)=P(A)P(B)
  • P(A∣B)=P(A)=P(A∣B′)P(A\mid B)=P(A)=P(A\mid B')

Mutually exclusive

  • P(A∩B)=0P(A\cap B)=0
  • Cannot be independent if both are non-zero

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?

Conditional probability from counts

Divide by the size of the condition group, not the total.

When data are given as counts (a two-way table), divide by the size of the condition group. In a survey of 200 students where 120 travel by bus and 40 of those play tennis, P(T∣B)=40120=13P(T\mid B)=\frac{40}{120}=\frac13. The denominator is the number in BB, not 200.

For independence you would need n(T∩B)=n(T) n(B)n(U)=80×120200=48n(T\cap B)=\frac{n(T)\,n(B)}{n(U)}=\frac{80\times120}{200}=48.

Interpret your conclusion in context, for example 'bus users are less likely to play tennis'.

020406080Play tennisDo not play tennisBus usersNumber of students
The 120 bus users: 40 play tennis, so P(T | B) = 1/3

Worked example

In the survey above, 80 students play tennis in total. Are T and B independent?

Of 50 students who study French, 10 also study art. What is P(art | French)?

Try an exam question

P(A)=0.4P(A)=0.4, P(B)=0.5P(B)=0.5 and P(A∩B)=0.12P(A\cap B)=0.12. (a) Find P(A∣B)P(A\mid B). (b) Find P(A∣B′)P(A\mid B'). (c) Determine whether AA and BB are independent.

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Find P(A∣B)P(A\mid B).

1 mark, marked against the mark scheme

Revision notes