Jensen gap for a real-valued random variable $X \geq 0$

For a real-valued random variable $$X \geq 0$$,

We have $$1 - \frac{1}{1+E \left[x\right]} \geq E \left[ 1 - \frac{1}{1+x} \right]$$ (Jensen's inequality).

We want to get a tight constant gap between $$1 - \frac{1}{1+E \left[x\right]}$$ and $$E \left[ 1 - \frac{1}{1+x} \right]$$, i.e., $$\lvert 1 - \frac{1}{1+E \left[x\right]} - E \left[ 1 - \frac{1}{1+x} \right] \rvert \leq \epsilon_0$$.

Any hints for this inequality?

Taylor expanding $$\frac{1}{1+x}$$ around $$x = E[x]$$ gives us \begin{align*} \text{Gap} &= \left|1 - \frac{1}{1+E[x]} - E\left[1 - \frac{1}{1+x}\right] \right| \\&= \left|E\left[\frac{1}{1+x}\right] - \frac{1}{1+E[x]} \right| \\ &= \left|\frac{1}{1+E[x]} - E\left[\frac{x - E[x]}{(1 + E[x])^2}\right] + E\left[\frac{(x - E[x])^2}{(1 + E[x])^3}\right] - \cdots - \frac{1}{1+E[x]}\right| \\ &\le \frac{\text{Var}(x)}{(1 + E[x])^3} \end{align*}
• How can we guarantee $| - E \left[ \frac{x - E[x]}{(1+E[x])^2} \right] + \cdots | \leq \frac{\text{Var}(x)}{(1+E[x])^3}$? – Inkyu Bang Jun 5 at 12:30
• The first term $E[x-E[x]] = 0$ and the second term is $\text{Var}(x)/(1+E[x])^3$ Since the series is alternating and your random variable is always positive, the remaining terms only serve to decrease your sum, so we can truncate and leave with that inequality. – Tom Chen Jun 9 at 22:27