Bounding variance with mean for a $[0,1]$ random variable There is this inequality that I found in an article, which looks like folklore as for how its presented, or something that should be easily seen by the reader. I havent been able to wrap my head around it though.
The inequality is the following
$$\operatorname{Var}_{\mu} (f) \leq \frac{1}{2} \mu ( | f - \mu (f) |) $$
$\mu$ being a probability measure, so $\mu(f) $ standing for $f$'s expected value with respect to $\mu$, and $f$ being a random variable taking values in $[0,1] $.
Does anyone know how to see this? I remember having figured it out some time ago but now I dont see it no more..  Ive got the feeling that it should be something actually measure theoretic and not something following just from an inequality that holds for the function being integrated.
Thanks in advance for any answer!
 A: For any $r\in\mathbb{R}$
$$(X-r)(X-\mu_X)=X^2-(r+\mu_X)X+r\mu_X$$
Hence
$$\mathbb{E}[(X-r)(X-\mu_X)]=\mathbb{E}[X^2]-(r+\mu_X)\mu_X+r\mu_X=\mathbb{E}[X^2]-\mu^2_X=\sigma^2_X$$
If $\alpha\leq X\leq\beta$ and $r=\frac{\beta+\alpha}{2}$, then
$$\begin{align}
\sigma^2_X&=|\mathbb{E}[(X-r)(X-\mu_X)]|\leq \mathbb{E}[|X-r||X-\mu_X|]\\
&\leq \frac{\beta-\alpha}{2}\mathbb{E}[|X-\mu_X|]\leq\frac{\beta-\alpha}{2}\big(\mathbb{E}[|X-\mu_X|^2]\big)^{1/2}\\
&\leq \frac{\beta-\alpha}{2}\big(\mathbb{E}[|X-r|^2]\big)^{1/2}\leq \frac{(\beta-\alpha)^2}{4}
\end{align}$$
where the last inequality in the second line follows from application the Cauhcy-Schwartz inequality, and the first inequality on the third line follows from the fact that $$\mu_X=\operatorname{arg}\min_{r\in\mathbb{R}}\mathbb{E}[|X-r|^2]$$
In summary:
$$\sigma^2_X\leq\frac{\beta-\alpha}{2}\mathbb{E}[|X-\mu_X|]\leq\frac{(\beta-\alpha)^2}{4}$$
Equality in the left happens iff $X$ is degenerate (constant $\mathbb{P}$--a.s.); equality on the right occurs iff $X$ takes on two values $\alpha$ and $\beta$ and $\mathbb{P}[X=\alpha]=\mathbb{P}[X=\beta]=\frac12$.
In the case of the OP, take $\alpha=0$, $\beta=1$.
