FiveThirtyEight has a new puzzle feature called The Riddler. This week they posted their second puzzle, which involves probability:
You arrive at the beautiful Three Geysers National Park. You read a placard explaining that the three eponymous geysers — creatively named A, B and C — erupt at intervals of precisely two hours, four hours and six hours, respectively. However, you just got there, so you have no idea how the three eruptions are staggered. Assuming they each started erupting at some independently random point in history, what are the probabilities that A, B and C, respectively, will be the first to erupt after your arrival?
Responses were due last night at midnight, so I hope I’m not spoiling anything by sharing mine.
When you arrive at the park, the first eruption of geyser A is likely to occur at any time within the next two hours with a uniform probability. Denoting the number of hours until the first eruption of the geyser as “A”, A ~ Uniform(0, 2). Similarly, B ~ Uniform(0, 4) and C ~ Uniform(0, 6).
To compute the probability of geyser A erupting first, separately consider the cases where geysers B and C do and do not erupt within the first two hours of waiting.
Using Bayes Theorem:
Assuming independence of the geysers:
Considering the case here, in which all three geysers erupt in the first two hours, the probability of any geyser erupting first is 1/3. The probability of geysers B and C erupting in the first two hours is easy to calculate.
Using similar logic:
These disjoint events partition the sample space, so the law of total probability dictates:
Do the same thing to calculate the probability of geyser B erupting before the others:
Note that when geyser B does not erupt within the first two hours, another geyser is guaranteed to erupt before it:
And geyser C is similar:
It never hurts to check results with a simulation. After all, math is hard and programming is easy.