Use population std dev for the entire population, sample std dev for a subset of data.
Standard deviation is a measure of the amount of variation or dispersion in a set of values. A low standard deviation indicates that the values tend to be close to the mean, while a high standard deviation indicates that the values are spread out over a wider range.
Used when you have data for the entire population. The formula is:
sigma = sqrt(sum((xi - mean)^2) / N)
Where N is the total number of values in the population.
Used when you have data from a sample of the population. The formula is:
s = sqrt(sum((xi - mean)^2) / (n - 1))
Where (n - 1) is called Bessel's correction, which provides an unbiased estimate.
For data set: 2, 4, 4, 4, 5, 5, 7, 9
Mean = (2+4+4+4+5+5+7+9) / 8 = 5 Deviations: -3, -1, -1, -1, 0, 0, 2, 4 Squared deviations: 9, 1, 1, 1, 0, 0, 4, 16 Sum of squared deviations = 32 Population variance = 32/8 = 4 Population std dev = sqrt(4) = 2 Sample variance = 32/7 = 4.57 Sample std dev = sqrt(4.57) = 2.14
For normally distributed data:
This is known as the 68-95-99.7 rule or the empirical rule.