# Total waiting time of exponential distribution is less than the sum of each waiting time, how so?

I am reading my textbook and find a weird phenomenon. The example says that Anne and Betty enter a beauty parlor simultaneously. Anne to get a manicure and Betty to get a haircut. Suppose the time for a manicure (haircut) is exponentially distributed with mean 20 (30) minutes. I wanna calculate the expected time until the first customer completes service.

Calculation in the text:

Since the total service rate is $$1/30+1/20=5/60$$, the time until the first customer completes service should be exponential with mean $$60/5=12$$ minutes.

This sounds unreasonable, because ideally the expected waiting time until the first customer is done should be between the average waiting time of each. Namely, I think the correct answer should be between 20 minutes and 30 minutes. How can we expect the first customer to be done in 12 minutes when each has to take at least 20 minutes on average?

• Probability is weird. If I were to take a guess, I am guessing that the textbook assumes the mean of 20 minutes on average, over a large amount of people (sample space). The first person can be at the very short end of time, its just an average. – K Split X Oct 14 '18 at 4:17
• The exponential distribution holds most of its density near $0$. If $X\sim\mathsf{exp}(\lambda)$ then $\mathsf P(X\leq\lambda)=1-\frac{1}{3}\approx0.632$ so we would expect the minimum of the random variable to be less than its mean a considerable amount of the time. – Remy Oct 14 '18 at 5:30
• The expected value gets skewed to the right because values $can$ be very large, but chances are, both of these random variables will not take on very large values. So the pairwise minimum won't be very large. – Remy Oct 14 '18 at 5:32

the expected waiting time until the first customer is done should be between the average waiting time of each

No, that does not look reasonable. We are accepting the smaller time, so we should expect to wait less.

Let $$A$$ ($$B$$) be the time to complete Anne's (Betty's) service. Then we are interested in $$X = min(A,B)$$. Then, because $$X \le A$$ , we must have $$E(X) \le E(A)$$

This was an interesting problem... I was also initially surprised by the answer of $$12$$ minutes. The solution given by the text is very clever and concise, but because I have nothing better to do I also solved it using the longer way.

Let $$X$$ be the time to get a manicure, $$X \sim Exp(\lambda_1 = \frac{1}{20})$$

Let $$Y$$ be the time to get a hair cut, $$Y \sim Exp(\lambda_2 = \frac{1}{30})$$

To make life easier I will assume $$X$$ and $$Y$$ are independent so the time to get a hair cut is independent of the time to get a manicure.

We need to get $$E[\min(X,Y)]$$ and I'll approach this by conditioning on $$Y < X$$, so we have

$$E[\min(X,Y)] = E[\min(X,Y) \mid Y < X] P(Y < X) + E[\min(X,Y) \mid X < Y]P(X < Y)$$

$$= E[Y \mid Y < X] P(Y < X) + E[X \mid X < Y]P(X < Y) \\$$

The expectation of a RV conditional on an event is defined as follows

$$E[Y \mid Y < X] = \frac{E[Y \mathbf{1}_{Y

Therefore we are trying to find

$$E[\min(X,Y)] = E[Y \mathbf{1}_{Y

Let's evaluate the first term

\begin{align} E[Y \mathbf{1}_{Y

Let's use integration by parts to figure out the inner integral.

$$\begin{matrix} u = y & dv = e^{-\lambda_2y} \, dy \\ du = dy & v = \frac{-1}{\lambda_2} e^{-\lambda_2y}\\ \end{matrix}$$

So integration by parts yields

$$\int_{0}^x y e^{-\lambda_2y} \, dy = \left[ \frac{-y}{\lambda_2} e^{-\lambda_2y} \right]_{y=0}^{y=x} + \frac{1}{\lambda_2} \int_0^x e^{-\lambda_2y} \, dy$$

$$=\frac{-x}{\lambda_2} e^{-\lambda_2x} - \frac{1}{\lambda_2^2} \left[e^{-\lambda_2y} \right]_{y=0}^{y=x}$$

$$=\frac{-x}{\lambda_2} e^{-\lambda_2x} - \frac{1}{\lambda_2^2}(e^{-\lambda_2x} - 1)$$

$$=\frac{-x}{\lambda_2} e^{-\lambda_2x} - \frac{1}{\lambda_2^2}e^{-\lambda_2x} + \frac{1}{\lambda_2^2}$$

Plugging back in we have

\begin{align} & = \lambda_1 \lambda_2 \int_{0}^\infty e^{-\lambda_1x} \left( \frac{-x}{\lambda_2} e^{-\lambda_2x} - \frac{1}{\lambda_2^2}e^{-\lambda_2x} + \frac{1}{\lambda_2^2} \right) \, dx \\ & = \lambda_1 \lambda_2 \int_{0}^\infty \frac{-x}{\lambda_2} e^{-(\lambda_1 +\lambda_2)x} - \frac{1}{\lambda_2^2}e^{-(\lambda_1 +\lambda_2)x} + \frac{1}{\lambda_2^2} e^{-\lambda_1 x} \, dx \\ & = -\lambda_1 \int_{0}^\infty x e^{-(\lambda_1 +\lambda_2)x} + \frac{1}{\lambda_2}e^{-(\lambda_1 +\lambda_2)x} - \frac{1}{\lambda_2} e^{-\lambda_1 x} \, dx \\ & = -\lambda_1 \left( \frac{1}{(\lambda_1 + \lambda_2)^2} + \frac{1}{(\lambda_1 + \lambda_2)\lambda_2} - \frac{1}{\lambda_1 \lambda_2}\right) \\ & = -\frac{\lambda_1}{(\lambda_1 + \lambda_2)^2} - \frac{\lambda_1}{(\lambda_1 + \lambda_2)\lambda_2} + \frac{1}{\lambda_2} \\ \end{align}

Remember the ultimate goal is to figure out $$E[\min(X,Y)] = E[Y \mathbf{1}_{Y, and by symmetry we have

$$E[\min(X,Y)] = -\frac{\lambda_1}{(\lambda_1 + \lambda_2)^2} - \frac{\lambda_1}{(\lambda_1 + \lambda_2)\lambda_2} + \frac{1}{\lambda_2} -\frac{\lambda_2}{(\lambda_1 + \lambda_2)^2} - \frac{\lambda_2}{(\lambda_1 + \lambda_2)\lambda_1} + \frac{1}{\lambda_1}$$

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

And then plugging in with $$\lambda_1 = 1/20$$ and $$\lambda_2 = 1/30$$ we get $$12$$ which is our answer.