Variance of continuous random variable with joint density function

probabilityprobability distributionsvariance

I am given a joint density, $f_{X,Y}\left( x, y\right)$, where X and Y are independent continuous random variables. I want to find the $Var\left(Y\right)$.

I was thinking computing the variance by: $$ Var\left(Y\right) = E\left(Y^{2}\right) – \left(E\left(Y\right)\right)^{2} $$
I have obtained the marginal density $f_{Y}\left(y\right)$, and what I am confused about is finding the quantity $E\left(Y^{2}\right)$.

Is this correct?: $$ E\left(Y^{2}\right) = \int_{R} y^{2}f_{Y}\left(y\right)dy $$

Best Answer

Yes, if the marginal density function for this continuous random variable does exists then:

$$\begin{align}\mathsf E(Y^n) &= \iint_{\Bbb R^2} y^n f_{\small X,Y}(x,y)\,\mathrm d(x,y)\\&=\int_\Bbb R y^n \int_\Bbb R f_{\small X,Y}(x,y)\,\mathrm d x\,\mathrm d y\\&=\int_\Bbb R y^n f_{\small Y}(y)\,\mathrm d y\\[3ex]\mathsf E(Y)&=\int_\Bbb R yf_{\small Y}(y)\,\mathrm d y\\[3ex]\mathsf E(Y^2)&=\int_\Bbb R y^2f_{\small Y}(y)\,\mathrm d y\end{align}$$

Related Question