# Exponential distribution problem - one of two customers is finished with his/her service first

Suppose two people enter adjacent lines in a grocery store. Suppose the service time for person A is exponentially distributed with mean 4 and the service time for person B is exponentially distributed with mean 6. Find the probability that person A is finished with sevice first.

Now, I know PDF of exponential distribution: $f(x) = \lambda e^{-{\lambda}x}$. But I could not figure out how to determine which customer is finished first. Would you explain it?

• You want $P(X<Y)$ where $X$ is the service time for A and $Y$ is the service time for B. How to compute $P(X<Y)$ in general, say when $X$ and $Y$ are independent with densities $f$ and $g$? – Did Jan 8 '16 at 13:43

We have PDFs $f(x)=\frac14e^{-x/4}$ and $g(y)=\frac16e^{-y/6}$. The service times are independent, so the joint PDF is simply $f(x)g(y) = \frac{1}{24}e^{-x/4-y/6}$. You have to integrate this joint PDF over the region of $(\mathbb R^+)^2$ given by $x < y$.

• It says 6 instead of 3 in the question. But i got it. Thanks. – Vitiello Jan 8 '16 at 13:51

Let $X$ be the service time of person A and $Y$ be the service time of person B. We want: $Pr(X<Y)$.

$$P(X<Y)=\int_{0}^{\infty}\int_{0}^{y}\frac{1}{4}e^{-\frac{1}{4}x}\frac{1}{6}e^{-\frac{1}{6}y}dxdy=\frac{3}{5}$$

In general for exponentials with parameters: $\lambda_x$ and $\lambda_y$ $$P(X<Y)=\int_{0}^{\infty}\int_{0}^{y}\lambda_{x}e^{-\lambda_{x}x}\lambda_{y}e^{-\lambda_{y}y}dxdy=\frac{\lambda_x}{\lambda_x + \lambda_y}$$

Note that where $\frac{1}{\lambda_y}=\mu_y$ (the mean of $Y$)

$$\frac{\lambda_{x}}{\lambda_{x}+\lambda_{y}}=\frac{\frac{1}{\lambda_{y}}}{\frac{1}{\lambda_{x}}+\frac{1}{\lambda_{y}}}=\frac{\mu_{y}}{\mu_{x}+\mu_{y}}$$

• It gives means in the questions. $\lambda = {(mean)}^{-1}$. However, the result is intrestingly same both ways. Thanks. – Vitiello Jan 8 '16 at 14:03
• I've added a bit to explain why. – CommonerG Jan 8 '16 at 14:14