As an experimenter, it is important to be able to calculate standard deviation, because it is a very important parameter that defines the way data is centered about the mean.
The standard deviation is the square root of variance. Thus the way we calculate standard deviation is very similar to the way we calculate variance.
In fact, to calculate standard deviation, we first need to calculate the variance, and then take its square root.
The standard deviation formula is similar to the variance formula. It is given by:
σ = standard deviation
xi = each value of dataset
x (with a bar over it) = the arithmetic mean of the data (This symbol will be indicated as mean from now)
N = the total number of data points
∑ (xi - mean)^2 = The sum of (xi - mean)^2 for all datapoints
For simplicity, we will rewrite the formula:
σ = √[ ∑(x-mean)^2 / N ]
This to minimize the chance of confusion in the examples below.
As an example to calculate standard deviation, consider a sample of IQ scores given by 96, 104, 126, 134 and 140.
σ = √[ ((-24)^2+(-16)^2+(6)^2+(14)^2+(20)^2) / 5 ]
σ = √[ (576 + 256 + 36 + 196 + 400) / 5 ]
σ = √[ (1464) / 5 ]
σ = √[292.8]
σ = 17.11
It can easily be seen that the sample standard deviation is larger than the standard deviation for the data.
Calculation of standard deviation is important to correctly interpret the data. For example, in physical sciences, a lower standard deviation for the same measurement implies higher precision for the experiment.
Also, when the mean needs to be interpreted, it is important to quote the standard deviation too. For example, the mean weather over a day in two cities might be 24C. However, if the standard deviation is very large, it may mean extremes of temperature - too hot during the day and too cold during the nights (like a desert). On the other hand, if the standard deviation is small, it means a fairly uniform temperature throughout the day (like a coastal region).
Just like in the case of variance, we define a sample standard deviation when we are dealing with samples rather than populations. This is given by a slightly modified equation:
where the denominator is N-1 instead of N in the previous case. This correction is required to get an unbiased estimator for the standard deviation.
This follows the same calculation as the example above, for standard deviation for population, with one exception: The division should be "N - 1", not "N".
σ = √[ ∑(x-mean)2 / (N - 1) ]
Then it follows the same example as above, except that there is a 4 where there was a 5:
σ = √[ ∑(x-mean)2 / 4 ]
σ = √[ ((-24)2+(-16)+(6)2+(14)2+(20)2) / 4 ]
σ = √[ (576 + 256 + 36 + 196 + 400) / 4 ]
σ = √[ (1464) / 4 ]
σ = √
σ = 19.13