TITLE: variance inequality
QUESTION [5 upvotes]: Show that. for any discrete random variable X that takes on values in
the range [0,1]. Var[X] $\le$  1/4.
I translate it into a inequality like this:
$x_1, x_2, x_3 \cdots ,x_n$ where $0 \le x_i \le 1$, and $p_1, p_2, p_3 \cdots ,p_n$ where $p_1+ p_2+ p_3 \cdots +p_n = 1$, prove that $\sum _1^nx_i^2p_i - (\sum _1^n x_ip_i)^2 \le {1\over 4}$ , how to prove it?
At first I tried cauchy inequatlity, but I fail :(

REPLY [8 votes]: Here is a way:
Note that $$0 \leq X \leq 1$$
$$\Rightarrow 0\leq X^2 \leq X \leq 1$$
Thus $E[X^2] \leq E[X]$
Now thus $$Var[X] \leq E[X](1-E[X]) $$
But $0 \leq E[X] \leq 1$, the maxima of $f(x)=x(1-x) \quad x\in [0,1]$ is $1/4$ at $x=.5$ (Hint: AMGM).
QED