Waiting time distribution in M/M/1 queuing system?

692 Views Asked by At

You wait in a queue served by one assistant. When you enter the queue, the assistant is serving one customer, and another customer is already waiting. The service of one customer has Exponential distribution, with a mean of 1 minute. What is your expected waiting time and what is the distribution of your waiting time?

My approach to this is as follow:

As one is in service and one is in waiting so before our service we will see 2 other services.

Expected waiting time $ = 2*Exp(\mu) = 2-minutes$

Now how to calculate the distribution of waiting time as we have two exponentially distributed services for two customers and the sum of exponential random variables is not exponentially distributed?

Also I don't have arrival rate $\lambda$ here

1

There are 1 best solutions below

0
On

In general, the sum of $n$ indpendent exponential random variables with mean $\mu^{-1}$ has Erlang distribution, i.e. if $S_n=\sum_{i=1}^n X_i$ where $X_i\sim\stackrel{\mathsf{i.i.d.}}\sim\mathsf{Exp}(\mu)$ then for $t\geqslant 0$, $$ \mathbb P(X_i\leqslant t) = 1-\sum_{i=0}^{n-1} \frac 1{n!}e^{-\mu t}(\mu t)^n. $$ The result is clearly true for $n=1$. Assume it to be true for some $n\geqslant 1$, then the density of $S_{n+1}$ is given by \begin{align} f_{n+1}(t) &= (f\star f_n)(t)\\ &= \int_0^t \mu e^{-\mu s} \frac{\mu (\mu(t-s))^n}{(n-1)!}e^{-\mu(t-s)} \ \mathsf ds\\ &= \frac{\mu(\mu t)^n}{n!}e^{-\mu t},\ t\geqslant 0. \end{align} Here $\mu=1$ and $n=2$ so the density of your waiting time is $$ \frac12 t^2e^{-t}, t\geqslant 0 $$ and the expected waiting time $2$. The arrival process is irrelevant (assuming first-in first-out queueing discipline).