Calculating standard deviation step by step
Introduction
In this article, we'll learn how to calculate standard deviation "by hand".
Interestingly, in the real world no statistician would ever calculate standard deviation by hand. The calculations involved are somewhat complex, and the risk of making a mistake is high. Also, calculating by hand is slow. Very slow. This is why statisticians rely on spreadsheets and computer programs to crunch their numbers.
So what's the point of this article? Why are we taking time to learn a process statisticians don't actually use? The answer is that learning to do the calculations by hand will give us insight into how standard deviation really works. This insight is valuable. Instead of viewing standard deviation as some magical number our spreadsheet or computer program gives us, we'll be able to explain where that number comes from.
Overview of how to calculate standard deviation
The formula for standard deviation (SD) is
where means "sum of", is a value in the data set, is the mean of the data set, and is the number of data points in the population.
The standard deviation formula may look confusing, but it will make sense after we break it down. In the coming sections, we'll walk through a step-by-step interactive example. Here's a quick preview of the steps we're about to follow:
Step 1: Find the mean.
Step 2: For each data point, find the square of its distance to the mean.
Step 3: Sum the values from Step 2.
Step 4: Divide by the number of data points.
Step 5: Take the square root.
An important note
The formula above is for finding the standard deviation of a population. If you're dealing with a sample, you'll want to use a slightly different formula (below), which uses instead of . The point of this article, however, is to familiarize you with the the process of computing standard deviation, which is basically the same no matter which formula you use.
Step-by-step interactive example for calculating standard deviation
First, we need a data set to work with. Let's pick something small so we don't get overwhelmed by the number of data points. Here's a good one:
Step 1: Finding in
In this step, we find the mean of the data set, which is represented by the variable .
Step 2: Finding in
In this step, we find the distance from each data point to the mean (i.e., the deviations) and square each of those distances.
For example, the first data point is and the mean is , so the distance between them is . Squaring this distance gives us .
Step 3: Finding in
The symbol means "sum", so in this step we add up the four values we found in Step 2.
Step 4: Finding in
In this step, we divide our result from Step 3 by the variable , which is the number of data points.
Step 5: Finding the standard deviation
We're almost finished! Just take the square root of the answer from Step 4 and we're done.
Yes! We did it! We successfully calculated the standard deviation of a small data set.
Summary of what we did
We broke down the formula into five steps:
Step 1: Find the mean .
Step 2: Find the square of the distance from each data point to the mean .
Steps 3, 4, and 5:
Try it yourself
Here's a reminder of the formula: