I have the following joint pdf:
$f(x,y)=0.5$ where $0 \leq|x|\leq|y|$, $0 \leq|y|\leq1$, and $0$ otherwise
The question is: are $X$ and $Y$ independent and uncorrelated?
I know that if $f(x)$*$f(y)$=$f(x,y)$, then $X$ and $Y$ are independent, and $Cov(x,y)$=$0$ means uncorrelated.
I found $f(x)$ using integral $0.5dy$ range($x$ to 1) + $0.5dy$ range(-1 to $x$) = 1 and
$f(y)$ using integral $0.5dx$ range($y$ to 0) + $0.5dx$ range(0 to $x$) = 0
So $1*0$ is not $0.5$, means $X$ and $Y$ are not independent and correlated.
But I have doubt in choosing the ranges of integral because of absolute value. Can anybody help with this?
First off, always draw a picture.
We certainly could do this problem by integration to get the marginal distributions $f_X$ and $f_Y$. Your integrals are not quite right, however, because of some sign ambiguities.
We have to set up the integrals to cover the right areas. It's easier to keep the limits in terms of the absolute values. For $y$ there is one interval where $x$ ranges from $-|y|$ to $|y|$. For $x$ there are two intervals, and hence two integrals. Abusing notation slightly, but hopefully in a clear way:
$$ \begin{align*} f_X(x) &= \int f(x,y) \text{ d}y = \int_{|x| < |y|} 0.5 \text{ d}y = \int_{y = -1}^{y = -|x|} 0.5 \text{ d}y + \int_{y = |x|}^{y = 1} 0.5 \text{ d}y= 1 - |x| \\ f_Y(y) &= \int f(x,y) \text{ d}x = \int_{|x| < |y|} 0.5 \text{ d}x = \int_{x=-|y|}^{x=|y|} 0.5 \text{ d}x = |y| \end{align*} $$
$f_X(x) f_Y(y) = (1 - |x|)|y| \neq f(x,y)$, so they are not independent.
However, we don't need to do the integrals to find this -- the condition that $f(x,y) = f_X(x) f_Y(y)$ means that slices of $f(x,y)$ at constant $x$ values must be scalar multiples of each other. By inspection this is not true: $f(0.5, y)$ is not a multiple of $f(0.6, y)$.
The covariance between x and y can be done by setting up integrals, but it can also readily be seen by symmetry to be 0.