Alternative expression for the variance of $g(X)$

99 Views Asked by At

Let $X$ have the density $f_X(t) = \frac19 t^2$ in $[0, 3]$ and $Y = X^3$. Find $\operatorname{E}(Y)$ and $\operatorname{Var}(Y)$.

If $Y = g(X)$, the density of $Y$ is given by $f_Y(t) = \left( g^{-1} \right)' (t) \cdot f_X \left( g^{-1}(t) \right)$ so $Y$ is uniformly distributed in $[0, 27]$ which means $\operatorname{E}(Y) = \frac{27}2$ and $\operatorname{Var}(Y) = \frac{243}4$.

One could also find $\operatorname{E}(Y)$ using the law of the unconscious statistician

$$\operatorname{E} \big( g(X) \big) = \int_{\mathbb R} g(t) f_X(t) \text{ d}t$$

and knowing that

$$\operatorname{Var}(Y) = \int_{\mathbb R} \big( t - \operatorname{E}(Y) \big)^2 f_Y(t) \text{ d}t$$

my classmate used

$$\int_{\mathbb R} \big( g(t) - \operatorname{E}(Y) \big)^2 f_X(t) \text{ d}t$$

to calculate $\operatorname{Var}(Y)$. For every example I have tried, this does result in the correct value but I have been unable to find a derivation for this formula. For the example above,

$$\int_0^3 \left( t^3 - \frac{27}2 \right)^2 \cdot \frac19 t^2 \text{ d}t = \frac{243}4$$

It also captures the familiar $\operatorname{Var}(aX + b) = a^2 \operatorname{Var}(X)$ since

$$\int_{\mathbb R} \big( at+b - \operatorname{E}(aX+b) \big)^2 f_X(t) \text{ d}t = \int_{\mathbb R} \big( at+b - a\operatorname{E}(X) - b \big)^2 f_X(t) \text{ d}t $$ $$= a^2 \int_{\mathbb R} \big( t - \operatorname{E}(X) \big)^2 f_X(t) \text{ d}t$$

Any resources on this are highly appreciated.

2

There are 2 best solutions below

0
On BEST ANSWER

Both expressions for the variance are equal. Starting from

$$\int_a^b \big( g(x) - \operatorname E(Y) \big)^2 f_X(x) \text{ d}x$$

substitute $y=g(x)$ which means $\text dx = \frac{\text dy}{g'(x)}$ and $x = g^{-1}(y)$

$$\int_{g(a)}^{g(b)} \big( y - \operatorname E(Y) \big)^2 f_X \big( g^{-1}(y) \big) \; \frac{\text dy}{g' \big( g^{-1}(y) \big)}$$

which can be rewritten using $$\displaystyle f_Y(t) = (g^{-1})'(t) \cdot f_X \big( g^{-1}(t) \big) = \frac{f_X \big( g^{-1}(t) \big)}{g' \big( g^{-1}(y) \big)}$$

leading to $$\int_{g(a)}^{g(b)} \big( y - \operatorname E(Y) \big)^2 f_Y(y) \text{ d}y = \operatorname{Var}(Y)$$

0
On

As @Henry noted in a comment, this is just a second application of the law.

By definition, you have: $$\mathrm{Var}(Y)=\mathrm{E}[(Y-\mathrm{E}(Y))^2]$$ but the $E(Y)$ on the right-hand side is just a number.

If you wanted to apply the law of the unconscious statistician to the expression $E[(Y-\sqrt{7})^2]=E[(g(X)-\sqrt{7})^2]$ for some weird reason, then it would give: $$E[(Y-\sqrt{7})^2] = \int_{-\infty}^\infty(g(t)-\sqrt{7})^2f_X(t)dt$$ (i.e., technically, you apply the law to the function $h(x)=(g(x)-\sqrt{7})^2$).

Your classmate just used the number $E(Y)$ in place of the number $\sqrt{7}$.