Suppose that X and Y are independent continuous random variables having densities f_{X}\, \text{and}\, f_{Y}, respectively. Compute P{X < Y}.
Conditioning on the value of Y yields
P\{X\lt Y\}=\int_{-\infty}^{\infty}P\{X\lt Y|Y=y\}\!f_{Y}(y)\;d y
=\int_{-\infty}^{\infty}P\{X\lt y|Y=y\}\!f_{Y}(y)\;d y
=\int_{-\infty}^{\infty}P\{X\lt y\}f_{Y}(y)\;d y
=\int_{-\infty}^{\infty}F_{X}(y)f_{Y}(y)\ d y
where
F_{X}(y)=\int_{-\infty}^{y}f_{X}(x)\;d x