[Math] Expected time of last bus left

probability

I came across the following problem in a probability exercise, and got confused. The problem is the following.

Problem: In a bus station, assume the expected time of next bus arriving is a exponential distribution $Exp(\lambda)$, where $\lambda$=0.1/min, and you arrive at the bus station in a uniform random time. Let $X$ be the amount of time that last bus has left before you arrive. What is $E(X)$?

I applied some probability properties, and got answer 0, which is obviously wrong. Could you please help me see where I am wrong? It would be even better if you could give me a correct solution. Thanks!

My solution: Assume starting at time 0, the buses arrive at time $X_1, X_2, \cdots$, and the interval between buses are $Z_1, Z_2, \cdots$, where $Z_i=X_{i}-X_{i-1}$. Then $Z_i \sim Exp(\lambda)$. Assume the person arrives at the station at time $Y$, and assume $X_k \leq Y < X_{k+1}$. Then
$$X=Y-X_k=Y-\sum_{i=1}^k Z_i.$$
Fix $Y$ and $k$, we have
$$E(X)=Y-k E(Z_1) = Y-k\frac{1}{\lambda}.$$
Fix $Y$, the number $k$ is the number of events between $[0, Y]$, and satisfies a Poisson distribution with parameter $\lambda$. Thus
$$E(k)=\lambda Y.$$
Therefore we have
$$E(X)=Y-\lambda Y \frac{1}{\lambda}=0.$$

Best Answer

One cannot arrive at the bus station [at] a uniform random time because there is no uniform distribution on the positive real halfline hence the problem is ill posed.

The correct version of the problem is called the waiting time paradox, and asks about the limit of the expected time since the last bus left if one arrives at time $y$, when $y\to\infty$. The expected time since the last bus left if one arrives at time $y$ is $\frac1\lambda(1-\mathrm e^{-\lambda y})$ hence the limit when $y\to\infty$ is $\frac1\lambda$. See here for some more detailed explanations.

Related Question