Probability question on service time exponentially distributed

598 Views Asked by At

A post office is run by two clerks. When Smith enters the system, he finds that Jones is being served by one of the clerks, and brown is being served by the other. Also suppose that Smith is told that his service will begin as soon as either Jones or Brown leaves.

Assuming the service times of Smith, Jones and Brown are exponentially distributed with parameters $\lambda_s,\lambda_j, \lambda_b$ respectively, then answer the following:

$Q1$: What is the expected time until all three have left the post office.

My try:

Let $S, J, B$ be random variables representing service times of Smith, Jones and Brown respectively. Now expected time until all three leaves post office is: $$E(S+J+B)=E(S)+E(J)+E(B)=\frac{1}{\lambda_s}+\frac{1}{\lambda_j}+\frac{1}{\lambda_b}$$

Is this correct?

$Q2:$ Suppose clerk $i$ has service rate $\lambda_{i}$ for $i=1,2$. That is, if a customer is serviced by clerk $i$, the service time is exponentially distributed with mean $1 / \lambda_{i}, i=1,2$. Find the probability that smith is not the last to leave.

My try:

$P(\text {Smith is not the last to leave })=1-P(\text {Smith is the last to leave })$

I am stuck how to proceed in this.

2

There are 2 best solutions below

0
On

For Question 2:

P(Smith served by clerk 1) = $P(Clerk 1 < Clerk 2) = \frac{\lambda_1}{\lambda_1 + \lambda_2}$

P(Smith served by clerk 2) = $P(Clerk 1 > Clerk 2) = \frac{\lambda_2}{\lambda_1 + \lambda_2}$

P(Smith does not leave last if at clerk 1) = P(Smith is served by clerk 1) * P (Clerk 1 < Clerk 2)

$\frac{\lambda_1}{\lambda_1 + \lambda_2}.\frac{\lambda_1}{\lambda_1 + \lambda_2}$

Note that P (Clerk 1 < Clerk 2) is because, if Smith is to not leave last, he has to finish first, and he is at clerk 1.

Similarly,

P(Smith does not leave last if at clerk 2) = P(Smith is served by clerk 2) * P (Clerk 2 < Clerk 1)

$\frac{\lambda_2}{\lambda_1 + \lambda_2}.\frac{\lambda_2}{\lambda_1 + \lambda_2}$

$\therefore P(Smith\ to\ not\ leave\ last) = \frac{\lambda_1}{\lambda_1 + \lambda_2}.\frac{\lambda_1}{\lambda_1 + \lambda_2} + \frac{\lambda_2}{\lambda_1 + \lambda_2}.\frac{\lambda_2}{\lambda_1 + \lambda_2}$

$ = (\frac{\lambda_1}{\lambda_1 + \lambda_2})^2 + (\frac{\lambda_2}{\lambda_1 + \lambda_2})^2 $

5
On

The answer for the first part of the question is more complicated than stated above. Taking into account all possible outcomes for the order in which the 3 customers will be served and assuming the serving times $T_s, T_j, T_b$ are independent random variables, distributed exponentially, we obtain that the expectation of total time $T_{tot}$ is given as the sum of four integrals:

$$\mathbb{E}[T_{tot}]=\left(\int_{0}^{\infty}dt_b t_b\int_{0}^{t_b}dt_j\int_{0}^{t_b-t_j}dt_s+\int_{0}^{\infty}dt_j t_j\int_{0}^{t_j}dt_b\int_{0}^{t_j-t_b}dt_s\\+\int_{0}^{\infty}dt_b \int_{0}^{t_b}dt_j\int^{\infty}_{t_b-t_j}dt_s(t_s+t_j)+\int_{0}^{\infty}dt_j\int_{0}^{t_j}dt_b\int^{\infty}_{t_j-t_b}dt_s(t_s+t_b)\right)f_s(t_s)f_j(t_j)f_b(t_b)$$

Here we have used the fact that the total time can be expressed as a function of $T_s,T_j,T_b\geq 0$ as follows:

$$T_{tot}=T_b\theta(-T_j-T_s+T_b)+(T_j+T_s)\theta(T_j+T_s-T_b)\theta(-T_j+T_b)+T_j\theta(-T_b-T_s+T_j)+(T_b+T_s)\theta(T_b+T_s-T_j)\theta(-T_b+T_j)$$ With help from Mathematica, this simplifies to

$$\mathbb{E}[T_{tot}]=\frac{1}{\lambda_s}+\frac{1}{\lambda_b}+\frac{1}{\lambda_j}-\frac{1}{\lambda_s+\lambda_j}-\frac{1}{\lambda_s+\lambda_b}-\frac{1}{\lambda_b+\lambda_j}+\frac{\lambda_b}{(\lambda_b+\lambda_s)(\lambda_b+\lambda_j)}+\frac{\lambda_j}{(\lambda_j+\lambda_s)(\lambda_j+\lambda_b)}$$

I'm not certain if there's a less tedious procedure to prove this claim, but the sign structure above suggests there may be a way that involves the inclusion-exclusion principle.

As for the 2nd part of the question, this has been answered by @RahulP, but here's another way to do it:

$$P(\text{S leaves last})=P(T_j+T_s<T_b)+P(T_b+T_s<T_j)\\=\left(\int_{0}^{\infty}dt_b\int_0^{t_b}dt_j\int_{0}^{t_b-t_j}dt_s\right)f_2(t_b)f_1(t_j)f_2(t_s)+\left(\int_{0}^{\infty}dt_j\int_0^{t_j}dt_b\int_{0}^{t_j-t_b}dt_s\right) f_2(t_b)f_1(t_j)f_1(t_s)\\=\frac{\lambda_1^2+\lambda_2^2}{(\lambda_1+\lambda_2)^2}$$