# Joint Probability: $P\{X>Y\}$

The joint probability function of $X$ and $Y$ is given by

$f(x,y)=\frac{6}{7}(x^2+\frac{xy}{2}), \quad 0<x<1,\ 0<y<2$.

c) Find $P\{X>Y\}$.

After evaluating $\int_0^2\int_y^1\frac{6}{7}(x^2+\frac{xy}{2})\,dx\,dy$, I get $-1$.

Did I set the wrong limits of integration?

-
The integral on $y$ should be restricted to $y$ in $(0,1)$ since when $y$ is in $(1,2)$, no $x$ in $(0,1)$ is such that $x\gt y$. – Did Feb 16 '13 at 20:46

First, we draw a picture. (My chances of getting the right answer without a picture are not good.)

We are integrating over the part of the rectangle which is below the line $y=x$. This is a triangle.

Myself, out of habit, I would prefer integrating first with respect to $y$, unless there is good reason not to do so. Then everything is simpler, since $y$ is going from $0$ to $x$. The fact that we begin at $y=0$ simplifies the result of the first integration, and one is much less likely to make a mistake.

But if you really wish to integrate first with respect to $x$, note that the biggest that $y$ ever gets in our triangle is $y=1$. So if you change the $\int_0^2$ to $\int_0^1$, things should turn out OK.

-
Thanks, I will try your way next time. – photon Feb 16 '13 at 21:44

Just now I did a bit calculation and here is the result:

$\int_0^1 \mathrm{d}x \int_0^x \frac{6}{7} (x^2+\frac{xy}{2})\; \mathrm{d}y=\int_0^1 \mathrm{d}y \int_y^1 \frac{6}{7} (x^2+\frac{xy}{2})\; \mathrm{d}x =\frac{15}{56}$

I hope we got the same answer.

-
Yes, that is what I got, thanks. – photon Feb 17 '13 at 4:51