**Standard deviation** is the most important **measure of variability** in **statistics**. You will learn how to calculate this statistic in this piece.

## Definition: Standard deviation

It is a statistic that shows how much the values in a dataset deviate from the **mean**. A low figure will show you that the values are closer to the mean. On the other hand, a large deviation will indicate that the data is widely spread.

## The meaning of standard deviation

This statistic is used to **measure the dispersion in a dataset**. It shows you the average amount of variability or how far each **value lies from the mean on average**. This statistic is used with **continuous data** and shouldn’t be used with **categorical data**. Also, it has to be used with datasets that have a **normal distribution**. Some good examples are height, temperature, and length.^{1}

**Note** that a low deviation means that the data points are closer to the mean. A high standard deviation indicates that there is a wider range of values in the dataset. This particular example has a **low deviation.**^{2}

### The empirical rule

The empirical rule is also known as the **68-95-99.7 rule**. It works as a guide on how data is distributed in a **normal distribution**.

According to this rule, about** 68%** of the data points will fall within one standard deviation of the mean, and **95% **of the data points will fall within two standard deviations of the mean.

The rule also states that **99.7%** of the data points will fall within three standard deviations of the mean. You should use this rule to forecast future outcomes.

We can refer to our example above. According to the empirical rule, the following facts hold true:

With the empirical rule, you can easily check for **outliers** in a normal distribution.^{3}

## Standard deviation formulas

Data can be derived from a **sample or population**.

A **population refers to the entire group** that you intend to draw conclusions about.

On the other hand, a **sample is a small group** that is used for **data collection.** The formulas for this statistic are different for population and sample data.

### Populations

Here is an explanation of what each symbol means in the formula:

N |
Number of values in the population |

Σ |
Sum of N |

X |
Individual values in the population |

μ |
Mean |

σ |
Population standard deviation |

√ |
Square root |

s |
Standard deviation for the sample |

√ |
Square root |

x |
Each value in the sample |

## Calculating the standard deviation

There are some **programs** you can use to calculate the standard deviation automatically. If you want to calculate the standard deviation manually, you can follow these steps. We’ll use the dataset above to demonstrate this formula.

### Step 1: Find the mean

You have to start by finding the **mean**. This is done by adding up all values and dividing the sum by the sample size.

### Step 2: Finding deviations from the mean

Next, you should find out each value’s deviation from the mean.

In our example, the deviations are as follows:

20 | -35 |

30 | -25 |

40 | -15 |

50 | -5 |

60 | 5 |

70 | 15 |

80 | 25 |

90 | 35 |

### Step 3: Square the deviations from the mean

You can then square the deviations from the mean:

-35 | 1225 |

-25 | 625 |

-15 | 225 |

-5 | 25 |

15 | 225 |

25 | 625 |

35 | 1225 |

### Step 4: Sum the squares

In this step, you have to find the sum of the squares.

### Step 5: Find the variance

You then have to find the **variance**. You can do this by dividing the sum of squares by **(n-1)**. If you are dealing with a population instead of a sample, you can divide the sum of squares by** N**.

### Step 6: Finding the square root of the variance

Finally, you will have to find the square root of the variance.

## Standard deviation or other methods of variability

Standard deviation is only one way of measuring variability. You can also use the **mean absolute deviation** or **MAD**. This method uses the original units of the data, so interpretation will be easy. Calculating MAD is also very easy. You just need to follow these steps:^{4}

- Calculate the
**sample average** - Find the
**absolute deviation**of each data point from the mean. You should ignore any negative signs. - Find
**the average of all**absolute deviations

While MAD has some benefits, the **standard deviation** is still the **most commonly used** measure of variability. One of its advantages is that it **weights unevenly spread out samples more** as compared to evenly spread out samples. That means you will be able to tell that the data is more unevenly spread out. Standard deviation also gives you a **more precise measure of variability**. It is also worth noting that standard deviation is **more sensitive to outliers**.^{5}

## FAQs

Standard deviation is the **average amount of variability** in a dataset.

Low standard deviation means that the **data points are clustered around the mean**.

Yes, a high standard deviation shows that the data is less reliable as it is widely spread.^{6}

Variance is the **degree of spread in a datase**t. If there is more spread in the dataset, the variance will be large in relation to the mean.

## Sources:

^{1} Laerd Statistics. “Standard Deviation.” Accessed December 12, 2022. https://statistics.laerd.com/statistical-guides/measures-of-spread-standard-deviation.php.

^{2} Calculator. “Standard Deviation Calculator.” Accessed December 12, 2022. https://www.calculator.net/standard-deviation-calculator.html.

^{3} Khan Academy. “Empirical rule.” Accessed December 12, 2022. https://www.khanacademy.org/math/ap-statistics/density-curves-normal-distribution-ap/stats-normal-distributions/e/empirical_rule.

^{4} Jamison, Mark. “Why Is the MAD Always Smaller than the STD?” TowardsDataScience. February 17, 2022. https://towardsdatascience.com/why-is-the-mad-always-smaller-than-the-std-77c7fcee80a4.

^{5} Frost, Jim. “Mean Absolute Deviation: Definition, Finding & Formula.” StatisticsByJim. Accessed December 12, 2022. https://statisticsbyjim.com/basics/mean-absolute-deviation/.

^{6} Science Halley Hosting. “Standard Deviation Part II.” Accessed December 12, 2022. http://science.halleyhosting.com/sci/soph/inquiry/standdev2.htm.