Intuition for Jensen inequality. I know that for $\varphi$ convex, $$\varphi\left(\frac{1}{b-a}\int_a^b f(x)dx\right)\leq \frac{1}{b-a}\int_a^b\varphi(f(x))dx,$$
I also know how to prove it, but I don't understand the intuition behind. Any idea ?
 A: *

*$\displaystyle\frac{1}{b-a}\int_a^b f(x)\,\mathrm d x$ is the mean value of $f$ on the interval $[a,b]$, 

*Suppose $\varphi(x)\ge 0$ on $[a,b]$ and $\int_a^b\varphi(x)\,\mathrm dx=1$. 


$\qquad\displaystyle  \frac{1}{b-a}\int_a^b\varphi(f(x))\,\mathrm dx$ is the weighted mean of $f$ on  $[a,b]$ (for the weight function $f$).
Jensen's inequality can be interpreted as saying that, for a convex weight function $\varphi$, the image of the mean of a function $f\,$ by $\varphi$ is no more than the  $\varphi$-weighted mean of $f$.
A: You know that for a convex function $\phi$ we have
$\phi(c_1 x_1 + \cdots + c_n x_n) \leq c_1 \phi(x_1) + \cdots + c_n \phi(x_n)$ when the weights are nonnegative and sum to $1$.
Just approximate the integral on the left by a Riemann sum and apply this inequality. "In the limit" we obtain your inequality.
Here's a bit more detail.  Partition $[a,b]$ as $a = x_0 < x_1 < \cdots < x_N = b$ and select numbers $\xi_i \in [x_i,x_{i+1}]$ for $i = 0,\ldots,N-1$.  Let $\Delta x_i = x_{i+1} - x_i$ (for $i = 0,\ldots,N-1$).  Then
\begin{align*}
\phi\left(\frac{1}{b-a} \int_a^b f(x) \, dx \right) & 
\approx \phi\left(\frac{1}{b-a} \sum_{i=0}^{N-1} f(\xi_i) \Delta x_i \right) \\
&\leq \sum_{i=0}^{N-1} \frac{\Delta x_i}{b-a} \phi(f(\xi_i)) \\
&\approx \frac{1}{b-a} \int_a^b \phi(f(x)) \, dx.
\end{align*}
The inequality in line 2 follows because $\phi$ is convex and the "weights" $\Delta x_i/(b-a)$ are nonnegative and sum to $1$.
