I am given the joint density function $f(x,y)$ for random variables X,Y with $0<x<1$, $0<y<2$ I am interested in $P(X<Y)$
My first instinct was to do the following: $$P(X<Y) = \int_0^2\int_0^yf(x,y)dxdy$$ but this cannot be correct since we are integrating for values of y between 1 and 2 when x can never achieve those values. So I think it should be the following: $$P(X<Y) = (\int_0^1\int_0^yf(x,y)dxdy)+ P(Y>1)$$ Is this correct? Thanks in advance
Why not both? Both are right!
$$\begin{align}\mathsf P(X<Y) &= \int_0^2\int_0^y f_{X,Y}(x,y)~\mathrm d x~\mathrm d y \\[1ex] &= \int_0^1\int_0^y f_{X,Y}(x,y)~\mathrm d x~\mathrm d y + \int_1^2\int_0^1 f_{X,Y}(x,y)~\mathrm d x~\mathrm d y\\[1ex]&= \int_0^1\int_0^y f_{X,Y}(x,y)~\mathrm d x~\mathrm d y + \mathsf P(Y>1) \end{align}$$
Because $f_{X,Y}(x,y)$ equals $0$ for $x>1$.