What is the Standard Deviation and what formulas are used

The standard or typical deviation measures the dispersion of values ​​around the mean of said values. In other words, it determines how much the values ​​differ from each other.

To be more specific, a set of values ​​close to each other will have a low standard deviation, since the values ​​will be close to the mean. On the other hand, the standard deviation will increase as more values ​​move away from the mean.

Exists two types of standard deviation: the population and the sample. Population implies that the set of values ​​used to calculate the standard deviation represents an entire population. Instead, sampling is used when the set of values ​​represents only a part of the population.

Knowing the standard deviation is useful to know how much variation there is in the data obtained. An example of its application is when carrying out a market study. It can be interesting to discover the variation in age of customers interested in a certain product, or to know the variation in prices they are willing to pay.

How to calculate standard deviation

The standard deviation is calculated taking into account the observed values ​​and the mean or average value of the values. The formula used changes depending on whether the values ​​represent an entire population or only a part of it (sample).

Below we show the formulas for calculating the standard deviation, followed by an explanation of how to apply them.

Formula for the standard deviation of a population

The standard deviation of the values ​​that represent an entire population, also known as the population standard deviation, is calculated with the following formula:

In which:

σ: is the symbol that corresponds to the standard deviation of a population. The same units are used as those of the observed values.
xi: corresponds to the observed values ​​of the elements of the population.
: is the arithmetic mean obtained from the values ​​or observations of the population. In this case, the symbol is interchangeable with µ.
Σ: is the symbol for addition. The summation includes the calculation of (xi-x̄)2 for each observed value of the population.
N: is the total number of values ​​or observations in the population.

In Excel, the equivalent function to this formula is DEVEST.P or STDEV.P, depending on the version and language you use.

Formula for the standard deviation of a sample

The sample standard deviation of a population, also known as the sample standard deviation, is calculated with the following formula:

In which:

yes: is the symbol that corresponds to the standard deviation of a sample. The same units are used as those of the observed values.
xi: corresponds to the observed values ​​of the sample elements.
: is the arithmetic mean obtained from the values ​​or observations of the sample.
Σ: is the symbol for addition. The summation includes the calculation of (xi-x̄)2 for each observed value of the sample.
N: is the total number of values ​​or observations in the sample. In this case, the term -1 It is because it is an incomplete sample that does not define an entire population.

In Excel, the equivalent function to this formula is DEVEST.S or STDEV.S, depending on the version and language you use.

How to use standard deviation formulas step by step

To better illustrate how to use each term in the formula, let’s look at an example. Let’s take the following set of values: 5, 9, 12 and fifteen. Taking these values ​​into account, the first step is to calculate their average.

First step: calculate the average of the values

To find out what is the arithmetic mean of all the values ​​or it is enough to add the observed values ​​and divide them by the number of data.

With the average value already obtained, let’s proceed to calculate the value of the sum.

Second step: calculate the value of the sum

To know the value of the sum, we have to add the squares of the differences between the data and the mean. That is to say:

Now that we know the value of the sum, let’s proceed with the calculation of the variance.

Third step: calculate the variance

To calculate the variance, we need to apply the division formula. This will change depending on whether we are looking to obtain the standard deviation of an entire population or that of a sample.

If the set of values ​​5, 9, 12 and 15 represent an entire population, then:

If the set of values ​​5, 9, 12 and 15 is a sample and does not represent an entire population, then:

The variance is the square of the standard deviation. For this reason, there is one more step to obtain the standard deviation of a population or sample.

Fourth step: get the standard deviation from the variance

To finish, we only have to apply the square root to the variance and thus obtain the standard deviation.

The population standard deviation in this example is:

The sample standard deviation in this example is:

As we see in the example, the standard deviation of a sample (4.27) is greater than that of the population (3.7). This will always be the case, since, in the case of a sample, the denominator of the division (N–1) is lower than when calculating the deviation of a population (N).

Examples of uses of standard deviation

When conducting surveys that contain scores or numerical values, the standard deviation is used to understand how much variation there is in the answers given by respondents. To determine the weather, the standard deviation is used to predict to some extent what the temperature will be on a particular day. , based on data collected in previous years. Within the real estate business, this type of deviation is used to know the variety of house prices in a neighborhood, town or city. The standard deviation is It is used to know the variety in ages of people who attend an event or conference, or of clients who buy a certain product. In the investment market, the standard deviation is one of the key factors in order to know the investment risk. and the variation in possible profits.

See also What is Statistics and Descriptive Statistics.