I have just started learning standard deviation and I'm trying to understand the formula.
$$ s = \sqrt{ \frac{\sum(x-\bar x)^2}{n-1} } $$
Can anyone explain to me the square (and square root) part? If they are using the square & square root to prevent having negative value, why not just use | | for absolute value?
And I have another question. Why is the $-1$ sometimes omitted?
$$ \sigma = \sqrt{\frac{\sum(x-\bar x)^2}n} $$
Should I -1 or just omit it? I googled the standard deviation formula and some show -1 while some don't.
Thank you so much.
It's not just to prevent negative values: standard deviation has many nice mathematical properties that your alternative proposal would not. In particular, the absolute value function is not differentiable at $0$.
The reason for the $-1$ is to make $s^2$ an unbiased estimator of the variance. See e.g. http://en.wikipedia.org/wiki/Sample_standard_deviation#Sample_standard_deviation
Whether you should use it or not may depend on what you're using it for.