Finding probability $P(X<Y)$

Assuming both variables are real-valued and $Y$ is absolutely continuous with density $f_Y$ and $X$ has cumulative distribution function $F_X$ then it is possible to do the following

$$ \Pr \left[ X < Y \right] = \int \Pr \left[ X < y \right] f_Y \left( y \right) \mathrm{d} y = \int F_X \left( y \right) f_Y \left( y \right) \mathrm{d} y $$

Otherwise, as @ThomasAndrews said in a comment, it is case-by-case.


I think we can control everything by the following general solution.

Consider $Z:=X-Y$. Then, by putting condition on the value of X, we get

$$\begin{align} P(X<Y) & = P(Z<0)\\ & =\int_{-\infty}^{\infty}P(Z<0|X=x)dF_{X}(x)\\ & =\int_{-\infty}^{\infty}P(X-Y<0|X=x)dF_{X}(x)\\ & =\int_{-\infty}^{\infty}P(x-Y<0|X=x)dF_{X}(x)\\ & =\int_{-\infty}^{\infty}P(x<Y)dF_{X}(x)\\ & =\int_{-\infty}^{\infty}(1-P(Y\leq{x}))dF_{X}(x)\\ & =\int_{-\infty}^{\infty}(1-F_{Y}(x))dF_{X}(x) \end{align}$$

You may also put a condition on the value of $Y$ to get a similar result. So, the solution of this problem depends on what you want.