Standard Deviation: Why divide by $(N-1)$ rather than $N$?

The forumlae for standard deviation seems to be the square root of the sum of the squared deviation from mean divided by $N-1$.

Why isn't it simply the square root of the mean of the squared deviation from mean? i.e, divided by $N$.

Why is it divided by $N-1$ rather than $N$?

-
To prevent bias, as explained here and here. – William DeMeo Mar 14 '12 at 11:43
This might help: stats.stackexchange.com/questions/3931/… – Byron Schmuland Mar 14 '12 at 12:26
The reason is because it gives you an unbiased estimator. But, do not confuse this with giving the best estimator. In my time series class, my professor tells me that in time series you usually divide by n instead, because it's actually a better approximation. I couldn't explain to you why or anything. – Graphth Mar 14 '12 at 12:42
Well, one thing is that the samples are not independent in time series... I'm sure that has something to do with it. – Graphth Mar 14 '12 at 12:51

If you have n samples, the variance is defined as: $$s^2=\frac{\sum_{i=1}^n (X_i-m)^2}{n}$$ where $m$ is the average of the distribution. In order to have an estimator non $biased$ you have to have: $$E(s^2)=\sigma^2$$ where $\sigma$ is the real unknown value of the variance. It's possible to show that $$E(s^2)=E\left(\frac{\sum_{i=1}^n (X_i-m)^2}{n} \right)=\frac{n}{n-1}\sigma^2$$ So if you want to estimate the 'real' value of $\sigma^2$ you must divide by $n-1$
The sample variance uses the sample average, not $m$. – Byron Schmuland Mar 14 '12 at 12:34