### Functions of a random variable

#### (May 9, 2018)

Assume we have a random variable, $$X$$, with expected value $$\eta$$ and variance $$\sigma^2$$.  Often we find ourselves wanting to know the expected value and variance of a function of that random variable, $$f(X)$$.  Fortunately there are some workable approximations involving only $$\eta$$, $$\sigma^2$$ and the derivatives of $$f$$.  In both cases we make use of a Taylor-series expansion of $$f(X)$$ around $$\eta$$:

$f(X)=\sum_{n=0}^\infty \frac{f^{(n)}(\eta)}{n!}(X-\eta)^n$

where $$f^{(n)}$$ denotes the $$n^{\rm th}$$ derivative of $$f$$ with respect to $$X$$.  For the expected value of $$f(X)$$ we then have the following second-order approximation:

${\rm E}[f(X)] \approx f(\eta)+\frac{f''(\eta)}{2}\sigma^2\qquad(1)$