The random variables $X$ and $Y$ have joint density:
$$ f_{X,Y}(x,y) = \begin{cases} 2-x-y,& 0<x,y<1\\ 0,&\text{otherwise}. \end{cases} $$
My question is to find $\operatorname{Var}(X)$. I have tried taking the marginal density so that I can calculate the expected values, but I'm not sure how to deal with the infinities in the limits. I usually deal with infinities when there is an euler function, but I'm not sure how to approach it here. Thanks in advance.
When I arrive at the evaluation of $2y - xy - \frac12 y^2$ from $-\infty$ to $1$, I'm not sure how to proceed.
$\endgroup$ 31 Answer
$\begingroup$I do your homework just because I would like you to see how to use MathJax.
EDITED:
To answer your question asked in a comment below:
Reason (a): You said so: " 0 < x, y < 1." What else is that supposed to mean?
Reason (b): Also, the double integral over the domain of the joint distribution has to equal $1$. It does:
$$\iint_{[0,1]\times[0,1]} (2-x-y)\ dy\ dx=\int_0^1\left[\int_0^1(2-x-y)\ dy \right]dx=\int_0^1(2-x-\frac{1}{2})\ dx=\left[2x-\frac{1}{2}x^2-\frac{1}{2}x\right]_0^1=2-\frac{1}{2}-\frac{1}{2}=1.$$
Reason (c): I did not want to guess, I used what I was told and looked reasonable...
The original answer:
The joint density is defined as follows: $$f_{X,Y}(x,y)=\begin{cases}2-x-y,&\text{ if }0\le x\le 1 \text{ and }0\le y\le 1\\ 0,& \text{ otherwise.} \end{cases}$$
So, there is no $\infty$ anywhere.
For the marginal density of $X$ we have, for $0\le x\le 1$, $$f_X(x)=\int_0^1f_{X,Y}(x,y)dy=\int_0^1(2-x-y)dy=\left[2y-xy-\frac{1}{2}y^2 \right]_0^1=2-x-\frac{1}{2},$$ and $0$ otherwise. Now, the expectation of $X$ and of $X^2$ are, by definition, $$E[X]=\int_0^1 xf_X(x)=\int_0^1 2x-x^2-\frac{1}{2}xdx=\left[x^2-\frac{1}{3}x^3-\frac{1}{4}x^2\right]_0^1=\frac{5}{12},$$ $$E[X^2]=\int_0^1 x^2f_X(x)=\int_0^12x^2-x^3-\frac{1}{2}x^2 dx=\left[\frac{2}{3}x^3-\frac{1}{4}x^4-\frac{1}{6}x^3\right]_0^1=\frac{1}{4}.$$ The variance is then $$\sigma^2=E[X^2]-E[X]^2=\frac{1}{9}.$$
$\endgroup$ 6