I am trying to solve this puzzle:

I have a total of two bikes that I keep at work or at home. I always bike to and from my work unless it rains, in which case I take a taxi (and don't bring my bike). If the probability of rain on any leg of the commute is 2/5, what is the probability that it does not rain and I won't have a bike to use?

I don't know how to even start with this problem. If the question was this:

I am at home with two bikes and about to go to work. What is the probability I'll take the taxi home while it's not raining today?

Then the answer is $$P(\text{rain}) \times P(\text{dry}) = \frac{2}{5} \times \frac{3}{5} = \frac{6}{25}.$$

But I don't know how to solve the problem above.

  • 1
    $\begingroup$ So do the bikes start at home or at work? Where did the problem come from? $\endgroup$
    – Someone
    Oct 10 at 17:24

1 Answer 1


Okay, so there are effectively 3 states here:

  • (A) I have both bikes with me
  • (B) I have 1 bike with me
  • (C) I have no bikes with me

There is some set of probabilities, {P(A), P(B), P(C)} of being in any given state for a specific journey - if we find those probabilities, we solve the problem. To find those probabilities, we look at state transitions.

If I have both bikes with me (state A), then if it rains (2/5) I get a taxi, and then I am in state C. If it does not rain (3/5), then I cycle and I end up in state B.

If I am in state B, it's similar: in 2/5 cases I stay in state B, while in 3/5 cases I end up in state A. In state C, well, I have no bike, so I'm guaranteed to end up with both bikes, in state A.

The key realisation here is that our probabilities should remain stable - we are looking for an equilibrium. Therefore, the probability of being in A now should be equal to the probability of being in state A after taking one step. That gives us the following equations:

  • P(A) = 3/5 * P(B) + P(C)
  • P(B) = 3/5 * P(A) + 2/5 * P(B)
  • P(C) = 2/5 * P(A)

The second gives us that 3/5 * P(A) = 3/5 * P(B), and so P(A) = P(B). From this, the 3rd equation, and the fact that the sum of the three is 1, we get that P(A) = 5/12, P(B) = 5/12 and P(C) = 1/6.

Finally, the probability of taking a taxi while it is not raining is the product of having no bikes and of it not raining. This is 1/6 * 3/5, which is 1/10.

  • $\begingroup$ i understand the logic, but I'm a little confused with the equations you set up. Based on your explanation, in the first equation, shouldn't P(C) be multiplied by 2/5? And similarly, in the last equation, shouldn't P(A) be multiplied by 1? $\endgroup$
    – Fozz
    Nov 11 at 22:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.