Let $X$ be a random variable with distribution function $F_X$. Consider $$P=\int_0^\infty (1-F_X(x))e^{-x}dx.$$ Because $1-F_X(x)$ is the probability of $X>x$ and $e^{-x}$ is the pdf of an exponential random variable (with $\lambda=1$), this integral $P$ apparently equals the probability of $X>Y$ where $Y$ is an exponential random vairbale with $\lambda=1$.
Can anyone explain how we can conclude that $P$ is the probability of the event $X>Y$? I guess $X$ is defined over the same probability space as $X$?