Quantitative version of Jensen's inequality? I've been looking at situations where Jensen's inequality is almost tight, and found myself proving a lemma that I'm nearly certain exists somewhere in the literature.
The specifics are as follows: Suppose we have some convex, increasing function $f(x)$ and a set of $n$ real numbers $x_i$. Define $$ \delta := \frac{\sum  f(x_i)}{ n } -f\left(\frac{\sum x_i}{n}\right)$$
We know that $\delta$ is positive by Jensen's, and that it is zero when all the $x_i$'s are equal to the average. Let $\delta$ be positive, but small. We now fix an epsilon, and ask how many $x_i$'s are either greater than $\frac{\sum x_i}{n}(1 + \epsilon)$ or smaller than $\frac{\sum x_i}{n}(1 - \epsilon)$. If we call that set $I$,
the lemma would state that
$$ |I| \leq g(\delta, \epsilon) n$$
for $g$ continuous, vanishing as delta goes to zero for any fixed $\epsilon$, and depending only on the choice of $f$. What this shows is that if the Jensen's "deficit" is small, then the number of entries that are "far away" from the average is $o(n)$.
Is this some well known (or even not well known, but existent...) lemma?
Thanks! — Matan
EDIT: Made a silly mistake in defining $\delta$ — the body should now contain the correct normalization (Thanks Daniel!)
 A: This is not an answer but it may be helpful to know that there exists the notion of modulus of convexity of a convex function $f:X\to ]-\infty,\infty]$ defined on a Banach space $X$ which quantifies how convex a convex function is. It is defined as
$$
\delta_f(t) = \inf\{\tfrac{1}{2}f(x) + \tfrac12 f(y) - f(\tfrac{x+y}{2})\ :\ \|x-y\|=t \}.
$$
If $\delta_f(t)>0$ for $t>0$ then $f$ is uniformly convex, if $\delta_f(t)>Ct^p$ for some $C>0$, then $f$ one says that $f$ has a modulus of convexity of power type $p$.
A: See the paper of Hussain and Pečarić, "AN IMPROVEMENT OF JENSEN'S INEQUALITY WITH SOME APPLICATIONS",
https://www.worldscientific.com/doi/abs/10.1142/S179355710900008X
For any random variable $X$ and concave function $\phi$,
$$  \phi(\mathbb{E}\left(X\right))-\mathbb{E}\left(\phi(X)\right)
  \geq  \Biggl|\mathbb{E}\left(\Bigl|\phi(X)-\phi(\mathbb{E}\left(X\right))\Bigr|\right)
  -\Bigl|\phi_{+}^{'}(\mathbb{E}\left(X\right))\Bigr|\cdot\mathbb{E}\left(\Bigl|X-\mathbb{E}\left(X\right)\Bigr|\right)\Biggr|, 
$$
where $\phi_{+}^{'}$ denotes the right-hand derivative of $\phi$.
