Quantitative version of equality in Jensen’s inequality Since $x\mapsto x^2$ is strictly convex it follows from the equality case of Jensen’s inequality that if $(E X)^2=E X^2$ for some random variable $X$, then $X=EX$ almost surely. 
How can this be made quantitative? Suppose that 
$$(1-\epsilon)E X^2 \le (EX)^2 \le E X^2 $$
for some small $\epsilon>0$. What is the best that can be said about 
$$E \lvert X - EX\rvert$$
in terms of $\epsilon$? 
Edit The inequality is homogenous in $X$. Therefore if $E \lvert X-EX \rvert = \delta > 0$, then for any $n$, $nX$ still satisfies the assumption and $ E \lvert nX - E nX\rvert =n \delta$ cannot have an upper bound purely in terms of $\epsilon$. I am asking for an upper bound which is allowed to depend on the size of $X$ in some sense. For example an upper bound in terms of $\sqrt{E X^2}$ might be reasonable. 

Let $m = EX$ and $Y = X - m$, so that $EY = 0$. One has
$E(X^2) = m^2 + E(Y^2)$, so that $(1-\epsilon)(m^2 + E(Y^2))\le m^2$ which implies $(1-\epsilon)E(Y^2)\le \epsilon m^2$. Finally, assuming $\epsilon\in (0,1)$,
$$(E|Y|)^2 \le E(Y^2)\le \frac{\epsilon}{1-\epsilon}m^2$$
It follows that 
$$E|X-EX| \le \sqrt{\frac{\epsilon}{1-\epsilon}} |EX|$$
Edit If you want $E(X^2)$, you can write
$$(E|Y|)^2 \le E(Y^2) = E(X^2)- m^2\le \epsilon E(X^2)$$
It follows that
$$E|X-EX| \le \sqrt{\epsilon}\sqrt{E(X^2)} $$
