There are 3 types of pants on sale in a store, A, B and C respectively. 45% of the customers bought pants A, 35% percent bought pants B, 30% bought pants C. 10% bought both pants A & B, 8% bought both pants A & C, 5% bought both pants B & C and 3% of the customers bought all three pairs.
Find the following probabilities:
- Customers who only bought pants A
- Customers who only bought one type of pants
- Customers who bought at least one type of pants
- Customers who did not buy any pants
My understanding:
- P(bought pants A) - P(bought pants A & B) - P(bought pants A & C) - P(bought all three types)
= 0.45 - 0.1 0.08 0.03 = 0.24
- P(only bought one type) meaning bought either only pants A or pants B or pants C
= P(only bought pants A) + P(only bought pants B) + P(only bought pants C)
= 0.24 +(0.35 - 0.1 - 0.03 - 0.05) + (0.3 - 0.08 - 0.03 -0.05)
= 0.55
- P(bought at least one type of pants) = P(bought pants A) + P(bought pants B) + (P(bought pants C) - P(bought pants A&C) - P(bought pants A&B) - P(bought pants B&C) - P(bought all 3 pairs)
= 0.45 + 0.35 + 0.3 - 0.08 - 0.1 - 0.05 - 0.03
= 0.84
- P(did not buy any pants) = 1 - P(bought at least one type of pants)
= 1 - 0.84 = 0.16
Would like to know if my understanding is correct as well as if there is a better way to do this.
This whole question involves the inclusion exclusion principle. I would review it and do several practice problems.
Suppose there are 100 people.
$$|A| =45,|B|=35,|C|=30$$
$$|A\cap B| = 10, |A\cap C| = 8, |B\cap C| = 5$$ $$|A\cap B\cap C| = 3$$
People who only bought A = All A - (A and B but not C + A and B and C) - (A and C but not B + A and B and C) + (A and B and C) = All A -(A and B but not C ) - (A and C but not B) -(A and B and C)
$$|A| - |A\cap B| - |A\cap C| + |A\cap B\cap C| = 45 -10-8+3= 30$$
So the probability is $\frac{30}{100} = \frac{3}{10}$
You've mistaken A and B with A and B but not C. Your formula triple counts A and B and C.
Question 2
Only B $$|B| - |A\cap B| - |B\cap C| + |A\cap B\cap C| = 35 -10-5+3= 23$$
Only C $$|C| - |A\cap C| - |B\cap C| + |A\cap B\cap C| = 30 -8-5+3= 20$$
So then
People who bought only 1 type = only A + only B + only C $= 30 + 23 + 20=73$
Alternatively $$\begin{align*} &|A|+|B|+|C|-2\left(|A\cap B| + |A\cap C| +|B\cap C| \right) + 3 |A\cap B\cap C|\\ & = 45+35+30-2(10+8+5)+3*3\\ &=73 \end{align*}$$
So the probability is 73/100
Question 3
People bought at least 1:
$$\begin{align*} &|A\cup B \cup C| \\ &= |A|+|B|+|C|-|A\cap B| - |A\cap C| -|B\cap C| + |A\cap B\cap C|\\&= 45+35+30-10-8-5+3\\&= 90 \end{align*}$$
So then the probability is 9/10
Question 4
$$P(\text{doesn't buy}) = 1-P(A\cup B \cup C) = 1-0.9=0.1$$