I was given the following sample {9,8 ; 10,2 ; 10,4 ; 9,8 ; 10 ; 10,2 ; 9,6}. So if I compute the mean I obtain 10. If I compute the standard deviation with:
$\sqrt{\frac{1}{6} \sum{(x_i-10)^2}}$
I obtain 0,2828. But if first I compute the mean of the squared values, which gives 100,0685714, and then use the formula:
$\sqrt{100,0685714 - 10^2}$
I obtain 0,2618. Where is my mistake?
EDIT
I found the reason of the error. If I divide by 7 instead of 6 (population mean), both formulas give the same. Which brings new questions. Does the second formula works only while using the population formula? Is there a 'simplified formula' to compute faster the sample error, like the one I used in the second case?