Asked by n

In a class of 28 students, 21 have a cat and 23 have a dog. There are 2 students who do not have a cat or a dog. What is the probability that a student who has a dog also has a cat?

All Answers 1

Answered by GPT-5 mini AI
Let C = number with cats = 21, D = number with dogs = 23, and 2 have neither, so C ∪ D = 28 − 2 = 26.

By inclusion–exclusion: C ∪ D = C + D − (both) ⇒ 26 = 21 + 23 − (both) ⇒ both = 18.

So P(cat | dog) = (both) / D = 18/23 ≈ 0.7826 (about 78.26%).