Learning

open
close

Measures of Spread

June 23, 2025 | by Bloom Code Studio

By the end of this section, you will be able to:

  • Define and calculate standard deviation for a data set.
  • Define and calculate variance for a data set.
  • Explain the relationship between standard deviation and variance.

Standard Deviation

An important characteristic of any set of data is the variation in the data. In some data sets, the data values are concentrated close to the mean; in other data sets, the data values are more widely spread out. For example, an investor might examine the yearly returns for Stock A, which are 1%, 2%, -1%, 0%, and 3%, and compare them to the yearly returns for Stock B, which are -9%, 2%, 15%, -5%, and 0%.

Notice that Stock B exhibits more volatility in yearly returns than Stock A. The investor may want to quantify this variation in order to make the best investment decisions for a particular investment objective.

The most common measure of variation, or spread, is standard deviation. The standard deviation of a data set is a measure of how far the data values are from their mean. A standard deviation

  • provides a numerical measure of the overall amount of variation in a data set; and
  • can be used to determine whether a particular data value is close to or far from the mean.

The standard deviation provides a measure of the overall variation in a data set. The standard deviation is always positive or zero. It is small when the data values are all concentrated close to the mean, exhibiting little variation or spread. It is larger when the data values are more spread out from the mean, exhibiting more variation.

Suppose that we are studying the variability of two different stocks, Stock A and Stock B. The average stock price for both stocks is $5. For Stock A, the standard deviation of the stock price is 2, whereas the standard deviation for Stock B is 4. Because Stock B has a higher standard deviation, we know that there is more variation in the stock price for Stock B than in the price for Stock A.

There are two different formulas for calculating standard deviation. Which formula to use depends on whether the data represents a sample or a population. The notation s is used to represent the sample standard deviation, and the notation σσ is used to represent the population standard deviation. In the formulas shown below,  is the sample mean, μμ is the population mean, n is the sample size, and N is the population size.

Formula for the sample standard deviation:

s=∑(x − x¯)2n − 1−−−−−−−−−−√s=∑(x – x¯)2n – 1

13.8

Formula for the population standard deviation:

 σ=∑(x−μ)2N−−−−−−−−−√ σ=∑(x-μ)2N

13.9

Variance

Variance also provides a measure of the spread of data values. The variance of a data set measures the extent to which each data value differs from the mean. The more the individual data values differ from the mean, the larger the variance. Both the standard deviation and the variance provide similar information.

In a finance application, variance can be used to determine the volatility of an investment and therefore to help guide financial decisions. For example, a more cautious investor might opt for investments with low volatility.

Similar to standard deviation, the formula used to calculate variance also depends on whether the data is collected from a sample or a population. The notation s2s2 is used to represent the sample variance, and the notation σ2 is used to represent the population variance.

Formula for the sample variance:

s2=∑(x − x¯)2n − 1s2=∑(x – x¯)2n – 1

13.10

Formula for the population variance:

 σ2=∑(x−μ)2N σ2=∑(x-μ)2N

13.11

This is the method to calculate standard deviation and variance for a sample:

  1. First, find the mean x¯x¯ of the data set by adding the data values and dividing the sum by the number of data values.
  2. Set up a table with three columns, and in the first column, list the data values in the data set.
  3. For each row, subtract the mean from the data value (x−x¯)(x-x¯), and enter the difference in the second column. Note that the values in this column may be positive or negative. The sum of the values in this column will be zero.
  4. In the third column, for each row, square the value in the second column. So this third column will contain the quantity (Data Value – Mean)2 for each row. We can write this quantity as (x − x¯)2x – x¯2. Note that the values in this third column will always be positive because they represent a squared quantity.
  5. Add up all the values in the third column. This sum can be written as ∑(x−x¯)2∑x-x¯2.
  6. Divide this sum by the quantity (n – 1), where n is the number of data points. We can write this as ∑(x − x¯)2n − 1∑x – x¯2n – 1.
  7. This result is called the sample variance, denoted by s2. Thus, the formula for the sample variance is s2=∑(x − x¯)2n − 1s2=∑x – x¯2n – 1.
  8. Now take the square root of the sample variance. This value is the sample standard deviation, called s. Thus, the formula for the sample standard deviation is s=∑(x − x¯)2n − 1−−−−−−−√s=∑(x – x¯)2n – 1.
  9. Round-off rule: The sample variance and sample standard deviation are typically rounded to one more decimal place than the data values themselves.

Think It Through

Finding Standard Deviation and Variance

A brokerage firm advertises a new financial analyst position and receives 210 applications. The ages of a sample of 10 applicants for the position are as follows:

40, 36, 44, 51, 54, 55, 39, 47, 44, 5040, 36, 44, 51, 54, 55, 39, 47, 44, 50

13.12

The brokerage firm is interested in determining the standard deviation and variance for this sample of 10 ages.

Solution:

