I encountered this question in my Data Management and Statistics textbook. I tried to calculate the probability using binomial theorem and combinations/permutations, but I could only get close to the answer. I would really appreciate any help with this question:
If Joe buys a cereal box and it has the following probabilities of giving one of the five possible rewards:
- Toy Car: 20%
- Toy Truck: 30%
- Toy Spoon: 10%
- Toy Doll: 35%
- Toy Gun: 5%
What is the probability of Joe getting all the rewards after buying 15 cereal boxes?
Thank you in advance
Answer
Use the Inclusion/Exclusion principle:
Start with $1$
Subtract the following:
- The probability of not winning C is $(1-0.20)^{15}$
- The probability of not winning T is $(1-0.30)^{15}$
- The probability of not winning S is $(1-0.10)^{15}$
- The probability of not winning D is $(1-0.35)^{15}$
- The probability of not winning G is $(1-0.05)^{15}$
Add the following:
- The probability of not winning C,T is $(1-0.20-0.30)^{15}$
- The probability of not winning C,S is $(1-0.20-0.10)^{15}$
- The probability of not winning C,D is $(1-0.20-0.35)^{15}$
- The probability of not winning C,G is $(1-0.20-0.05)^{15}$
- The probability of not winning T,S is $(1-0.30-0.10)^{15}$
- The probability of not winning T,D is $(1-0.30-0.35)^{15}$
- The probability of not winning T,G is $(1-0.30-0.05)^{15}$
- The probability of not winning S,D is $(1-0.10-0.35)^{15}$
- The probability of not winning S,G is $(1-0.10-0.05)^{15}$
- The probability of not winning D,G is $(1-0.35-0.05)^{15}$
Subtract the following:
- The probability of not winning C,T,S is $(1-0.20-0.30-0.10)^{15}$
- The probability of not winning C,T,D is $(1-0.20-0.30-0.35)^{15}$
- The probability of not winning C,T,G is $(1-0.20-0.30-0.05)^{15}$
- The probability of not winning C,S,D is $(1-0.20-0.10-0.35)^{15}$
- The probability of not winning C,S,G is $(1-0.20-0.10-0.05)^{15}$
- The probability of not winning C,D,G is $(1-0.20-0.35-0.05)^{15}$
- The probability of not winning T,S,D is $(1-0.30-0.10-0.35)^{15}$
- The probability of not winning T,S,G is $(1-0.30-0.10-0.05)^{15}$
- The probability of not winning T,D,G is $(1-0.30-0.35-0.05)^{15}$
- The probability of not winning S,D,G is $(1-0.10-0.35-0.05)^{15}$
Add the following:
- The probability of not winning C,T,S,D is $(1-0.20-0.30-0.10-0.35)^{15}$
- The probability of not winning C,T,S,G is $(1-0.20-0.30-0.10-0.05)^{15}$
- The probability of not winning C,T,D,G is $(1-0.20-0.30-0.35-0.05)^{15}$
- The probability of not winning C,S,D,G is $(1-0.20-0.10-0.35-0.05)^{15}$
- The probability of not winning T,S,D,G is $(1-0.30-0.10-0.35-0.05)^{15}$
Please note that the sum of the probabilities is equal to $1$.
If it was smaller, then you would also need to subtract the probability of not winning C,T,S,D,G.
Here is a Python script for calculating that:
p = [0.20,0.30,0.10,0.35,0.05]
res = 1
for i in range(0,len(p)):
res -= (1-p[i])**15
for j in range(i,len(p)):
res += (1-p[i]-p[j])**15
for k in range(j,len(p)):
res -= (1-p[i]-p[j]-p[k])**15
for n in range(k,len(p)):
res += (1-p[i]-p[j]-p[k]-p[n])**15
print res
The result is $0.54837227253$.
No comments:
Post a Comment