Integral of a function and function of an integral For a probability distribution $\mu$, and real valued function $f$, when is $\left| \int^1_0 f(x) \mu(x) dx - f(\int^1_0 x \mu(x) dx)\right|$ small? For example, intuitively, if $\mu$ is sharply peaked about the mean, and not too skewed, and $f$ is not too wiggly, then the above difference looks like it will be small. Can we be more specific? Provide bounds on the difference given certain properties of $f,\mu$?
 A: You get a reasonable estimate if you assume $f$ twice differentiable with a bounded second derivative on the support of $\mu$.
Your random variable here takes values in $[0,1]$ but that is not so important. So take any real random variable $X$ with average $m$ and of finite variance $\sigma^2<+\infty$. Assume that $|f''|\leq a$ on the support of $X$. Then with $\lambda=f'(m)$ we have the following inequality on the support of $\mu$:
$$ |f(X)-f(m) -\lambda (X-m)| \leq \frac{a}2  |X-m|^2.$$
Taking averages we get
$$ |{\mathbf E}(f(X)) - f({\mathbf E} X)|\leq 
|{\mathbf E} (f(X)-f(m)-\lambda (X-m))| \leq \frac{a}{2} \sigma^2. $$
A: @H.H.Rugh already gave you a nice answer but it may be worth adding a minor thing. The minimum of 
$$
\left| \int f(x) \mu(x) dx - f \left( \int x \mu(x) dx  \right) \right|
$$
is zero (it is by definition a non-negative expression). You obtain exactly zero if 
$\mu(x) = \delta(x-a)$, where $\delta$ is the Dirac delta.
In fact, just by using the defining property of the Dirac delta,
$$
 \int f(x) \delta(x-a) dx = f(a)
$$
and 
$$
\int x \delta(x-a) dx = a
$$
