0
$\begingroup$

$X$ is a random variable with $E(X) = \mu$ and $Var(X) = \sigma^2.$ For an arbitrary constant $c$, what is: $E[(X-c)^2]$?

So I tried:

$$ \begin{eqnarray}E[(X-c)^2]&=& E(X^2 +c^2 -2\cdot c \cdot X) \\&=& E(X^2) - 2 \cdot c \cdot E(X) +c^2 \\&=& \mu^2 - 2\cdot c\cdot\mu + c^2 \\&=& (\mu -c)^2\end{eqnarray}$$

Is this correct?

  • 0
    Nope, $E(X^2)\ne\mu^2$.2017-01-24

3 Answers 3

6

Remember that $\mathrm{Var}(X)=\mathbb{E}[X^2]-\mathbb{E}[X]^2=\sigma ^2$ this implies $\mathbb{E}[X^2]=\sigma^2+\mu^2$ substituting into the formula you get $$\mathbb{E}[(X-c)^2]=\sigma^2+\mu^2-2c\mu+c^2=\sigma^2+(\mu-c)^2$$

1

$$E((X-\mu+\mu-c)^2)=E((X-\mu)^2)+2E(X-\mu)(\mu-c)+(\mu-c)^2=\sigma^2+0+(\mu-c)^2.$$

0

One solution: If we know that adding a constant doesn't change the variance, we have

$$\text{Var}X=\text{Var}(X-c)$$

$$\implies \text{Var}X =\mathbb{E}(X-c)^2-(\mathbb{E} (X-c))^2$$

$$\implies \mathbb{E}(X-c)^2 = \text{Var}X + (\mathbb{E} (X-c))^2$$

$$\implies \mathbb{E}(X-c)^2 = \sigma^2 + (\mu-c)^2$$

Alternatively, this result could be viewed as a proof of the translation-invariance of the variance.