Finding $P(X < Y)$ where $X$ and $Y$ are independent uniform random variables Suppose $X$ and $Y$ are two independent uniform variables in the intervals $(0,2)$ and $(1,3)$ respectively. I need to find $P(X < Y)$.
I've tried in this way:
$$
\begin{eqnarray}
P(X < Y) &=& \int_1^3 \left\{\int_0^y f_X(x) dx\right\}g_Y(y) dy\\
&=& \frac{1}{4} \int_1^3 \int_0^y dx dy\\
&=& \frac{1}{4} \int_1^3 y dy\\
&=& \frac{1}{8} [y^2]_1^3\\
&=& 1
\end{eqnarray}
$$
But I'm suspicious about this result. It implies that $X<Y$ is a sure event, which is not at all true. 

Answer:
Divide the regions of X with respect to Y for the condition $X<Y$.
For $0<X<1$, $P(X<Y) = \frac{1}{2}$
For $1<X<2$ and $1<Y<2$ $P(X<Y) = \int_{1}^{2}\int_{x}^{2} \frac{1}{2}\frac{1}{2}dydx = \frac{1}{8}$
For $1<X<2$, and $2<Y<3$ $P(X<Y) = \frac{1}{2}.\frac{1}{2}=\frac{1}{4}$
Thus $P(X<Y) = \frac{1}{2}+ \frac{1}{8}+\frac{1}{4} = \frac{7}{8}$
