# Queueing Theory: Why does this hold for a M/M/1 queue?

For a M/M/1 queue, calculating the estimated number of jobs $n$ in the queue is given by:

$$E[n] = \sum_{i=1}^{\infty} p_i i = \sum_{i=1}^{\infty} \rho^i (1-\rho) i .$$

The final result for a M/M/1 queue is:

$$E[n] = \frac{\rho}{(1-\rho)}.$$

How is it possible to derive this last step from the formulas above?

-
Do you want to a proof of the identity $\sum_{i=1}^{\infty} i \rho^i (1-\rho) = \frac{\rho}{1-\rho}$? – Srivatsan Jan 30 '12 at 13:45
lack of dependence on $n$ is a bit confusing – Ilya Jan 30 '12 at 13:51
The following related posts: 28331, 20418, 11464. They do not answer your exact question but the methods can be modified in a straightforward way. Also 60660 is relevant. – Srivatsan Jan 30 '12 at 13:57
@Srivatsan: yes, thats what I want. – ptikobj Jan 30 '12 at 14:39
@Ilya: $n$ is a random variable denoting the number of jobs in the system (I have seen $N$ used more commonly), and $E[n]$ is the expected number of jobs in the system. The right hand side gives an expression for this expectation in terms of some other parameter governing the system (the "load factor" $\rho$). Naturally, the right hand side shouldn't involve $n$. – Srivatsan Feb 1 '12 at 8:37

Let \begin{align} f(\rho)&=\sum_{i=1}^\infty i \rho^i (1-\rho)\\ &=(1-\rho)\sum_{i=1}^\infty i \rho^i \\ &=(1-\rho)\rho\sum_{i=1}^\infty i \rho^{i-1} \\ &=(1-\rho)\rho\sum_{i=1}^\infty \frac{d}{d\rho} (\rho^i) \\ &=(1-\rho)\rho\frac{d}{d\rho}\left(\sum_{i=1}^\infty \rho^i\right) \\ &=(1-\rho)\rho\frac{d}{d\rho}\left(\frac{\rho}{1-\rho}\right) \\ &=(1-\rho)\rho\frac{1}{(1-\rho)^2} \\ &=\left(\frac{\rho}{1-\rho}\right) \\ \end{align}

-

To prove $\sum_{i=1}^{\infty} i \rho^i (1-\rho) = \frac{\rho}{1-\rho}$ (which is meaningful at least for the $0 \le \rho \lt 1$ required for this problem):

Let $f( \rho )=\sum_{i=1}^{\infty} i \rho^i (1-\rho)$.

Let $g( \rho )= f( \rho )-\rho f( \rho )$ and so $g( \rho ) = \sum_{i=1}^{\infty} \rho^i (1-\rho)$ as each term almost cancels.

Then $g( \rho )-\rho g( \rho ) = \rho (1-\rho)$ when all the other terms cancel, so $g( \rho ) = \rho$.

So $f( \rho )-\rho f( \rho ) = \rho$, so $f( \rho ) =\frac{\rho}{1-\rho}$.

-
@did I don't know what happened there – Henry Aug 17 '12 at 21:27