# Probability distribution of number of waiting customers in front of a counter [closed]

The number of customers arriving at a bank counter is in accordance with a Poisson distribution with mean rate of 5 customers in 3 minutes. Service time at the counter follows exponential distribution with mean service rate of 6 customers in 2 minutes. If there were 20 customers waiting in the line just before opening the counter, what is the probability that more than 20 customers will be waiting in the line, 2 hours after opening the counter? Assume that no customers leave the line without service.

Here arrival rate is $\lambda=5/3$ and service rate is $\mu=3$. If $W$ is the average number of people waiting in the line then $W= \lambda/(\mu - \lambda)$ . But I don't know how to calculate number of waiting customer using a given time span. I didn't find any formula to do it in the book. Please help.

## closed as off-topic by yoknapatawpha, kjetil b halvorsen, Ivo Terek, Mark Viola, Daniel W. FarlowAug 3 '15 at 17:18

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – yoknapatawpha, kjetil b halvorsen, Ivo Terek, Mark Viola, Daniel W. Farlow
If this question can be reworded to fit the rules in the help center, please edit the question.

• Please provide context to your question. Things such as showing an attempt at solution, where you got the problem from, relevant definitions, etc. are all useful to people who may like to answer your question. – Zach466920 Jul 30 '15 at 19:33
• Transient behavior for an M/M/1 queue is quite complicated. Here is a paper I pulled up. irisa.fr/armor/lesmembres/Rubino/Para%20ev/Basic%20models/… – Michael Jul 30 '15 at 20:33
• It might be the case that this problem wants you to assume 2 hours is "long enough" for the transients to decay, in which case you are near steady-state. – Michael Jul 30 '15 at 20:35
• @Michael: Possibly so. Certainly I would approach the problem that way, since a fluid approximation points to exhaustion of the initial $20$ customers in $15$ minutes. – Brian Tung Jul 30 '15 at 22:04
• @BrianTung : Are you talking about expectations, or using a different fluid argument? The average time for the 20 customers to leave (assuming FIFO) is $20/\mu\approx 6.6$ minutes, and the average time for the system to empty (starting from initial state of 20) is 20 usual busy periods, or $20/(\mu-\lambda)$= 15 minutes, which coincides with your answer. – Michael Jul 30 '15 at 22:14

I do not believe all of the speculations in the Question and Comments are exactly correct and relevant. Here are some things I believe are correct, assuming you are dealing with an M/M/1 queue.

The formula $W = \lambda/(\mu - \lambda) = \rho/(1 - \rho),$ where $\rho = \lambda/\mu$ is for the average number of customers in an M/M/1 queueing system at equilibrium, including anyone being served. The formula $W_Q = \rho^2/(1-\rho)$ is for the average number waiting to be served (again when the system is at equilibrium).

Such systems reach equilibrium quickly for values of $\lambda$ and $\mu$ such as yours. Agreeing with @Michael, I think the 2 hours is supposed to indicate enough time to reach equilibrium. (Markov processes have some memory, but after 'time to equilibrium' memory of the starting state is assumed irrelevant.)

The distribution at equilibrium of an M/M/1 queue is well known, and should be in your text or notes--along with much of what I have said earlier on.

• If your doubts were about the 15 minutes statement, you might be interested in the explanation below on why this is exact. (else, I'm not sure what speculations you were questioning). – Michael Jul 31 '15 at 19:00

The 15 minutes mentioned by BrianTung is indeed the exact average time to empty, starting in an initial state of 20 jobs. Here is the explanation:

The average duration of a busy period in an $M/M/1$ queue is $\overline{B} = \frac{1}{\mu-\lambda}$. This can be proven using the renewal theory identity: $$\rho = \frac{\overline{B}}{\overline{B} + \overline{I}}$$ where $\rho=\lambda/\mu$ is the fraction of time busy (with $\rho<1$), and $\overline{I} = 1/\lambda$ is the average idle time in between busy periods.

The fact that the average time to empty, given an initial state of 20, is just $20\overline{B}$, follows from the very clever (and standard) argument that this time is the same regardless of whether the service is LIFO or FIFO. With a LIFO (Last-in-First-out) thought experiment, we can imagine each of the 20 initial jobs as generating their own busy periods, each distributed the same as a usual busy period, and these are carried out successively. Notice that the average time to empty, starting in an initial state of 1 job, is $\overline{B}$. So the total average time to empty is $\overline{B} + \overline{B} + \cdots + \overline{B} = 20\overline{B}$.