Jensen gap (source code)

= Jensen gap
{c}
{title2=$\mathbb E[f(X)]-f(\mathbb E X)$}

The <Jensen gap> is the nonnegative difference $\mathbb E[f(X)]-f(\mathbb E X)$ in <Jensen's inequality>, under its <integrability> assumptions. It quantifies how much applying a <convex function> before averaging differs from applying it afterward. For $f(x)=x^2$ it is the <variance> of $X$; for an <affine function> it is zero. For general <convex functions>, it depends on both the <function> and the distribution of $X$, and is not determined by the <variance> alone.