Students arrive at a help centre according to a rate $r$ Poisson process. When there are n ≥ 1 students in the centre, the first one to leave does so at a random $Exp (2r)$ time. Suppose that there are presently no students in the centre. What is the expected time until there are two students?
This is my answer so far, please let me know if I'm right!
$E[T] = E[\text{time for first arrival}] + E[X]$ where $X$ is the time until there are two students given there is already one.
Let's define birth as arrival of another student and death as departure of the existing student. $E[T] = \frac{1}{r}\\ + E[X|\text{birth < death}] \cdot P(\text{birth < death}) + E[X|\text{birth > death}] \cdot P(\text{birth > death})$
$E[T] = \frac{1}{r} + \frac{1}{r} \cdot \frac{1}{3} + E[T] \cdot \frac{2}{3}$
$\frac{1}{3}E[T] = \frac{4}{3r} $
Therefore, $E[T] = \frac{4}{r} $
It seems right to me but please let me know how you think.
Let $T_n$ be the interarrival times, $S_n$ the service times, and $$\tau = \inf\{t>0:X(t)=2\} $$ where $X(t)$ is the number of customers in the system at time $t$. Then \begin{align} \mathbb E[\tau] &= \mathbb E[T_1] + \mathbb E[T_1]\mathbb P(T_1<S_1) + (\mathbb E[S_1]+\mathbb E[\tau])\mathbb P(S_1<T_1)\\ &= \frac1r + \frac1r\cdot\frac r{r+2r} + \left(\frac1{2r} +\mathbb E[\tau] \right)\cdot\frac{2r}{r+2r}\\ &= \frac1r+\frac1{3r}+\frac1{3r}+\frac23\mathbb E[\tau]\\ &= \frac5{3r}+\frac23\mathbb E[\tau], \end{align} so that $\mathbb E[\tau] = \frac5r$.