# Variance Bound for a Random Variable

Let $X$ b a random variable such that $P(a \leq x \leq b)=1$ for $-\infty<a<b<\infty$. Show that:

$Var(X) \leq \displaystyle\frac{(b-a)^2}{4}$

I'm not sure on how to get started with the problem. I was thinking that perhaps Markov's inequality or Chebychev's inequality would be useful, but I'm not sure on how to apply them for this case

• Hint. (1) Notice that $\operatorname{Var}(X) \leq \Bbb{E}[(X - c)^2]$ for any $c$. (2) $(X - (a+b)/2)^2 \leq (b-a)^2/4$ almost surely. – Sangchul Lee Dec 7 '15 at 23:03
• I can see why for the first part. However, for the second one how do you arrive to that result? – hoyast Dec 8 '15 at 2:29
• You can check by algebra that the second inequality is equivalent to $(X - a)(X - b) \leq 0$, which is guaranteed by the assumption (in a.s.-sense). – Sangchul Lee Dec 8 '15 at 2:51
• It's enough to show that $var(X)\le \frac 1 4$ for $X\in[0,1]$. But $var(X)=E(X^2)-(EX)^2\le EX-(EX)^2\le \frac 1 4$. – A.S. Dec 8 '15 at 9:09