# Finding $\mathbb{P}(Y_1 < Y_2)$ of two independent exponential r.v.s

Given that $Y_1 \sim \mathrm{Exp}(\lambda _1)$ and $Y_2 \sim \mathrm{Exp}(\lambda _2)$ and that they are independent, I want to compute
$$\mathbb{P}(Y_1 < Y_2).$$

This is what I tried:

$$\mathbb{P}(Y_1 < Y_2) = \int_{0}^{y_2} f_{y_1,y_2}(y_1,y_2) \mathrm{d}y_1\\ = \int_{0}^{y_2} f_{y_1}(y_1) f_{y_2}(y_2) \qquad \text{by independence} \\ = \int_{0}^{y_2} \lambda_1 e^{-\lambda_1 y_1}\lambda_2 e^{-\lambda_2 y_2}\mathrm{d}y_1 \\ = \lambda_2 e^{-y_2 \lambda_2} \cdot \left(1-e^{-\lambda_1 y_2}\right).$$

However, this is what they did:

$$\mathbb{P}(Y_1 < Y_2) = \int_{0}^\infty \mathbb{P}(Y_1 < Y_2 | Y_1 = y)\mathbb{P}(Y_1 = y)\mathrm{d}y \\ = \int_{0}^\infty e^{-y\lambda_2}\lambda_1 e^{-y\lambda_1}\mathrm{d}y \\ = \frac{\lambda_1}{\lambda 1 + \lambda_2}.$$

However, I don't see why the upper limit for their solution is $\infty$. To me, it makes sense to have a final answer that depends on $y_2$.
As well, their first integrand has "$\mathbb{P}(Y_1 = y)$" as a factor; but what does this mean, since $Y_1$ is a continuous random variable?

• Don't you have the double integral $P(Y_1<Y_2)=\int\int_{y_1<y_2}f_{Y_1,Y_2}(y_1,y_2)\,dy_1\,dy_2$ to start off with? – StubbornAtom Sep 3 '17 at 6:44
• @StubbornAtom is right: if you have to deal with 2 random variables, you must begin by a double integral with 2 mathematical variables (this is not the case if you work by conditionning as "they" did). – Jean Marie Sep 3 '17 at 6:50
• About your last question, don't consider $\mathbb{P}(Y_1 = y)$ alone, because, indeed, it makes no sense ; it must be associated with $dy$, because it is $\mathbb{P}(Y_1 = y)dy=P(y<Y_1<y+dy)$ that makes sense. – Jean Marie Sep 3 '17 at 6:52
• @StubbornAtom Thank you, computing the second integral from $0$ to $\infty$ gave the same result. – Twenty-six colours Sep 3 '17 at 6:54
• @JeanMarie Much appreciated!! – Twenty-six colours Sep 3 '17 at 6:54