We all know that $E[E[X]]=E[X]$. I was wondering, does it also hold that $E[g(E[X])]=E[g(X)]$ for "any" function $g$?
2026-03-28 20:04:53.1774728293
On
Iterating functions of expectations
78 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
0
On
This does not hold in general. Take any function $g$. Then $$ E[g(E[X])]=g(E[X]), $$ since $g(E[X])$ is a constant. (By linearity of the expectation.)
In general if $g$ is measurable and integrable, $E[g(X)]\neq g(E[X])$. For example, if $g$ is convex or concave, then there is equality if and only if $g$ is linear or $X$ is constant. (This is the case of equality in Jensen's inequaity).
No. For example take a normal distributed random variable with mean $0$ and variance $1$ $X \simeq \mathcal{N}(0,1)$ and $g(x)=x^2$. You have $\mathbb{E}(X^2)=1$ and $\mathbb{E}(0^2)=0$.
However you can indeed say something interesting when $g$ is convex. In that case Jensen inequality tells us that $$ g(\mathbb{E}[X]) \leq \mathbb{E}[g(X)] $$
Take $-g$ for the concave case. When $g$ is affine, it is in particular convex and concave so your equality holds for any random variable $X$. Also $\mathbb{E}[g(\mathbb{E}[X])]=g(\mathbb{E}[X])$ since $g(\mathbb{E}[X])$ is a real number, not a random variable.