I think there is something that says you can divide by N-1 as well, probably because if you have only one value, the standard derivation would become 0 if you divided by 1, while it rather should be undefined (as in division by 0 undefined
).
There is also an alternative way of calculation the standard derivation where you calculate the average value "at the same time" (though it really does the same):
$\displaystyle \{ x_i \}$ is your data set and n is the number of data points.
Calculate the sum $\displaystyle s$ of the values: $\displaystyle s\ =\ \sum_{i\ =\ 1}^n x_i$
The average value $\displaystyle a$ is obtained by the fraction $\displaystyle s/n$
Calculate the sum $\displaystyle S$ of the squares of the values: $\displaystyle S\ =\ \sum_{i\ =\ 1}^n x_i^2$
Calculate what the sum of the squares would have been ($\displaystyle S_1$) if every value $\displaystyle x_i$ had been the same as the average value: $\displaystyle S_1/n\ =\ a^2\ \Rightarrow\ S_1\ =\ (s/n)^2 \cdot n\ =\ s^2/n$
Now let's se how much is missing to obtain the actual sum of the squares: $\displaystyle S - S_1$
Now if we divide the difference by n we'll get the variance squared: $\displaystyle \sigma^2\ =\ \frac{S - S_1}{n}\ =\ \frac{S - s^2/n}{n}\ =\ \frac{S}{n} - \frac{s^2}{n^2}\ =\ \frac{\displaystyle{\sum_{i\ =\ 1}^n x_i^2}}{n} - \left(\frac{\displaystyle{\sum_{i\ =\ 1}^n x_i}}{n}\right)^2$
So, the variance $\displaystyle \sigma\ =\ \sqrt{\frac{\displaystyle{\sum_{i\ =\ 1}^n x_i^2}}{n} - \left(\frac{\displaystyle{\sum_{i\ =\ 1}^n x_i}}{n}\right)^2} $