# Find expected value and variance of a function of a random variable given its expected value and variance

I am now being introduced to rigorous statistics and doing some self-learning. A question recently came to mind:

Suppose I have a continuous random variable $$X$$ and I know $$E(X)$$ (expected value) and $$V(X)$$ (variance). Given an arbitrary function $$g(X)$$, can I find $$E(g(X))$$ and $$V(g(X))$$? If not, does there exist a non-constant function $$g_0(X)$$ for which I can find these values with no additional information?

My intuitive answer is no, since the computation of these involves an integral.

As the expectation value is linear, it follows that $$E(aX + b)=aE(X) + b$$. So for $$g(x)=ax+b$$ you can compute $$E(g(X))$$ exactly from only knowing $$E(X)$$.
In other cases, you can try a Taylor expansion of $$g(x)$$ around $$x=\mu:=E(X)$$, but this is obviously only a (possibly crude) approximation: $$\begin{eqnarray*} g(x) & \approx & g(\mu) + g'(\mu)\cdot (x-\mu) + \frac{g''(\mu)}{2} (x-\mu)^2\\ \Rightarrow E(g(X)) & \approx & g(\mu) + 0 + \frac{g''(\mu)}{2} Var(X) \end{eqnarray*}$$
If $$g$$ is convex you can bound the value using Jensen's inequality, but with that little information I think that's probably the best you can do (assuming you don't know the pdf of $$X$$).
If $$g$$ is affine and/or $$X$$ is constant almost surely then you get equality of $$E[g(X)]$$ and $$g(EX)$$. Since you also know $$VarX$$ you can also compute $$Var[g(X)]$$ with some algebra in that case.