Nina K. answered 03/08/25
Harvard Grad Math Tutor
Hi Madison,
Notice that all of the questions have to do with when (after how many draws) the first yellow candy is selected, so let's think a bit more about this random variable. Because the candy bag is extra-large we can assume that the probability of each draw being yellow does not depend on the candies previously drawn and that the probability of each draw being yellow does not change. This means the events are independently and identically distributed (iid). If we think of a yellow candy as a "success" and any other candy as a failure, the number of draws it takes to draw a yellow candy is the number of trials it takes to get a success when each trial is an independently and identically distributed Bernoulli random variable with probability 0.15 of success. This is the exact definition of a geometric random variable with p = 0.15. So, if we let X be the number of draws it takes to get the first yellow M&M, X is distributed according to a geometric distribution.
For each of the questions, I've included both a short answer which uses the definition of the geometric distribution and a longer answer which I hope can give you some intuition for why the geometric distribution has this definition and these formulas.
Compute the probability that the first yellow candy is the fourth M&M selected.
Short answer: This is equivalent to asking for the probability that X = 4. Using the probability mass function (PMF) of the geometric distribution, this is (1 - 0.15)3(0.15) = 0.0921.
More intuitive, longer answer: How can we express the event that "the first yellow candy is the fourth M&M selected"? We can instead say "the first 3 candies are not yellow and the 4th candy is yellow". (Try to convince yourself these statements are equivalent.) This equivalent statement makes it more clear how to calculate the probability.
Because we assume each draw is independent, the probability that the first 3 candies are not yellow and the 4th candy is yellow is the product of the probabilities of each of the following:
- the first candy is not yellow
- the second candy is not yellow
- the third candy is not yellow
- the fourth candy is yellow
Based on the percentages given by Masterfoods, these have probabilities 0.85, 0.85, 0.85, and 0.15, so the overall probability is (0.85)3(0.15) = 0.0921.
Compute the probability that the first yellow candy is the fourth or fifth M&M selected.
Short answer: This is asking for the probability that X = 4 or X = 5. Because these events are disjoint, this is just the sum of the probabilities P(X = 4) + P(X = 5). We can compute each using the PMF of the geometric distribution: (0.85)3(0.15) + (0.85)3(0.15) = 0.1704
More intuitive, longer answer: There are two ways that this can be satisfied: (a) the fourth candy could be the first yellow candy or (b) the fifth candy could. The probability that either of these occur is just the sum of the individual probabilities because these events are independent. We can compute the probability of (a) and (b) using the same reasoning as in the previous question. The probability of (a) is (0.85)3(0.15) and of (b) is (0.85)3(0.15), so the total probability is (0.85)3(0.15) + (0.85)3(0.15) = 0.1704.
Compute the probability that the first yellow candy is among the first four M&M’s selected.
Short answer: We want the probability that X < 5. Based on the cumulative distribution function (CDF) of the geometric distribution, this probability is 1 - (1 - 0.15)4 = 0.4780
More intuitive, longer answer: A good trick with probability questions like these can be to think about if it's easier to compute the probability of the statement not being true. The first yellow candy not being among the first four selected is equivalent to the first four candies being non-yellow. Given the independence of the draws, this is equivalent to the product of the probabilities of each of the following:
- the first candy is not yellow
- the second candy is not yellow
- the third candy is not yellow
- the fourth candy is not yellow
This product is (0.85)4=0.5220. Since this is the probability of the first yellow candy not being among the first four selected, the probability that the first yellow candy is among the first four selected is 1 - 0.5220 = 0.4780.
If every student in a large statistics class selects peanut M&M’s at random until they get a yellow candy, on average how many M&M’s will the students need to select? (Round your answer to two decimal places.)
This question is asking for the average of X across many students. The mean of a geometric random variable with parameter p is 1/p, so the average E(X) = 1/0.15 = 6.6667