Find the sample variance and sample standard deviation by creating a table with three columns (see Table 13.3).

  1. The data set is 40, 36, 44, 51, 54, 55, 39, 47, 44, 50.
  2. This data set has 10 data values. Thus, n=10n=10.
  3. The mean is calculated as x¯=46x¯=46.
  4. Column 1 will contain the data values themselves.
  5. Column 2 will contain x−x¯x-x¯.
  6. Column 3 will contain (x−x¯)2x-x¯2.Column 1xxColumn 2(x − x¯¯)(x – x¯)Column 3(x − x¯¯)2(x – x¯)24040 − 46 = −640 – 46 = -6(−6)2 = 36(-6)2 = 363636 − 46 = −1036 – 46 = -10(−10)2 = 100(-10)2 = 1004444 − 46 =  −244 – 46 =  -2(−2)2 = 4(-2)2 = 45151 − 46 = 551 – 46 = 5(5)2 = 25(5)2 = 255454 − 46 = 854 – 46 = 8(8)2 = 64(8)2 = 645555 − 46 = 955 – 46 = 9(9)2 = 81(9)2 = 813939 − 46 = −739 – 46 = -7(−7)2 = 49(-7)2 = 494747 − 46 = 147 – 46 = 1(1)2 = 1(1)2 = 14444 − 46 = −244 – 46 = -2(−2)2 = 4(-2)2 = 45050 − 46 = 450 – 46 = 4(4)2 = 16(4)2 = 16 Sum= 0Sum= 0Sum= 380Sum= 380Table 13.3 Calculations for Standard Deviation for Age Example
  7. To calculate the sample variance, use the sample variance formula:s2=∑(x − x¯)2n − 1=38010 − 1=3809≈42.2s2=∑x – x¯2n – 1=38010 – 1=3809≈42.213.13
  8. To calculate the sample standard deviation, use the sample standard deviation formula:s=∑(x − x¯)2n − 1−−−−−−−−−−√=3809−−−−√≈6.5s=∑x – x¯2n – 1=3809≈6.513.14

As the above example illustrates, calculating the variance and standard deviation is a tedious process. A financial calculator can calculate statistical measurements such as mean and standard deviation quickly and efficiently.

There are two steps needed to perform statistical calculations on the calculator:

  1. Enter the data in the calculator using the [DATA] function, which is located above the 7 key.
  2. Access the statistical results provided by the calculator using the [STAT] function, which is located above the 8 key.

Follow the steps in Table 13.4 to calculate mean and standard deviation using the financial calculator. The ages data set from the Think It Through example above is used again here: 40, 36, 44, 51, 54, 55, 39, 47, 44, 50.

StepDescriptionEnterDisplay
1Enter [DATA] entry mode2ND [DATA]X010.00
2Clear any previous data2ND [CLR WORK]X010.00
3Enter first data value of 4040 ENTERX01 =40.00
4Move to next data entryY01 = 1.00
5Move to next data entryX020.0
6Enter second data value of 3636 ENTERX02 =36.00
7Move to next data entryY02 =1.00
8Move to next data entryX030.00
9Enter third data value of 4444 ENTERX03 =44.00
10Move to next data entryY03 = 1.00
11Continue to enter remaining data values   
12Enter [STAT] mode2nd [STAT]LIN 
13Move to first statistical resultn =10.00
14Move to next statistical resultx¯=x¯=46.00
15Move to next statistical resultSx =6.50

Table 13.4 Calculator Steps for Mean and Standard Deviation2

From the statistical results, the mean is shown as 46, and the sample standard deviation is shown as 6.50.

Excel provides a similar analysis using the built-in functions =AVERAGE (for the mean) and =STDEV.S (for the sample standard deviation). To calculate these statistical results in Excel, enter the data values in a column. Let’s assume the data values are placed in cells A2 through A11. In any cell, type the Excel command =AVERAGE(A2:A11) and press enter. Excel will calculate the arithmetic mean in this cell. Then, in any other cell, type the Excel command =STDEV.S(A2:A11) and press enter. Excel will calculate the sample standard deviation in this cell. Figure 13.2 shows the mean and standard deviation for the 10 ages.

Screenshot of an Excel sheet showing the commands to calculate the mean and standard deviation of a sample data. Ten ages are listed: 40, 36, 44, 51, 54, 55, 39, 47, 44, and 50. The Excel command to calculate the sample mean is =Average open parenthesis A2 colon A11 close parenthesis.  The result is 46.  The Excel command to calculate sample standard deviation is =STDEV dot s open parenthesis A2 colon A11 close parenthesis.  The result is 6.5

Figure 13.2 Mean and Standard Deviation in Excel.

Relationship between Standard Deviation and Variance

In the formulas shown above for variance and standard deviation, notice that the variance is the square of the standard deviation, and the standard deviation is the square root of the variance.

Once you have calculated one of these values, you can directly calculate the other value. For example, if you know the standard deviation of a data set is 12.5, you can calculate the variance by squaring this standard deviation. The variance is then 12.52, which is 156.25.

In the same way, if you know the value of the variance, you can determine the standard deviation by calculating the square root of the variance. For example, if the variance of a data set is known to be 31.36, then the standard deviation can be calculated as the square root of 31.36, which is 5.6.

One disadvantage of using the variance is that the variance is measured in square units, which are different from the units in the data set. For example, if the data set consists of ages measured in years, then the variance would be measured in years squared, which can be confusing. The standard deviation is measured in the same units as the original data set, and thus the standard deviation is used more commonly than the variance to measure the spread of a data set.

RELATED POSTS

View all

view all