Number of departures in time $t$.

36 Views Asked by At

$\textbf{Question.}$

There are $n$ customers queued in front of the server at time $t={}0$. The service time has exponential distribution with parameter $\mu$. What is the expected number of customers served by the server in time $t={}T$.

$\textbf{My approach:}$

Probability that $i$ customers are served in time $T$ is $\displaystyle \mathop{\mathbb{P}}\left(N\left(T\right) = i\right)$ = $(1/i!)e^{-\mu T}(\mu T)^{i}$. Now, the expected number of customers served is ${}\sum_{i={}0}^{n}i\displaystyle \mathop{\mathbb{P}}\left(N\left(T\right) = i\right)$.

I'm not sure if the limit of summation should be until $n$ or $+\infty$. Ideally, it should be until $+\infty$ but in this case, the maximum number of customers that can be served is $n$. So, if I'm taking the summation limit until $n$, am I underestimating the expected value?

1

There are 1 best solutions below

0
On BEST ANSWER

The formula $$\Pr[N(T) = i] = e^{-\mu T} \frac{(\mu T)^i}{i!}$$ gives you the probability that $i$ customers are served in time $T$ only in the ideal case when there are infinitely many customers. In the $n$-customer case, adjustments have to be made.

To make use of the ideal-case, we can use a fictitious continuation argument. That is, suppose that the line contains $n$ real customers followed by infinitely many imaginary customers. The server will begin with the real customers; if the real customers run out, the server will imagine serving the imaginary customers (while twiddling his or her thumbs in reality).

Let $N(T)$ be the number of (real) customers actually served by time $T$, and let $N'(T)$ be the number of real and imaginary customers the server imagines serving. Then we know $$\Pr[N'(T) = i] = e^{-\mu T} \frac{(\mu T)^i}{i!}$$ because the server is imagining the ideal case. But we can deduce the number of real customers served from the number of customers the server imagines serving: just cap the number at $n$. That is, $N(T) = \min\{N'(T), n\}$.

So neither the truncated sum nor the sum to infinity is the correct answer. Instead, we have \begin{align} \mathbb E[N(T)] &= \sum_{i=0}^\infty \mathbb E[N(T) \mid N'(T)=i] \cdot \Pr[N'(T)=i] \\ &= \sum_{i=0}^\infty \min\{i, n\} \cdot e^{-\mu T} \frac{(\mu T)^i}{i!} \\ &= \sum_{i=0}^n i \cdot e^{-\mu T} \frac{(\mu T)^i}{i!} + \sum_{i=n+1}^\infty n \cdot e^{-\mu T} \frac{(\mu T)^i}{i!}. \end{align}