Conditional Probability and Independence

AS · S1 · 3 min

Conditional probability is probability with extra information: P(A∣B)P(A \mid B) is the probability of AA given that BB has happened. Tree diagrams organise it; the formula makes it precise; and independence is the special case where the extra information changes nothing.

The definitions

Key result
P(A∣B)=P(A∩B)P(B),P(A∩B)=P(B) P(A∣B)P(A \mid B) = \frac{P(A \cap B)}{P(B)}, \qquad P(A \cap B) = P(B)\,P(A \mid B)

AA and BB are independent if any (equivalently all) of these hold:

P(A∩B)=P(A) P(B),P(A∣B)=P(A),P(B∣A)=P(B).P(A \cap B) = P(A)\,P(B), \qquad P(A \mid B) = P(A), \qquad P(B \mid A) = P(B).

AA and BB are mutually exclusive if P(A∩B)=0P(A \cap B) = 0, in which case P(A∪B)=P(A)+P(B)P(A \cup B) = P(A) + P(B).

Tree diagrams

Each branch carries a probability; along a path the probabilities multiply; across paths that give the same outcome they add. The second-stage branches are already conditional on the first stage.

Without replacement

A bag has 5 red and 3 blue counters. Two are taken without replacement. Find the probability that they are the same colour, and the probability that the second is red.

Solution

Branches: first red 58\tfrac{5}{8}, then red 47\tfrac{4}{7} or blue 37\tfrac{3}{7}; first blue 38\tfrac{3}{8}, then red 57\tfrac{5}{7} or blue 27\tfrac{2}{7}.

P(same)=58×47+38×27=20+656=1328P(\text{same}) = \tfrac{5}{8} \times \tfrac{4}{7} + \tfrac{3}{8} \times \tfrac{2}{7} = \tfrac{20 + 6}{56} = \tfrac{13}{28}.

P(second red)=58×47+38×57=3556=58P(\text{second red}) = \tfrac{5}{8} \times \tfrac{4}{7} + \tfrac{3}{8} \times \tfrac{5}{7} = \tfrac{35}{56} = \tfrac{5}{8}, the same as P(first red)P(\text{first red}), as symmetry predicts.

Reversing the condition

In the same experiment, find the probability that the first counter was red given that the second is red.

SolutionP(1st red∣2nd red)=P(both red)P(2nd red)=20563556=47.P(\text{1st red} \mid \text{2nd red}) = \frac{P(\text{both red})}{P(\text{2nd red})} = \frac{\tfrac{20}{56}}{\tfrac{35}{56}} = \frac{4}{7}.
Testing for independence

P(A)=0.4P(A) = 0.4, P(B)=0.5P(B) = 0.5, P(A∪B)=0.7P(A \cup B) = 0.7. Determine whether AA and BB are independent.

Solution

P(A∩B)=P(A)+P(B)−P(A∪B)=0.4+0.5−0.7=0.2P(A \cap B) = P(A) + P(B) - P(A \cup B) = 0.4 + 0.5 - 0.7 = 0.2. P(A)P(B)=0.2P(A)P(B) = 0.2. Equal, so independent.

A two-way table

Of 200 students, 120 study French; 80 of the French students and 30 of the others study Spanish. A student is chosen at random. Find P(Spanish∣French)P(\text{Spanish} \mid \text{French}) and P(French∣Spanish)P(\text{French} \mid \text{Spanish}), and decide whether studying French and Spanish are independent.

Solution

P(S∣F)=80120=23P(S \mid F) = \tfrac{80}{120} = \tfrac{2}{3}. P(F∣S)=80110=811P(F \mid S) = \tfrac{80}{110} = \tfrac{8}{11}.

P(S)=110200=0.55≠23=P(S∣F)P(S) = \tfrac{110}{200} = 0.55 \neq \tfrac{2}{3} = P(S \mid F), so not independent: French students are more likely to study Spanish.

Reading the words

PhraseMeans
"given that", "if it is known that"conditional probability, divide by the probability of the condition
"both", "and"intersection, multiply along a path
"at least one"1−P(none)1 - P(\text{none})
"exactly one"add the paths with one success and one failure
Watch out

P(A∣B)P(A \mid B) and P(B∣A)P(B \mid A) are different. "The probability a test is positive given the person is ill" is not "the probability the person is ill given the test is positive". Write the condition after the bar and divide by its probability.

Exam tip

For "show that AA and BB are independent", compute P(A∩B)P(A \cap B) and P(A)×P(B)P(A) \times P(B) separately and state that they are equal. For "not independent", show they differ. Comparing P(A∣B)P(A \mid B) with P(A)P(A) is equally acceptable.

Practice

Question
  1. A fair die is rolled twice. Find the probability that the total is 88 given that the first roll is even.
  2. P(A)=0.6P(A) = 0.6, P(B∣A)=0.5P(B \mid A) = 0.5, P(B∣A′)=0.2P(B \mid A') = 0.2. Find P(B)P(B) and P(A∣B)P(A \mid B).
  3. Machine X makes 60% of items with 3% faulty; machine Y makes the rest with 5% faulty. An item is faulty. Find the probability it came from Y.
  4. Events CC and DD have P(C)=0.3P(C) = 0.3, P(D)=0.4P(D) = 0.4, P(C∩D)=0.12P(C \cap D) = 0.12. Are they independent? Are they mutually exclusive?
Answers
  1. First even: 18 outcomes; total 8 with first even: (2,6),(4,4),(6,2)(2,6), (4,4), (6,2); 318=16\tfrac{3}{18} = \tfrac{1}{6}.
  2. P(B)=0.6(0.5)+0.4(0.2)=0.38P(B) = 0.6(0.5) + 0.4(0.2) = 0.38; P(A∣B)=0.30.38=1519P(A \mid B) = \tfrac{0.3}{0.38} = \tfrac{15}{19}.
  3. P(F)=0.6(0.03)+0.4(0.05)=0.038P(F) = 0.6(0.03) + 0.4(0.05) = 0.038; P(Y∣F)=0.020.038=1019P(Y \mid F) = \tfrac{0.02}{0.038} = \tfrac{10}{19}.
  4. 0.3×0.4=0.120.3 \times 0.4 = 0.12: independent. P(C∩D)≠0P(C \cap D) \neq 0: not mutually exclusive.

How well do you know this?

Builds on

Where this leads

Console

Search notes, courses and tools, or run an action