# queue

• Jul 15th 2008, 08:05 AM
particlejohn
queue
For the $M/M/1$ queue, show that the probability that a customer spends an amount of time $x$ or less in a queue is given by: $\begin{cases} 1- \frac{\lambda}{\mu}, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \text{if} \ x=0 \\ 1- \frac{\lambda}{\mu}+\frac{\lambda}{\mu}(1-e^{-(\mu-\lambda)x}), \ \text{if} \ x > 0 \end{cases}$
• Jul 15th 2008, 07:52 PM
meymathis
I'm forgotten most of this. I used M/M/1 Theory to refresh my memory. It seems fine although some of the characters are funky. I'm not sure what you have as a given. Also, I am assuming the $\lambda$ is the arrival rate and $\mu$ is the service rate.

This is just an idea.

Well if you know that the $\mathbf{P}(N=n)=\left(\frac{\lambda}{\mu}\right)^n \left( 1-\frac{\lambda}{\mu}\right)$

where N is the number of people in the queue when the person in question arrives. Breaking up the probabilities based on how many are in the queue makes good sense to me since it ought to be easier to figure out the rest. Then
$\mathbf{P}(X\leq x) = \mathbf{E}[\mathbf{P}(X\leq x\ |\ N)]$

$= \sum_{n=0}^\infty \mathbf{P}(X\leq x\ |\ N=n)\mathbf{P}(N=n)$

$= \sum_{n=0}^\infty \mathbf{P}(X\leq x\ |\ N=n)\left(\frac{\lambda}{\mu}\right)^n\left( 1-\frac{\lambda}{\mu}\right)$

Now you just have to figure out $\mathbf{P}(X\leq x\ |\ N=n)$ and then do the sum. Hint: think Poisson!

Also, I'm not sure why the problem was broken in two pieces. It seems to me that if $x=0$ the bottom expression becomes your top expression.