TITLE: How to prove a random variable taking values in $[0,1]$ range has variance no larger than $\frac{1}{4}$?
QUESTION [5 upvotes]: How can I prove that a random variable taking values in $[0,1]$ has variance no larger than $\frac{1}{4}$?
If it matters, discrete and continuous proofs are both welcome.

REPLY [3 votes]: Simple calculus shows that the mean $\mu_X$ is the constant with smallest mean squared distance from $X$. Combined with the condition $0 \leq X\leq 1$, this gives 
$$\mbox{Var}(X)=\mathbb{E}[(X-\mu_X)^2]\leq \mathbb{E}\left[\left(X-{1\over 2}\right)^2\right]\leq {1\over 4}.$$