= Solution
Write $a=\mu/\lambda<1$. The embedded <birth-death chain> moves upward with <probability> $\lambda/(\lambda+\mu)$ and downward with <probability> $\mu/(\lambda+\mu)$ away from zero. The <gambler's ruin> formula, obtained by solving its two-point difference equation on $\{0,\ldots,N\}$ and then letting $N\to\infty$, gives $\mathbb P_k(\text{hit }0)=a^k$. Translation gives return <probability> $a$ from $r+1$ to $r$. From $r-1$ the chain hits $r$ almost surely: before that hit it remains in a finite reflecting interval, from every state of which a uniformly positive finite-step chance of hitting $r$ is available. This also proves that starting at zero it hits each $r\ge1$ almost surely.
After departure from $r\ge1$ the return <probability> is therefore
$$
r_r=\frac{\lambda}{\lambda+\mu}a+\frac{\mu}{\lambda+\mu}
=\frac{2\mu}{\lambda+\mu}.
$$
The holding rate is $q_r=\lambda+\mu$, so the exponential occupation-time parameter is $q_r(1-r_r)=\lambda-\mu$. Applying the <Strong Markov property> at the almost-sure first hit gives
$$
\boxed{T_r\sim\operatorname{Exp}(\lambda-\mu),\qquad r\ge1}.
$$
At zero the holding rate is $\lambda$ and return <probability> after departure is $a$, again giving parameter $\lambda-\mu$. From initial state $k$, the expected occupation time at zero is $a^k/(\lambda-\mu)$, since the time is zero unless zero is reached. Averaging over the initial law with <probability generating function> $G$ yields
$$
\boxed{\mathbb E T_0=\frac{G(\mu/\lambda)}{\lambda-\mu}}.
$$
For $\mu=0$, the interpretation is $a^0=1$, $a^k=0$ for $k>0$, and $G(0)=\mathbb P(X(0)=0)$; the same formulas hold.
Back to article page