Expected waiting time until no event in $t$ years for a poisson process with rate $\lambda$ As an example, assume that the yearly rate of earthquakes in a region is $2$, so on average two earthquakes happen every year. How long should I expect to wait until I expect to see no earthquakes in three years?
If the time between earthquakes is exponentially distributed, I can just sample from $\mathrm{Exp}(\lambda = 2)$ until the waiting time is larger than 3:

$$0.13, 0.11, 0.32, \ldots, 0.11, 0.16, 1.94, \mathbf{3.14}$$

and the sum $0.13 + 0.11 + 0.32 + \cdots + 0.11 + 0.16 + 1.94 = 128.51$ is the waiting time until this occurs.

So in the general case, with a rate of $\lambda$, what's the expected waiting time until I don't see any events in $t$ years?
 A: Let $T_1,T_2,\dots$ denote the exponentially distributed inter-arrival times.  Each of these exceeds $t$ with probability $p=e^{-\lambda t}$.  Hence the number of occurences $X$ before (but not including) the first inter-arrival time exceeding $t$ follows a geometric distribution with parameter $p$ and expected value
$$
EX=\frac{1-p}p=e^{\lambda t}-1. \tag{1}
$$
Conditional on $X=x$, the expected value of $Y=T_1 + T_2 + \dots + T_X$ is
$$
E(Y|X=x)=E(T_1 + T_2 + \dots + T_X|X=x)=xE(T_i|T_i\le t) \tag{2}
$$
Using the law of total expectation and the memoryless property of the exponential distribution, the conditional expectation of inter-arrival times not exceeding $t$, $E(T_i|T_i\le t)$, satisfies
$$
ET_i=E(T_i|T_i\le t)P(T_i\le t)+E(T_i|T_i>t)P(T_i>t),
$$
or
$$
\frac1\lambda = E(T_i|T_i\le t)(1-e^{-\lambda t}) + (t+\frac1\lambda)e^{-\lambda t}.
$$
Thus,
$$
E(T_i|T_i\le t)=\frac1\lambda - \frac t{e^{\lambda t}-1}. \tag{3}
$$
Using the law of total expectation, (1), (2) and (3), the unconditional expectation of $Y$ becomes
\begin{align}
EY&=E E(Y|X)
\\&=E\big(XE(T_i|T_i\le t)\big)
\\&=E(X) E(T_i|T_i\le t)
\\&=(e^{\lambda t}-1)\big(\frac1\lambda - \frac t{e^{\lambda t}-1}\big)
\\&=\frac{e^{\lambda t}-1}{\lambda}-t.
\end{align}
