# How to calculate mean for standard deviation

I've been doing some standard deviation revision but I'm getting confused as different questions have the mean calculated differently.

In some questions, the mean squared is calculated as the actual $mean^2$

so if the mean was $5$ then the mean squared is $25$.

but some others have it calculated where the actual mean is ignored and instead the top half of the fraction for calculating the mean is squared

for example $126^2/12$ rather than $(126/12)^2$

So when is each one used? Is this different for when calculating for frequency tables and lists of data? $$\frac{\sqrt{\sum x^2-n\bar{x}^2}}{n-1}$$

• When you use each equation, do you get the same answer? There are a variety of 'forms' of the stdev formula, but they should all give the same value (provided you've correctly chosen the sample vs population stdev formula) – user237392 Apr 10 '16 at 13:08
• Just checked the formulas again and I was reading it slightly wrong, thanks. – simon Apr 10 '16 at 13:09