[Math] Show that Cov(X,Y)=0 while X and Y are dependent

covariancedensity functionindependenceprobability

Problem:

Show that $Cov(X,Y)=0$ while X and Y are dependent.$$f_{X,Y}(x,y)=\begin{cases}1 \ &\text{ for } -y<x<y,0<y<1\\0\ &\text{ otherwise } \end{cases}$$

Attempt:

Starting by drawing the domain for the joint density function I derive a triangle with corners in (0,0), (1,0) and (1,1).

My solution strategy hence becomes to compute the corresponding marginal density functions from:
$$f_{X}(x)=\int_{\in D} f_{X,Y}(x,y) \text{ }dy $$ and to compute the covariance from:
$$Cov(X,Y)=E[XY]-E[X]E[Y].$$ The expected value for X is derived from:
$$E[X]=\int_{-\infty}^\infty x f_{X}(x) \text{ }dx $$ and E[Y] is similarly computed. Likewise
$$E[XY]=\int_{-\infty}^\infty\int_{-\infty}^\infty xy f_{X,Y}(x,y) \text{ }dxdy. $$

Lastly, dependent variables would not fulfil the independent criterion:
$$f_{X,Y}(x,y)=f_X(x)f_Y(y).$$
I suspect that my marginal density functions are incorrect since I fail to get the equality:
$$E[XY]=E[X]E[Y]$$
Which in turn implies that I have misinterpreted the domain or the boundaries from which the marginal densities are computed.
I am again solving this as an exercise in my probability course and any help would be greatly appreciated!

Best Answer

The support comprises a triangle with vertices $(0,0)$, $(1,1)$, and $(-1,1)$. Thus, the proper calculation should show that $\operatorname{E}[X] = 0$, $\operatorname{E}[Y] = 2/3$, and $$\operatorname{E}[XY] = \int_{y=0}^1 \int_{x=-y}^y xy \, dx \, dy = 0.$$ Thus $$\operatorname{Cov}[X,Y] = 0$$ as claimed, but clearly $X$ and $Y$ are not independent.

Related Question