Here is the formula for the variance : $\sigma^2=\dfrac{\sum(X-\mu)^2}{N}$.
My question is why do we SQUARE the difference between the mean and the variable, why don't we use absolute value ...The result will be different!
I saw online that it's to make the value positive, but like why don't we choose 4 or 6 as exponent?
Hope someone can enlighten me!
Thanks :) Ayman


The expected distance from the mean $E\left(\left|X-E(X)\right|\right)$ is also a valid measure of the variability of a random variable. This is known as mean absolute deviation or MAD.
The expected squared distance from the mean, the variance $E\left[\left(X-E(X)\right)^2\right]$ has established itself historically because it is easier to handle analytically while it still stays positive. As Jimmy R. mentioned you can still differentiate after squaring while the same is not true for taking the absolute value.
Another property you should be aware of is that since squaring is a convex transformation, larger deviations from the mean affect the variance more strongly than smaller deviations from the mean. The same is not true for MAD.