# Memoryless property of the exponential distribution.

Suppose I have three people A, B, and C that are being checked out by three different cashiers. The amount of time it takes them to finish is exponentially distributed with rates $\lambda$, $1.5\lambda$, and $2\lambda$, respectively. A fourth person D will be served once one of the other three is done being served. What is the probability that D is the last person to be done checking out?

My thought is that, for example, if A is the first one done, then D's waiting time is exponentially distributed with rate $\lambda$. Is this correct?

If so, then I think the probability that D is the last one to be done is as follows:

$$P(D>A,B,C)=P(D>B,D>C|A<B,A<C)P(A<B,A<C)+P(D>A,D>B|C<A,C<B)P(C<A,C<B)+P(D>A,D>C|B<A,B<C)P(B<A,B<C)$$

However, I think my logic is flawed. My other thought is that maybe I need to consider that, if A gets done first then I need to figure out $P(A+D<B, A+D<C)$ where A, B, C, and D represent the amount of time being served rather than the amount of time spent waiting?

You are right to separate it into cases where $A$ $B$ and $C$ get done first. Then by memorylessness, given that $A$ gets done first, the probability that $D$ is last is the same as the probability that $A$ would have finished after $B$ and $C$! So the probability that $D$ is finishes after all three is $$P(\mbox{A is first})P(\mbox{A is last}) +P(\mbox{B is first})P(\mbox{B is last}) + P(\mbox{C is first})P(\mbox{C is last}).$$ (where "A is last" means last of A B and C).

The probability of each ordered outcome is $$P(A,B,C) = \left(\frac{\lambda_A}{\lambda_A+\lambda_B+\lambda_C}\right)\left(\frac{\lambda_B}{\lambda_B+\lambda_C}\right)$$ (Read "$A$ beats B and C and then $B$ beats C".)

So $$P(\mbox{A is first}) = \frac{\lambda_A}{\lambda_A+\lambda_B+\lambda_C}\\ P(\mbox{A is last}) = \left(\frac{\lambda_C}{\lambda_A+\lambda_B+\lambda_C}\right)\left(\frac{\lambda_B}{\lambda_A+\lambda_B}\right)+\left(\frac{\lambda_B}{\lambda_A+\lambda_B+\lambda_C}\right)\left(\frac{\lambda_C}{\lambda_A+\lambda_C}\right)$$ and that's all we need for the answer.

• You are correct that if $A$ is the first one done, then the time that $D$ needs to wait is exponentially distributed with rate $\lambda$.
• Your last paragraph is correct: if $A$ finishes first, then you need the total time of the first cashier serving both $A$ and $D$ to be larger than both the serving time of $B$ and the serving time of $C$.
• It can be shown that the probability that the probability that $A$ finishes before $B$ and $C$ is $\frac{\lambda}{\lambda + 1.5 \lambda + 2 \lambda}$. Similarly, the probabilities that $B$ finish first is $\frac{1.5\lambda}{\lambda + 1.5 \lambda + 2 \lambda}$, and for $C$ it is $\frac{2\lambda}{\lambda + 1.5 \lambda + 2 \lambda}$.
• Conditioned on the event that $A$ finishes before $B$ and $C$, the additional time for $B$ to be served [after $A$ is finished] is exponentially distributed with rate $1.5 \lambda$. A similar statement can be made for the additional time $C$ needs to be served after $A$ finishes, conditioned on the event that $A$ finishes first. I believe that these two additional times for $B$ and $C$ are also independent (conditioned on the same event).
• Given the last two points above, you should condition on which of the first three people finish first, and then compare the waiting time of $D$ to the additional time that the two slower people need.
• I should have mentioned their times are independent so that helps. Also, since the exponential distribution is memoryless, then we don't really consider the additional time for the slower cashiers after D starts being checked out I think. Is that true? – mmm Dec 9 '17 at 21:11
• @mmm I think angryavian was saying the same thing as you when they said the additional time was exponentially distributed with the same rate as the total time. – spaceisdarkgreen Dec 9 '17 at 21:32