How to derive the formula for the expected value of a function of a continuous random variable

39 Views Asked by At

If $X$ is a r.v. with density $f$ and $Y = g(X)$ then $$E[Y] = \int_{\Bbb R}g(x)f(x)$$

My text offers no demonstration of this. I am familiar with the Lebesgue integral in case the proof relies on measure-theoretic notions. Any help, either in the form of a derivation or reference to one would be much appreciated.

2

There are 2 best solutions below

0
On BEST ANSWER

$EY=Eg(X)=\int g(x)d\mu(x)$ where $\mu$ is the measure with density f, so $EY=\int g(x)f(x)dx$.

0
On

Here's a derivation for the Riemann Integral:

Let $F_X$/$F_Y$ and $f(x)$/$h(x)$ denote the CDF and pdf of $X$ and $Y = g(X)$ respectively. Recall that, by definition, the pdf is the derivative of the CDF. Thus we find the density $h(x)$ by finding $F_Y$ and using the fact that $h = F'_Y$. We thus have:

$F_Y(y) = Pr[Y \leq y] = Pr[g(X) \leq y] = Pr[ X \leq g^{-1}(y)] = F_X\left(g^{-1}(y)\right) = \left(F_X \circ g^{-1}\right)(y) \\ \implies h(y) = F'_Y(x) = \left(F_X \circ g^{-1}\right)'(y) = F'_X\left(g^{-1}(y)\right)\left(g^{-1}\right)'(y) = f\left(g^{-1}(y)\right)\left(g^{-1}\right)'(y) $ $ \\ $

Finally we make the $u$-substitution $$y = g(x) \implies x = g^{-1}(y) \text{ and } dx = \left(g^{-1}\right)'(y) \ dy$$ and observe:

$$E[Y] = \int_{\mathbb{R}} yh(y) \ \mathrm{d}y = \int_{\mathbb{R}} y f\left(g^{-1}(y)\right) \left(g^{-1}\right)'(y) \ \mathrm{d}y = \int_{\mathbb{R}} g(x)f(x) \ \mathrm{d}x$$