# Find $P(X < Y)$ where X,Y are continuous function

Let $f$ a density function such that

$f(x,y)=\left\{ \begin{array}{lcc} 2& if & x+y \leq 1, x,y\geq0 \\ \\ 0 & \text{other case} \end{array} \right.$

Find $P(X < Y)$ and $P(X+Y<1/2)$

I try this:

$P(X<Y)=\int_0^\infty\int_0^x2\,dy\,dx=\infty$ but that is a bad result. I'm stuck here can someone help me?

I have the same problem with $P(X+Y<1/2)$

• Check the integration area. Why do you integrate from $0$ to $\infty$? It has to be from $0$ to $1$. I hope it will help you. – Mr.M Jul 13 '18 at 15:22

To be found are:$$\int\int[x<y]f(x,y)dydx$$where $[x<y]$ takes value $1$ if $x<y$ and takes value $0$ otherwise.
Secondly and similarly to be found is:$$\int\int[x+y<0.5]f(x,y)dydx$$ In your effort you seem to confuse the function $f(x,y)$ with the function prescribed by $(x,y)\mapsto 2$ if $x,y>0$ and $(x,y)\mapsto 0$ otherwise.
Observe that $f(x,y)$ only takes value $2$ on the triangle that you describe.
• I dont understand, the integration limit wrong, when i suppose $y$ goes 0 to $\infty$? – Bvss12 Jul 13 '18 at 15:31
• You can take the limits $0$ and $\infty$ but must take into account that for $y$ large enough the function $f(x,y)$ takes value $0$ (not value $2$). – drhab Jul 13 '18 at 15:34
• i take limits $0$ to $1$ and $0 to$x$, is good this? – Bvss12 Jul 13 '18 at 21:35 Note that$(X,Y)$is uniformly distributed on the right triangle$T$in the first quadrant with coordinates$(0,0), (1,0), (0,1)$(which has area$1/2$). In particular $$P((X,Y)\in A)=\frac{m(A\cap T)}{m(T)}=2m(A\cap T)$$ where$m$denotes Lebesgue measure (area) and$A\subset \mathbb{R^2}$. In particular put$A=\{(x,y)\in\mathbb{R^2}\mid x+y< 1/2 \}$. Then $$P((X,Y)\in A)=P(X+Y\lt1/2)=2m(A\cap T)=2\times \frac{1}{2}\times 0.5\times0.5=\frac{1}{4}$$ since$A\cap T$is a right triangle in the first quadrant with coordinates$(0,0), (1/2, 0), (0,1/2)$. One can reason geometrically to determine$P(X\lt Y)\$ as well.