# How to calculate mean of busy-cylce

Let $\{X(t)\}$ be birth-death process on a finite state {0,1,2} with non negative birth rates $(\lambda_0,\lambda_1)$and death rates $(\mu_1,\mu_2)$. Suppose $\mathbb{P}(X(0)=0)=1$ and $s_0=\inf \{t\geq0:X(t)=1\}$ and $s = \inf\{t\geq s_0:X(t)=0\}$. How to calculate the $\mathbb{E}[s]$?

Since the first transition can only be from state $0$ to state $1$, it is clear that $\mathbb E[s_0] = \frac1{\lambda_0}$. For the process to return to state $0$, there must be some nonnegative number of transitions $1\to 2, 2\to1$ and then a transition $1\to0$. Therefore $s-s_0$ satisfies \begin{align} \mathbb E[s-s_0] &= \left(\frac{\mu_1}{\lambda_1+\mu_1}\right)\frac1{\mu_1} + \left(\frac{\lambda_1}{\lambda_1+\mu_1}\right)\left(\frac1\lambda_1+\frac1\mu_2+\mathbb E[s-s_0]\right). \end{align} It follows that $$\mathbb E[s-s_0] = \frac1{\mu_1}+\frac1{\mu_1^2} + \frac1{\mu_1\mu_2}$$ and hence $$\mathbb E[s] = \frac1{\lambda_0}+ \frac1{\mu_1}+\frac1{\mu_1^2} + \frac1{\mu_1\mu_2}.$$