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.$