Answer:
To find out how many people have both a dog and a cat, we can use the principle of inclusion-exclusion. Let
�
D be the set of people with a dog,
�
C be the set of people with a cat, and
�
N be the set of people with neither.
The formula for the number of people with both a dog and a cat is given by:
∣
�
∩
�
∣
=
∣
�
∣
+
∣
�
∣
−
∣
�
∪
�
∣
∣D∩C∣=∣D∣+∣C∣−∣D∪C∣
Where:
∣
�
∣
∣D∣ is the number of people with a dog (27),
∣
�
∣
∣C∣ is the number of people with a cat (23),
∣
�
∪
�
∣
∣D∪C∣ is the number of people with either a dog or a cat (35 - 5 = 30).
∣
�
∩
�
∣
=
27
+
23
−
30
=
20
∣D∩C∣=27+23−30=20
So, 20 out of the 35 people have both a dog and a cat.
Now, to find the probability that a randomly-selected person has both a dog and a cat, divide the number of people with both by the total number of people:
�
(
both
)
=
∣
�
∩
�
∣
Total
=
20
35
P(both)=
Total
∣D∩C∣
=
35
20
�
(
both
)
≈
0.571
P(both)≈0.571
So, the probability that a randomly-selected person has both a dog and a cat is approximately
0.571
0.571 when rounded to three decimal places.
Explanation: