Finding a distribution related to a Poisson Process. Suppose certain buses follow a Poisson process with
rate one bus every 10 minutes (so the time between consecutive buses is exponentially
distributed with mean 10 minutes). The first bus leaves at time 0, and you arrive at the
bus stop at a random time $X$ with uniform distribution in $(0, 60)$ and independent of
the buses. Let $Y$ be the time lapse between the last bus that left prior to your arrival
(the one you missed) and the first bus that leaves after your arrival (the one you are
going to take). Then what is the distribution of $Y$?
If we assume $T_1,T_2,...$ with $T_1=0$ be the times the buses leaves the bus stop then I know $T_{k+1}-T_k$ is exponentially distributed with mean $10$ but I am not sure how we can use this information to get the distribution of $Y$ or not.
Or, how do we get the expectation of $Y$ i.e. $E[Y]$ by using Monte Carlo integration?
 A: If $X=x$, the last bus you missed left at time $x-L$ and the bus you are going to catch will leave at time $x+R$. For every $y$ in $(0,x)$, $L\geqslant y$ means that no bus leaves during the time interval $(x-y,x)$, which happens with probability $\mathrm e^{-y/a}$ with $a=10$ minutes. For every $y\gt0$, $R\geqslant y$ means that no bus leaves during the time interval $(x,x+y)$, which happens with probability $\mathrm e^{-y/a}$, and $R$ is independent of $L$. Thus, conditionally on $X=x$, $L=\min(S,x)$ and $(R,S)$ are i.i.d. exponential random variables with parameter $1/a$.
Finally, the time between the two busses is $Y=\min(X,S)+R$ where $X$ is uniform on $(0,6a)$. Thus, $$Y=aZ,\qquad Z=\min(6U,V)+W,$$ where $(U,V,W)$ is independent, $U$ is uniform on $(0,1)$, and $V$ and $W$ are standard exponential.
One can then compute the CDF of $Z$, which yields the PDF as $$f_Z(z)=\left\{\begin{array}{lcc}\mathrm e^{-z}(\tfrac56z+\tfrac1{12}z^2)&\mathrm{if}&z\leqslant6,\\\mathrm e^{-z}(2z-4)&\mathrm{if}&z\gt6.\end{array}\right.$$
