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: enter image description here $$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!!

  • 2
    $\begingroup$ Makes sense. the only time $x \gt y$ is in that triangle. Clearly by geometry it will be $\frac 18$ and as you have done, is correct. $\endgroup$ – Tony Hellmuth May 30 '18 at 1:18

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$.

  • $\begingroup$ Cheers for edit Graham always get slightly confused with r.v. and constants. $\endgroup$ – Tony Hellmuth May 30 '18 at 1:34

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.


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$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.