# Why is variance defined as the expected value of difference squared? [duplicate]

This question already has an answer here:

As I understand it, variance of a random variable is defined as follows: $$\text{Var}(X) = \text{E}[(X-\mu)^2]$$ $X-\mu$ is obviously the difference between the value of the random variable and the expected value of the random variable.

Why don't we define variance as $$\text{Var}(X) = \text{E}[X-\mu]$$

To me, this would make more sense because it would express the difference between the expected value and the value it takes...which to me sounds like variation.

Why do we use the $(X-\mu)^2$ instead?

## marked as duplicate by Milo Brandt, user147263, Daniel W. Farlow, Winther, Jonas MeyerFeb 9 '15 at 2:17

• $E[X-\mu]$ is always $0$, so it does not express anything about $X$. – user147263 Feb 9 '15 at 0:15