$P(X
Given that $X$ and $Y$ are independent variables and that $X$ is exponential with a mean of $2$ and $Y$ is exponential with a mean of $1$. Find $P(X<Y)$?
From the information it can be concluded that $X \sim \operatorname{Exp}(\frac{1}{2})$ and $Y \sim \operatorname{Exp}(1)$
Hence, $f(x,y) = \frac{1}{2}e^{-\frac{1}{2}x} e^{-y} $
Therefore, $P(X<Y) = \int_{0}^{\infty} \int_{0}^{y} \frac{1}{2}e^{-\frac{1}{2}x} e^{-y} \,\,dx dy = \frac{1}{3}$ 
Is this the correct way to solve this problem?
 A: Yes, your working is fine, you are integrating the relevant region over the joint pdf.
\begin{align}
P(X < Y) &=\int_0^\infty P(X<Y|Y=y)f_Y(y) \, dy \\
&= \int_0^\infty \int_0^y f_X(x)f_Y(y) \,\, dx dy \\
&= \int_0^\infty \exp(-y)\left(1-\exp\left(-\frac{y}2 \right)\right) \,dy \\
&=\int_0^\infty \exp(-y) \, dy - \left( \frac{2}{3} \right)\int_0^\infty \left(\frac32\right)\exp\left( - \frac{3y}{2}\right) \, dy \\
&= 1- \frac23 \\
&= \frac13
\end{align}
In general if $X \sim \operatorname{Exp}(\lambda_X)$ and $Y \sim \operatorname{Exp}(\lambda_Y)$,
\begin{align}
P(X < Y) &=\int_0^\infty P(X<Y|Y=y)f_Y(y) \, dy \\
&= \int_0^\infty \int_0^y f_X(x)f_Y(y) \,\, dx dy \\
&= \int_0^\infty \lambda_Y\exp(-\lambda_Yy)\left(1-\exp\left(-\lambda_X y \right)\right) \,dy \\
&=\int_0^\infty \lambda_Y\exp(-\lambda_Y y) \, dy - \left( \frac{\lambda_Y}{\lambda_X + \lambda_Y} \right)\int_0^\infty \left(\lambda_X+\lambda_Y\right)\exp\left( - (\lambda_X+\lambda_Y)y\right) \, dy \\
&= 1- \frac{\lambda_Y}{\lambda_X+\lambda_Y} \\
&= \frac{\lambda_X}{\lambda_X+\lambda_Y}
\end{align}
