Steply

Conditional probability

Probability · 20 problems, easy to harder

▶ Watch the first one solved

How we do it

  1. Make a table
  2. Keep only the given row
  3. Write the fraction
  4. Simplify
  5. Check

The steps for Boys 12 cat 8 dog, girls 10 cat 20 dog, P(dog given girl). Every solution names its steps, so you always know what comes next.

Worked examples

Boys 12 cat 8 dog, girls 10 cat 20 dog, P(dog given girl) Easy

The question

Question: People were asked: cat or dog?

12 boys chose cat and 8 chose dog.

10 girls chose cat and 20 chose dog.

One of the girls is picked at random.

What is the probability they chose dog?

The line means given.

Given one of the girls: we only look at the girls.

P(dog | girl) = girls who chose dogall girls

P stands for probability.

The line stands for given.

P = probability, | = given

1 Make a table

One row for each group, one column for each answer, and the totals.

12 boys chose cat, 8 chose dog.

12 plus 8 is 20.

10 girls chose cat, 20 chose dog.

10 plus 20 is 30.

The totals: 22 chose cat, 28 chose dog, 50 in all.

2 Keep only the given row

Given girl: only this row counts.

The others do not.

In it: 20 chose dog, out of 30.

3 Write the fraction

So the probability is 20/30.

P(dog | girl) = 2030

Careful!

The bottom is only the girls: 30.

Not all 50.

Careful: not 2050 ✗

4 Simplify

Both 20 and 30 can be divided by 10.

That makes it simpler.

P(dog | girl) = 20 ÷ 1030 ÷ 10

So it is 2/3.

P(dog | girl) = 23

5 Check

Let's check with the rule: the probability of both, divided by the probability of girl.

Both: 20 out of all 50.

Girl: 30 out of 50.

P(dog | girl) = P(both) ÷ P(girl) = 2050 ÷ 3050

Dividing by a fraction: flip it and multiply.

The 50s cancel: 20/30.

The same.

So the answer is right!

= 2050 × 5030 = 2030 ✓

Let's look back.

First: make a table.

Then: keep only the given row.

Then: write the fraction.

Then: simplify.

Last: check.

Answer
P(dog | girl) = 23

▶ Watch it solved

Boys 12 cat 8 dog, girls 10 cat 20 dog, P(girl given dog) Medium

The question

Question: People were asked: cat or dog?

12 boys chose cat and 8 chose dog.

10 girls chose cat and 20 chose dog.

One person who chose dog is picked at random.

What is the probability they are one of the girls?

The line means given.

Given they chose dog: we only look at the people who chose dog.

P(girl | dog) = girls who chose dogall who chose dog

P stands for probability.

The line stands for given.

P = probability, | = given

1 Make a table

One row for each group, one column for each answer, and the totals.

12 boys chose cat, 8 chose dog.

12 plus 8 is 20.

10 girls chose cat, 20 chose dog.

10 plus 20 is 30.

The totals: 22 chose cat, 28 chose dog, 50 in all.

2 Keep only the given column

Given dog: only this column counts.

The others do not.

In it: 20 are girls, out of 28.

3 Write the fraction

So the probability is 20/28.

P(girl | dog) = 2028

Careful!

The bottom is only the people who chose dog: 28.

Not all 50.

Careful: not 2050 ✗

4 Simplify

Both 20 and 28 can be divided by 4.

That makes it simpler.

P(girl | dog) = 20 ÷ 428 ÷ 4

So it is 5/7.

P(girl | dog) = 57

5 Check

Let's check with the rule: the probability of both, divided by the probability of dog.

Both: 20 out of all 50.

Dog: 28 out of 50.

P(girl | dog) = P(both) ÷ P(dog) = 2050 ÷ 2850

Dividing by a fraction: flip it and multiply.

The 50s cancel: 20/28.

The same.

So the answer is right!

= 2050 × 5028 = 2028 ✓

Let's look back.

First: make a table.

Then: keep only the given column.

Then: write the fraction.

Then: simplify.

Last: check.

Answer
P(girl | dog) = 57

▶ Watch it solved

A bag has 5 red and 3 blue marbles, two are picked without… Harder

