Finding $P(X>Y)$ where $X\sim U(0,2)$ and $Y\sim U(1,3)$ are independent

86 Views Asked by At

I have the following problem:

Two stochastic variables $X\sim U(0,2)$ and $Y\sim U(1,3)$ are independent. What is $P(X>Y)$?

The answers is $\frac18$, but I don't know how to solve.

I did the following:

  • I drew both distributions in one plot with height 1/2 --> (1/(2-0))

I see that the distributions have a overlap on interval $[1,2]$, so if $X$ is going to be bigger than $Y$, its going to be in that interval. So I know that the probability of $X$ being in that interval is $(2-1)\times\frac12 = 0.5$.

I don't know how to proceed. Can I have some feedback?

Ter

2

There are 2 best solutions below

2
On BEST ANSWER

As commented a picture is a good idea here.

If you want a proof that does not depend on a picture then the following might help.


For independent $X,Y$ where $Y$ has a PDF we have the equalities:

$$P\left(X>Y\right)=\int P\left(X>Y\mid Y=y\right)f_{Y}\left(y\right)dy=\int P\left(X>y\mid Y=y\right)f_{Y}\left(y\right)dy=$$$$\int P\left(X>y\right)f_{Y}\left(y\right)dy$$

Here the last equality rests on independence.

0
On

You're on the right track.

As you noted, The only hope for $X>Y$ is for $X$ and $Y$ both to be in $[1,2]$. This happens with probability $\frac14$ (since $X$ and $Y$ are independent). And then within this $\frac14$ probability, half the time we'll have $X>Y$, and the other half $Y>X$ (noting that $P(X=Y) = 0$).

So $P(X>Y)$ is half of $\frac14$, which is $\frac18$.