Steply

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

Step by step, with the reason for every step · Conditional probability · Probability

Step by step

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

Your turn

Try this one yourself, then check:

Show the answer
P(dog | girl) = 23

More from Conditional probability

The whole lesson: Conditional probability →