Steply

Cats 14 indoor 6 outdoor, dogs 4 indoor 16 outdoor, P(cat given…

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

Step by step

The question

Question: People were asked: indoor or outdoor?

14 cats chose indoor and 6 chose outdoor.

4 dogs chose indoor and 16 chose outdoor.

One person who chose indoor is picked at random.

What is the probability they are one of the cats?

The line means given.

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

P(cat | indoor) = cats who chose indoorall who chose indoor

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.

14 cats chose indoor, 6 chose outdoor.

14 plus 6 is 20.

4 dogs chose indoor, 16 chose outdoor.

4 plus 16 is 20.

The totals: 18 chose indoor, 22 chose outdoor, 40 in all.

2 Keep only the given column

Given indoor: only this column counts.

The others do not.

In it: 14 are cats, out of 18.

3 Write the fraction

So the probability is 14/18.

P(cat | indoor) = 1418

Careful!

The bottom is only the people who chose indoor: 18.

Not all 40.

Careful: not 1440 ✗

4 Simplify

Both 14 and 18 can be divided by 2.

That makes it simpler.

P(cat | indoor) = 14 ÷ 218 ÷ 2

So it is 7/9.

P(cat | indoor) = 79

5 Check

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

Both: 14 out of all 40.

Indoor: 18 out of 40.

P(cat | indoor) = P(both) ÷ P(indoor) = 1440 ÷ 1840

Dividing by a fraction: flip it and multiply.

The 40s cancel: 14/18.

The same.

So the answer is right!

= 1440 × 4018 = 1418 ✓

Let's look back.

First: make a table.

Then: keep only the given column.

Then: write the fraction.

Then: simplify.

Last: check.

Answer
P(cat | indoor) = 79

Your turn

Try this one yourself, then check:

Show the answer
P(cat | indoor) = 34

More from Conditional probability

The whole lesson: Conditional probability →