I am struggling with this question:
The return on two investments, $X$ and $Y$, follows the joint probability density function $$ f(x,y) = \begin{cases} 1/2, &\text{if }0 < |x| + |y| < 1,\\ 0, &\text{otherwise.} \end{cases} $$
Calculate $\text{Var}(X)$.
I don't quite understand the solution provided for this question. It uses some properties of the uniform distribution.
I tried to determine $E[X]$ and $E[X^2]$ by breaking the bounds and integrating the joint density over the appropriate bounds. Thus, finding out the variance of $X$. However, I don't think I have split the bounds accurately as I have ended up with some weird answer. I believe what's really confusing is the modulus surrounding the $x$ and $y$ variables. Any help is appreciated!
The correct answer is 1/6.
Thank you for all your help!
The region that satisfies $$|x| + |y| \le 1$$ is a square with vertices at $(1, 0), (0, 1), (-1, 0), (0, -1)$. Consequently, we can compute $$\operatorname{E}[X^2] = \int_{x=-1}^0 \int_{y=-x-1}^{x+1} \frac{x^2}{2} \, dy \, dx + \int_{x=0}^1 \int_{y=x-1}^{1-x} \frac{x^2}{2} \, dy \, dx.$$ Then since the joint density is symmetric about the line $X = 0$, it follows that $\operatorname{E}[X] = 0$, and the variance is simply $\operatorname{Var}[X] = \operatorname{E}[X^2]$.