# Problem of joint density function of random variable $(X,Y)$.

The joint density function of $(X,Y)$ is $$f(x,y)=\begin{cases}6(1-x), & 0<y<x,0<x<1\\ 0, & \text{otherwise}\end{cases}$$ Then which of the following are correct?

1. $X$ and $Y$ are not independent
2. $f_Y(y)=\begin{cases}3(y-1)^2, & 0<y<1\\ 0, & \text{otherwise}.\end{cases}$
3. $X$ and $Y$ are independent
4. $f_Y(y)=\begin{cases}3(y-\frac{1}{2}y^2), & 0<y<1\\ 0, & \text{otherwise}.\end{cases}$

My work:

I have calculated $f_X(x)=\int_{0}^{x}6(1-x)\,dy=6(1-x)x$ and $f_Y(y)=\int_0^1 6(1-x)\,dx=3$.

So $f_{X,Y}(x,y)\not=f_X(x)f_Y(y)$, hence not independent. But I am unable to conclude (2) and (4). Please help me to solve. Thanks.

Draw a picture. It will show you that the pair $(X,Y)$ of random variables "lives" on the triangle with vertices $(0,0)$, $(1,0)$, $(1,1)$. For since the joint density is $6(1-x)$ when $y\lt x$ and $0\lt x\lt 1$, the density function is non-zero only in the part of the first quadrant below the line $y=x$ and to the left of the line $x=1$.
For the (marginal) density of $Y$, "integrate out" $x$. In principle we are calculating $\int_{-\infty}^\infty f(x,y)\,dx$.
But the joint density is $0$ up to $x=y$, and $0$ from $x=1$ on. So we calculate $\int_{x=y}^1 6(1-x)\,dx$. After a short while we get a version of 2.)
• So we don't need to integrate for $x$ from $0$ to $1$. Right? – Harry Potter Jul 16 '16 at 5:36
• Well, we are integrating $f(x,y)$ from $x=-\infty$ to $\infty$. However, $f(x,y)$ is $0$ up to $x=y$, and $0$ past $1$, so we are integrating $6(1-x)$ from $y$ to $1$. Integrating $6(1-x)$ from $0$ to $1$ gives the wrong answer. – André Nicolas Jul 16 '16 at 5:39
• yes I tried to draw one, so got a triangle with the mentioned vertices. Now I have one confusion, why it will give wrong answer if we integrate from $0$ to $1$? – Harry Potter Jul 16 '16 at 5:44