The independent random variables $X$ and $Y$ are uniformly distributed on the intervals [-1,1] for $X$ and $Y$... The independent random variables $X$ and $Y$ are uniformly distributed on the intervals $[-1,1]$ for $X$ and $[0,2]$ for $Y$. Evaluate the probability that $X$ is greater than $Y$, $P(X>Y)$.
My solution:

$$P(X>Y) = \frac{\mbox{ area of triangle }}{\mbox{ area of dotted square }}=\frac{\int_{0}^{1}xdx}{4}=\frac{\left [ \frac{x^{2}}{2} \right ]\Big|_0^1}{4}=\frac{\frac{1}{2}}{4}=\frac{1}{8}.$$
I just wanted to clarify that this is correct. Thanks for reading and replying!!
 A: From a more probabilistic sense:
$$P(X>Y) = P(Y<X) =\int_{0}^{1}F_Y(x)f_X(x)dx=\int_{0}^{1} \frac x2 \frac 12dx={\left [ \frac{x^{2}}{8} \right ]\Big|_0^1}=\frac 18$$
This is following the law of total probability:
$$P(Y<X) =\int P(Y<X|X=x)P(X=x)dx$$
Why is the integral from $0$ to $1$? $F_Y(x)=0$ when $x<0$.
A: Your solution is correct.   Of course, you do not actually need to integrate anything, since the joint density is uniform.   Just use the geometry.
$$\dfrac{\text{area of triangle}}{\text{area of rectangle}}= \dfrac{\tfrac 12}{4}=\dfrac 18$$

Still there is nothing wrong with practicing integration, and it is useful to remember to do so for cases where distribution is non-uniform.
A: We can focus on interval $(0,1)$. With the law of total probability it is $P(X>Y)=$
$P(X>Y|0<X,Y<1)\cdot P(0<X,Y<1 )+P(X>Y|0<X,Y<1)\cdot \underbrace{P(0>X,Y>2 )}_{=0}$
Due the independence of $X$ and $Y$ we have
$P(X>Y)=P(X>Y|0<X,Y<1)\cdot P(0<X<1)\cdot  P( 0<Y<1 )$,
where $P(0<X<1)=\frac{1-0}{1-(-1)}=\frac12$, $P(0<Y<1)=\frac{1-0}{2-0}=\frac12$ 
Since $X$ and $Y$ are both uniform and identical distributed on $(0,1)$ we get $P(X>Y|0<X,Y<1)=\frac12$
Therefore $P(X>Y)=\frac12\cdot \frac12\cdot \frac12=\frac18$
