# The independent random variables $X$ and $Y$ are uniformly distributed on the intervals [-1,1] for $X$…

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) = \int_{0}^{1}xdx=\left [ \frac{x^{2}}{2} \right ]\Big|_0^1=\frac{1}{2}.$$

I just wanted to clarify that this is correct. Thanks for reading and replying!!

No, it's wrong.

You computed that integral to (I guess) evaluate the area of the triangle. And that's indeed the area of the triangle (It would be have been simpler to use elementary geometry, though).

But the probability is not that integral, or that area. You need to divide that by the total area of the big square. Or, equivalently, to multiply by the (constant) value of the joint density $f_{X,Y}$.

The later, because the probability of the (in general, multidimensional) random variable $X$ taking values in a region $A$ is

$$P(X\in A)=\int_A f_X(x) dx$$

If the probability is uniform, $f_X(x)$ is a constant, so it goes outside, and the integral is the "area" of the region $A$.

The former, because (informally speaking), the random variable can fall on any point inside the square with equal probability. Then, the probability that it falls inside the triangle is the area of the triangle divided by the area of the square.

• (You mean triangle). Why do I need to divide by the total area? :( – beepboopbeepboop May 27 '18 at 19:32
• Right! Thanks for your explanation! So instead $P(X>Y) = \frac{\mbox{Area of shaded triangle}}{\mbox{Area of large dotted square}}=\frac{\frac{1}{2}}{4}=\frac{1}{8}.$. Is this correct? – beepboopbeepboop May 28 '18 at 0:30
• @beepboopbeepboop Yes – leonbloy May 28 '18 at 2:38
• Thanks, appreciate it! – beepboopbeepboop May 28 '18 at 5:24