How long will a shop be kept open? Poisson process arrivals I have the following question:

I'm a bit confused as to why the expected time would not contain a "+a" term.
The way I did it was to first calculate the expected number of customers (Y) to arrive:
$$E[Y]= (1 + E[Y])(1 - e^{-\lambda a})$$
So we get that the expected number of customers is $e^{\lambda a} -1$. Then, we can just multiply by the expected time for each customer to arrive, and then add $a$ since the shop will be kept open for $a$ time after the last customer.
Where's the flaw in my reasoning here?
 A: Your approach doesn’t work because the customers that do arrive take less than average time to arrive; their mean arrival time is just
\begin{eqnarray}
\frac{\int_0^at\mathrm e^{-\lambda t}\mathrm dt}{\int_0^a\mathrm e^{-\lambda t}\mathrm dt}
&=&
\frac1\lambda\cdot\frac{1-\mathrm e^{-\lambda a}(1+\lambda a)}{1-\mathrm e^{-\lambda a}}
\\
&=&
\frac1\lambda-\frac a{\mathrm e^{\lambda a}-1}\;.
\end{eqnarray}
The second term cancels the term that you were missing.
Alternatively, you can do the first-step analysis that you did for the number of customers for the opening time $X$:
\begin{eqnarray}
E[X]
&=&
a\mathrm e^{-\lambda a}+\lambda\int_0^a(t+E[X])\mathrm e^{-\lambda t}\mathrm dt
\\
&=&
a\mathrm e^{-\lambda a}+\frac1\lambda\left(1-\mathrm e^{-\lambda a}(1+\lambda a)\right)+E[X]\left(1-\mathrm e^{-\lambda a}\right)\;,
\end{eqnarray}
and again the term you were missing cancels and the solution is
$$
E[X]=\frac{\mathrm e^{\lambda a}-1}\lambda\;.
$$
Another check on the solution is that the limit for $\lambda\to0$ should be $a$, not $2a$.