The question

Question: A bag has 5 red and 3 blue marbles.

Two marbles are picked, one after the other.

The first one is not put back.

What is the probability the second is blue, given the first is blue?

The line means given.

We already know the first is blue.

P(2nd blue | 1st blue) = ?

P stands for probability.

The line stands for given.

P = probability, | = given

1 Draw a tree

2 Go along the given branch

Given the first is blue: we go along the blue branch only.

3 Read the next branch

From there, blue is the branch with 2/7.

So the probability is 2/7.

One blue is already out of the bag.

P(2nd blue | 1st blue) = 27

Careful!

That is the probability of both.

Here the first is already blue: we only need the second branch.

Careful: not 38 × 27 ✗

4 Check

Let's check with the rule: the probability of both, divided by the probability of the first being blue.

P(both) ÷ P(1st blue) = (38 × 27) ÷ 38

Times 3/8, then divided by 3/8: we are back to 2/7.

The same.

So the answer is right!

= 27

Let's look back.

First: draw a tree.

Then: go along the given branch.

Then: read the next branch.

Last: check.

Answer
Careful: not 38 × 27 ✗

▶ Watch it solved

Practice

Try each one, then open the answer. Stuck? Open the problem to watch every step.

Easy

  1. boys 12 cat 8 dog, girls 10 cat 20 dog, P(dog given girl)
    Answer
    P(dog | girl) = 23
  2. boys 6 tea 14 coffee, girls 9 tea 11 coffee, P(tea given boy)
    Answer
    P(tea | boy) = 310
  3. boys 5 yes 15 no, girls 10 yes 10 no, P(yes given girl)
    Answer
    P(yes | girl) = 12
  4. juniors 8 bus 12 car, seniors 6 bus 14 car, P(bus given junior)
    Answer
    P(bus | junior) = 25
  5. adults 30 tea 10 coffee, children 5 tea 15 coffee, P(coffee given adult)
    Answer
    P(coffee | adult) = 14
  6. boys 9 art 6 music, girls 7 art 8 music, P(art given boy)
    Answer
    P(art | boy) = 35
  7. men 16 yes 4 no, women 12 yes 8 no, P(yes given man)
    Answer
    P(yes | man) = 45

Medium

  1. boys 12 cat 8 dog, girls 10 cat 20 dog, P(girl given dog)
    Answer
    P(girl | dog) = 57
  2. adults 30 tea 10 coffee, children 5 tea 15 coffee, P(adult given tea)
    Answer
    P(adult | tea) = 67
  3. boys 9 art 6 music, girls 7 art 8 music, P(boy given music)
    Answer
    P(boy | music) = 37
  4. juniors 8 bus 12 car, seniors 6 bus 14 car, P(senior given car)
    Answer
    P(senior | car) = 713
  5. a bag has 3 red and 5 blue marbles, two are picked without replacement, P(second red given first red)
    Answer
    Careful: not 38 × 27 ✗
  6. a bag has 4 red and 2 blue marbles, two are picked without replacement, P(second blue given first red)
    Answer
    Careful: not 46 × 25 ✗
  7. men 24 yes 16 no, women 18 yes 22 no, P(no given woman)
    Answer
    P(no | woman) = 1120

Harder

  1. a bag has 5 red and 3 blue marbles, two are picked without replacement, P(second blue given first blue)
    Answer
    Careful: not 38 × 27 ✗
  2. a bag has 6 green and 4 yellow marbles, two are picked without replacement, P(second green given first yellow)
    Answer
    P(2nd green | 1st yellow) = 23
  3. men 24 yes 16 no, women 18 yes 22 no, P(man given yes)
    Answer
    P(man | yes) = 47
  4. cats 14 indoor 6 outdoor, dogs 4 indoor 16 outdoor, P(cat given indoor)
    Answer
    P(cat | indoor) = 79
  5. boys 15 bike 25 walk, girls 20 bike 20 walk, P(girl given bike)
    Answer
    P(girl | bike) = 47
  6. a bag has 2 red and 7 blue marbles, two are picked without replacement, P(second red given first blue)
    Answer
    P(2nd red | 1st blue) = 14