5

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 :(

2 Answers2

8

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

Gautam Shenoy
  • 10,318
7

First, for every real valued random variable $X$ and every real number $x$, $\mathrm{var}(X)\leqslant E[(X-x)^2]$ (and in fact the variance is the minimum over $x$ of these upper bounds). Second, if $X\in[0,1]$ almost surely, then $(X-\frac12)^2\leqslant\frac14$ almost surely.

For $x=\frac12$, these two facts put together yield $\mathrm{var}(X)\leqslant E[(X-\frac12)^2]\leqslant\frac14$.

Did
  • 279,727
  • 1
    The random variable being discrete or not is irrelevant. – Did Jun 06 '13 at 09:45
  • your solution make the situation when left equals to right clear, $(X-{1 \over 2})^2 = {1 \over 2} = E(X)$, it says only equal number of 0 and 1 can achieve it , thanks!! – stonestrong Jun 06 '13 at 10:07
  • 1
    Indeed this approach shows that the only way to get variance $\frac14$ is that the variance is $E[(X-\frac12)^2]$ and that $(X-\frac12)^2=\frac14$ almost surely. The first condition means that $E[X]=\frac12$, the second that $X\in{0,1}$ almost surely. Both together yield that $P[X=1]=P[X=0]=\frac12$ is the only solution. – Did Jun 06 '13 at 10:51