If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Population and sample standard deviation review

Population and sample standard deviation

Standard deviation measures the spread of a data distribution. It measures the typical distance between each data point and the mean.
The formula we use for standard deviation depends on whether the data is being considered a population of its own, or the data is a sample representing a larger population.
  • If the data is being considered a population on its own, we divide by the number of data points, N.
  • If the data is a sample from a larger population, we divide by one fewer than the number of data points in the sample, n, minus, 1.
Population standard deviation:
sigma, equals, square root of, start fraction, sum, left parenthesis, x, start subscript, i, end subscript, minus, mu, right parenthesis, squared, divided by, N, end fraction, end square root
Sample standard deviation:
s, start subscript, x, end subscript, equals, square root of, start fraction, sum, left parenthesis, x, start subscript, i, end subscript, minus, x, with, \bar, on top, right parenthesis, squared, divided by, n, minus, 1, end fraction, end square root
The steps in each formula are all the same except for one—we divide by one less than the number of data points when dealing with sample data.
We'll go through each formula step by step in the examples below.
Why we divide by n, minus, 1 is a pretty complex concept. If you want to learn more about the intuition behind this topic, check out this video.

Population standard deviation

Here's the formula again for population standard deviation:
sigma, equals, square root of, start fraction, sum, left parenthesis, x, start subscript, i, end subscript, minus, mu, right parenthesis, squared, divided by, N, end fraction, end square root
Here's how to calculate population standard deviation:
Step 1: Calculate the mean of the data—this is mu in the formula.
Step 2: Subtract the mean from each data point. These differences are called deviations. Data points below the mean will have negative deviations, and data points above the mean will have positive deviations.
Step 3: Square each deviation to make it positive.
Step 4: Add the squared deviations together.
Step 5: Divide the sum by the number of data points in the population. The result is called the variance.
Step 6: Take the square root of the variance to get the standard deviation.

Example: Population standard deviation

Four friends were comparing their scores on a recent essay.
Calculate the standard deviation of their scores:
6, 2, 3, 1
Step 1: Find the mean.
mu, equals, start fraction, 6, plus, 2, plus, 3, plus, 1, divided by, 4, end fraction, equals, start fraction, 12, divided by, 4, end fraction, equals, 3
The mean is 3 points.
Step 2: Subtract the mean from each score.
Score: x, start subscript, i, end subscriptDeviation: left parenthesis, x, start subscript, i, end subscript, minus, mu, right parenthesis
66, minus, 3, equals, 3
22, minus, 3, equals, minus, 1
33, minus, 3, equals, 0
11, minus, 3, equals, minus, 2
Step 3: Square each deviation.
Score: x, start subscript, i, end subscriptDeviation: left parenthesis, x, start subscript, i, end subscript, minus, mu, right parenthesisSquared deviation: left parenthesis, x, start subscript, i, end subscript, minus, mu, right parenthesis, squared
66, minus, 3, equals, 3left parenthesis, 3, right parenthesis, squared, equals, 9
22, minus, 3, equals, minus, 1left parenthesis, minus, 1, right parenthesis, squared, equals, 1
33, minus, 3, equals, 0left parenthesis, 0, right parenthesis, squared, equals, 0
11, minus, 3, equals, minus, 2left parenthesis, minus, 2, right parenthesis, squared, equals, 4
Step 4: Add the squared deviations.
9, plus, 1, plus, 0, plus, 4, equals, 14
Step 5: Divide the sum by the number of scores.
start fraction, 14, divided by, 4, end fraction, equals, 3, point, 5
Step 6: Take the square root of the result from Step 5.
square root of, 3, point, 5, end square root, approximately equals, 1, point, 87
The standard deviation is approximately 1, point, 87.
Want to learn more about population standard deviation? Check out this video.
Want to practice some problems like this? Check out this exercise on standard deviation of a population.

Sample standard deviation

Here's the formula again for sample standard deviation:
s, start subscript, x, end subscript, equals, square root of, start fraction, sum, left parenthesis, x, start subscript, i, end subscript, minus, x, with, \bar, on top, right parenthesis, squared, divided by, n, minus, 1, end fraction, end square root
Here's how to calculate sample standard deviation:
Step 1: Calculate the mean of the data—this is x, with, \bar, on top in the formula.
Step 2: Subtract the mean from each data point. These differences are called deviations. Data points below the mean will have negative deviations, and data points above the mean will have positive deviations.
Step 3: Square each deviation to make it positive.
Step 4: Add the squared deviations together.
Step 5: Divide the sum by one less than the number of data points in the sample. The result is called the variance.
Step 6: Take the square root of the variance to get the standard deviation.

Example: Sample standard deviation

A sample of 4 students was taken to see how many pencils they were carrying.
Calculate the sample standard deviation of their responses:
2, 2, 5, 7
Step 1: Find the mean.
x, with, \bar, on top, equals, start fraction, 2, plus, 2, plus, 5, plus, 7, divided by, 4, end fraction, equals, start fraction, 16, divided by, 4, end fraction, equals, 4
The sample mean is 4 pencils.
Step 2: Subtract the mean from each score.
Pencils: x, start subscript, i, end subscriptDeviation: left parenthesis, x, start subscript, i, end subscript, minus, mu, right parenthesis
22, minus, 4, equals, minus, 2
22, minus, 4, equals, minus, 2
55, minus, 4, equals, 1
77, minus, 4, equals, 3
Step 3: Square each deviation.
Pencils: x, start subscript, i, end subscriptDeviation: left parenthesis, x, start subscript, i, end subscript, minus, x, with, \bar, on top, right parenthesisSquared deviation: left parenthesis, x, start subscript, i, end subscript, minus, x, with, \bar, on top, right parenthesis, squared
22, minus, 4, equals, minus, 2left parenthesis, minus, 2, right parenthesis, squared, equals, 4
22, minus, 4, equals, minus, 2left parenthesis, minus, 2, right parenthesis, squared, equals, 4
55, minus, 4, equals, 1left parenthesis, 1, right parenthesis, squared, equals, 1
77, minus, 4, equals, 3left parenthesis, 3, right parenthesis, squared, equals, 9
Step 4: Add the squared deviations.
4, plus, 4, plus, 1, plus, 9, equals, 18
Step 5: Divide the sum by one less than the number of data points.
start fraction, 18, divided by, 4, minus, 1, end fraction, equals, start fraction, 18, divided by, 3, end fraction, equals, 6
Step 6: Take the square root of the result from Step 5.
square root of, 6, end square root, approximately equals, 2, point, 45
The sample standard deviation is approximately 2, point, 45.
Want to learn more about sample standard deviation? Check out this video.
Want to practice some problems like this? Check out this exercise on sample and population standard deviation.

Want to join the conversation?