# Finding the probability joint distribution which density is $f(x,y) = 2, 0<x<y<1$

I have the following exercise:

(i) Find $k$ such that $f(x,y) = k, 0<x<y<1$ is a probability joint density function. ($f(x,y) = 0$ otherwise).

$\displaystyle \int_{0}^{1} \int_{0}^{y} f(x,y) dxdy = \int_{0}^{1} kydy = \frac{k}{2}$.

If $f$ is a joint density, then $\frac{k}{2} = 1 \iff k = 2$.

(ii) Find the marginal densities $f_X(x)$ and $f_Y(y)$.

$f_X(x) = \displaystyle \int_{x}^{1} 2 dy = 2(1-x), 0<x<1$

$f_Y(y) = \displaystyle \int_{0}^{y} 2 dx = 2y, 0<y<1$

I believe so far what I did is correct (but please tell if there's any mistake), my problem is in the following:

(iii) Find the probability joint function $F(x,y)$.

$F(x,y) = \displaystyle\int_{0}^{x}\int_{0}^{y} 2 du dv = 2yx, 0<x<y<1$

$0$, otherwise.

I can see that $\displaystyle \frac{\partial^2}{\partial{x}\partial{y}} F(x,y) = f(x,y)$, as it should be, but something feels odd to me in this domain of definition "$0<x<y<1$". Is what I'm doing correct? Thanks.

• It is easier to understand if you graph the domain of definition. Take a unit square and bisect it by the diagonal line y=x. The triangle where y>x is the domain were k=2. The expression for F(x,y) is obviously wrong since the upper limit should be 1, not 2. Mar 12, 2018 at 21:55
• I made the graph, and then I got this: $F(x,y) = \int_{0}^{1} \int_{x}^{1} 2 du dv = \int_{0}^{1} 2(1-x) dv = 2(1-x) = 2 - 2x$, but then deriving partially I don't get $f(x,y)$. How can I find $F(x,y)$?
– user286485
Mar 12, 2018 at 22:47
• You got the limits wrong, see my answer. Mar 13, 2018 at 0:04

Pick any point in the square. 2 cases: (1) $x<y\ then\ F(x,y)=2xy-x^2$, since x lower limit is 0, while y lower limit is x. (2) $x\ge y \ then\ F(x,y)=y^2$, since x upper limit is y, while y lower limit is 0.

Outside the square you need to work with pieces separately.

• I don't understand why $x \geq y$ matters since the density is $0$ in these points... Also, how you find $F(x,y) = y^2$? Did you integrate $2$?
– user286485
Mar 13, 2018 at 0:29
• Is this correct? $F(x,y) = 0,$ if $x<0$ or $y<0 ; 2yx-x^2,$ if $0<x<y<1 ; y^2,$ if $0<y \leq x<1 ; 1,$ if $x>1$ and $y>1 ; 2x - x^2,$ if $0<x<1$ and $y \geq 1 ; 2y-1,$ if $0<y<1$ and $x \geq 1$.
– user286485
Mar 13, 2018 at 3:58
• +1: On @Alnitak 's request, I read this answer and upvoted. Mar 13, 2018 at 18:52
• You got it right except for one case, $0\lt y\lt 1\ and\ x\gt 1$. It should be $y^2$. To answer you question about $x\ge y$. you need to integrate f(x,y) starting at x=0 and y=0 to get F(x,y). In part of the domain f(x,y)=2. Mar 13, 2018 at 21:49
• A simple approach to getting F(x,y) is geometric,since the integrand has two parts 0 or 2, as described in in my original comment. To get F(x,y) set up a rectangle with lower left corner (0,0) and upper right (x,y). For $x\le y$, most of the rectangle will overlap the f(x,y)=2 domain. The exception is a right triangle (45 deg) with area $\frac{x ^2}{2}$, so the net area is $xy-\frac{x^2}{2}$. Here if $y\gt 1$, the answer is the same as for y=1. For $x\gt y$, the non-zero part of the integrand is a similar right triangle with area $\frac{y^2}{2}$. Here for $x\gt 1$, is the same. Mar 13, 2018 at 23:52