Let $X$ be a random variable, prove that for any real number $a$, that $\mathrm{Var}(X) \le E[(X-a)^2]$

171 Views Asked by At

I have the following question:

Let $X$ be a random variable, prove that for any real number $a$, $$\mathrm{Var}(X) \le E[(X-a)^2].$$

The question gives a hint by saying:

Write $\mathrm{Var}(X) = E[(X-a-(E[X]-a)^2)$.

So I thought about just expanding the LHS:

\begin{align*} E[(X-a)^2] &= E[X^2 - 2aX - a^2] \\ &=E[X^2] - 2aE[X] - a^2 \end{align*} Since $a$ is a constant $E[a^2]= a^2$.

I did not see anything obvious so I did the same thing to the RHS:

\begin{align*} \mathrm{Var}(X) &= E[(X - a - (E[X] - a))^2] \\ &= E[X] - E[a] -E[(E[X])^2 - aE[X] +a^2] \\ &= E[X] - a - (E[X])^2 - aE[X]+a^2 \end{align*}

But now I am stuck because I feel like a did a ton of algebra, and don't know how to proceed. Any help on to get unstuck (or if I misinterpreted something) would be greatly appreciated.

2

There are 2 best solutions below

3
On BEST ANSWER

We know that $\operatorname{Var}(X) = E[X^2] - E^2[X]$. Let's see how can we massage $E[(X - a)^2]$:

\begin{eqnarray} E[(X - a)^2] &=& \\ &=& E[X^2 - 2 a E[X] + a^2] \\ &=& a^2 - 2aE[X] + E[X^2] \\ &=& (a - E[X])^2 + E[X^2] - E^2[X] \\ &=& (a - E[X])^2 + \operatorname{Var}(X) \end{eqnarray}

This concludes the proof :)

0
On

Similar to Antoine's answer.

We know $\sigma^2 = E[(X-\mu)^2]$ where $\mu = E[X]$. Then (typical trick) sum and substract $\mu$ from the desired inner expression:

$$\begin{align} E[(X-a)^2]&=E[(X-\mu + \mu -a)^2]\\ &= E[ (X-\mu)^2 + 2(\mu-a)(X-\mu)+(\mu-a)^2]\\ &= \sigma^2 + 2(\mu-a)E[X-\mu]+(\mu-a)^2\\ &= \sigma^2 + (\mu-a)^2 \end{align}$$

which implies $E[(X-a)^2] \ge \sigma^2$, with equality iff $a=\mu$.