Variance of $Y^2$ of density function I am working with some density functions and got stuck when asked to find the variance.
I currently have the following,
$$f_Y(y)=2y\text{ when } 0<y<1$$
$$E[Y]=\frac{2}{3}$$
I can calculate the variance of $Y$ like so,
$$Var[Y]=\int_a^bf_Y(y)\cdot(y-E[Y])^2dy=\int_0^12y\cdot(y-\frac{2}{3})^2dy=\frac{1}{18}$$
But I am asked to find the variance of $Y^2$, which I have no idea how to find,
$$Var[Y^2]=?$$
I found this formula, but I almost certain that it doesnt apply to density functions.
$$Var[Y^2]=E[Y^4]-(E[Y^2])^2$$
Thanks.
 A: $$Var(Y^2)=E(Y^4)-(E(Y^2))^2$$ is correct. Then you do both expectations, e.g.
$$EY^4 = \int y^4f_Y(y)dy = \int_0^1 y^4 2y \, dy = \dots$$
In general, if you want to calculate moments of $X$ and you know $X$ has Lebesgue density $f_X$, then you have
$$E(X^n) = \int x^n P^{X}(dx) = \int x^n f_X(x) \,dx.$$
A: You can either calculate it as 
$$
\mathrm{Var}(Y^2)={\rm E}[(Y^2-{\rm E}[Y^2])^2]
$$
or via the formula you mention, i.e.
$$
\mathrm{Var}(Y^2)={\rm E}[(Y^2)^2]-{\rm E}[Y^2]^2={\rm E}[Y^4]-{\rm E}[Y^2]^2.
$$
These formulas apply to all random variables (and does not require that $Y$ has a density) but evaluating them in the case where $Y$ has a density can be done using the law of the unconscious statistician. We obtain for example that
$$
{\rm E}[Y^4]=\int_0^1y^4 f_Y(y)\,\mathrm dy=\int_0^1 y^4\cdot 2y\,\mathrm dy.
$$
A: One more way, though a bit slower. Define $W=Y^2$, so $Y=\sqrt{W}$ (the negative value disappears since $0<y<1$. Hence $\frac{dY}{dw}=\frac{1}{2 \sqrt{w}}$. Pdf of $W$ is 
$$
f_{W}(w)=\sqrt{w} \cdot \frac{1}{2 \sqrt{w}}=\frac{1}{2}
$$ 
From this you can easily find both moments of $W$ and  $\mathbf{Var}W=\frac{1}{4}$.
