Conditional Probability

Probability 1 · Lecture slides

The plan

  • A new piece of information changes a probability
  • Part 1: tables and grids, where we can count
  • Part 2: trees, where things happen in stages

The Titanic, April 1912

  • 2201 people on board
  • 470 female, 1731 male
  • 711 survived

Pick a survivor at random. How likely is it a female?

  1. About 25%
  2. About 50%
  3. About 75%
  4. About 90%

The same 2201 people, sorted two ways

What changed between 48% and 73%?

  • The top stayed the same: 344 people
  • The bottom changed: 711 survivors, then 470 females
  • The bottom is the group we were told about
  • "Given" means: keep that group, and throw the rest away

The definition

Definition

P(A∣B)=P(A∩B)P(B)P(A \mid B) = \frac{P(A \cap B)}{P(B)}

Read the bar as "given". BB is the group we keep.

The definition gives the same 48%

P(female∣survived)=P(female∩survived)P(survived)=344/2201711/2201=344711≈0.48\begin{aligned} P(\text{female} \mid \text{survived}) &= \frac{P(\text{female} \cap \text{survived})}{P(\text{survived})} \\[2.5ex] &= \frac{344/2201}{711/2201} \\[2.5ex] &= \frac{344}{711} \approx 0.48 \end{aligned}

Your turn: the males

On paper From the table, find P(survived∣male)P(\text{survived} \mid \text{male}). Write the fraction before the decimal.

The males

P(survived∣male)=males who survivedall males=3671731≈0.21\begin{aligned} P(\text{survived} \mid \text{male}) &= \frac{\text{males who survived}}{\text{all males}} \\[2.5ex] &= \frac{367}{1731} \approx 0.21 \end{aligned}

Two dice

  • A red die and a blue die: 36 outcomes, each equally likely
  • We are told one thing: the sum is at least 9
  • Question: how likely is it that the two dice match?

Before we count

On paper Draw the 6 by 6 grid. Shade the outcomes where the sum is at least 9. Then find the probability that the dice match.

Given that the sum is at least 9

Now turn it around

The two dice match. How likely is it that the sum is at least 9?

  1. 1/51/5, the same as before
  2. 1/31/3
  3. 1/21/2
  4. 2/32/3

Given that the two dice match

Same top, different bottom

P(match∣sum≥9)=210=15P(sum≥9∣match)=26=13\begin{aligned} P(\text{match} \mid \text{sum} \ge 9) &= \frac{2}{10} = \frac{1}{5} \\[2.5ex] P(\text{sum} \ge 9 \mid \text{match}) &= \frac{2}{6} = \frac{1}{3} \end{aligned}

P(A∣B)P(A \mid B) and P(B∣A)P(B \mid A) are different questions.

Part 1 is done

Part 2: what to do when there is nothing to count.

A late bus

  • It rains on 3 mornings in 10
  • On a rainy morning, the bus is late 1 time in 2
  • On a dry morning, the bus is late 1 time in 10

Which of these is conditional?

  • P(rain)=3/10P(\text{rain}) = 3/10 is about all mornings
  • P(late∣rain)=1/2P(\text{late} \mid \text{rain}) = 1/2 is about rainy mornings only
  • P(late∣dry)=1/10P(\text{late} \mid \text{dry}) = 1/10 is about dry mornings only
  • Nobody has told us P(late)P(\text{late})

The bus is late this morning. Is it raining?

  1. About 30%
  2. About 50%
  3. About 70%
  4. About 85%

Draw it in stages

On paper Draw a tree: rain or dry first, then late or on time. Write a probability on every branch.

The tree for the bus

Why we multiply

Rule

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

This is the definition, with both sides multiplied by P(B)P(B).

How often is the bus late?

P(late)=P(rain and late)+P(dry and late)=310⋅12+710⋅110=320+7100=1150\begin{aligned} P(\text{late}) &= P(\text{rain and late}) + P(\text{dry and late}) \\[2ex] &= \frac{3}{10} \cdot \frac{1}{2} + \frac{7}{10} \cdot \frac{1}{10} \\[2ex] &= \frac{3}{20} + \frac{7}{100} = \frac{11}{50} \end{aligned}

The bus is late. Is it raining?

P(rain∣late)=P(rain and late)P(late)=3/2011/50=1522≈0.68\begin{aligned} P(\text{rain} \mid \text{late}) &= \frac{P(\text{rain and late})}{P(\text{late})} \\[2.5ex] &= \frac{3/20}{11/50} \\[2.5ex] &= \frac{15}{22} \approx 0.68 \end{aligned}

Before the bus came, rain was 3 mornings in 10. Given a late bus, it is about 7 in 10.

Two students are called on

  • A class has 10 students, and 4 have done the reading
  • Two are called on, one after the other
  • Question: how likely is it that both have done the reading?

Both have done the reading?

  1. 4/254/25
  2. 2/152/15
  3. 1/51/5
  4. 2/52/5

Your turn: the tree for the two students

On paper Draw the tree: has the first done the reading, then has the second. Be careful with the second branches.

The tree for the two students

What the tree showed

  • Both have read: 2/5×1/3=2/152/5 \times 1/3 = 2/15
  • The second branches differ: 1/31/3 on one side, 4/94/9 on the other
  • The second has read: 2/52/5, the same as the first
  • Backward: given the second has read, the first has with 1/31/3

What to take away

  • "Given" keeps one group and looks only inside it
  • When we can count: a count over a count
  • When things happen in stages: multiply along a path, add the paths
  • P(A∣B)P(A \mid B) and P(B∣A)P(B \mid A) are different questions

Before the next class

  • Read the lesson "Conditional Probability"
  • Work its five practice problems on paper

Arrow keys to step and move · N for notes · F to fill the screen