Expected waiting time for next train

5.1k Views Asked by At

Let's say a train arrives at a stop in intervals of 15 or 45 minutes, each with equal probability 1/2 (so every time a train arrives, it will randomly be either 15 or 45 minutes until the next arrival). What is the expected waiting time of a passenger for the next train if this passenger arrives at the stop at any random time. This means that the passenger has no sense of time nor know when the last train left and could enter the station at any point within the interval of 2 consecutive trains.

I was told 15 minutes was the wrong answer and my machine simulated answer is 18.75 minutes. I just don't know the mathematical approach for this problem and of course the exact true answer. Sincerely hope you guys can help me. Thanks!

2

There are 2 best solutions below

2
On

The exact definition of what it means for a train to arrive every $15$ or $4$5 minutes with equal probility is a little unclear to me. However here is an intuitive argument that I'm sure could be made exact, as long as this random arrival of the trains (and the passenger) is defined exactly.

Think about it this way. Mark all the times where a train arrived on the real line. The marks are either $15$ or $45$ minutes apart. So the real line is divided in intervals of length $15$ and $45$. Because of the 50% chance of both wait times the intervals of the two lengths are somewhat equally distributed. Now you arrive at some random point on the line. However your chance of landing in an interval of length $15$ is not $\frac{1}{2}$ instead it is $\frac{1}{4}$ because these intervals are smaller.

So when computing the average wait we need to take into acount this factor. The average wait for an interval of length $15$ is of course $7\frac{1}{2}$ and for an interval of length $45$ it is $22\frac{1}{2}$. And we can compute that $$\frac{1}{4}\cdot 7\frac{1}{2} + \frac{3}{4}\cdot 22\frac{1}{2} = 18\frac{3}{4}$$

4
On

Your simulator is correct. Since 15 minutes and 45 minutes intervals are equally likely, you end up in a 15 minute interval in 25% of the time and in a 45 minute interval in 75% of the time.

In a 15 minute interval, you have to wait $15 \cdot \frac12 = 7.5$ minutes on average.

In a 45 minute interval, you have to wait $45 \cdot \frac12 = 22.5$ minutes on average.

This gives a expected waiting time of $$\frac14 \cdot 7.5 + \frac34 \cdot 22.5 = 18.75$$