6.2: Calculating the Standard Deviation
Learning Objectives
- Understand the meaning of standard deviation.
- Understanding the percents associated with standard deviation.
- Calculate the standard deviation for a normally distributed random variable.
This semester you decided to join the school’s bowling league for the first time. Having never bowled previously, you are very anxious to find out what your bowling average is for the semester. If your average is comparable to that of the other students, you will join the league again next semester. Your coach has told you that your mean score is 70, and now you want to find out how your results compare to that of the other members of the league.
Your coach has decided to let you figure this out for yourself. He tells you that the scores were normally distributed and provides you with a list of the other mean scores. These average scores are in no particular order. In other words, they are random.
We will discover how your mean bowling score compares to that of the other bowlers later in the lesson.
Standard Deviation
In the previous lesson, you learned that standard deviation is a measure of the spread of a set of data away from the mean of the data.
In a normal distribution, on either side of the line of symmetry, the curve appears to change its shape from being concave down (looking like an upside-down bowl) to being concave up (looking like a right-side-up bowl). Where this happens is called an inflection point of the curve. If a vertical line is drawn from an inflection point to the -axis, the difference between where the line of symmetry goes through the -axis and where this line goes through the -axis represents 1 standard deviation away from the mean. Approximately 68% of all the data is located within 1 standard deviation of the mean.
To emphasize this fact and the fact that the mean is the middle of the distribution, let’s play a game of Simon Says. Using color paper and 2 types of shapes, arrange the pattern of the shapes on the floor as shown below. Randomly select 7 students from your class to play the game. You will be Simon, and you are to give orders to the selected students. Only when Simon Says are the students to obey the given order. The orders can be given in many ways, but 1 suggestion is to deliver the following orders:
- “Simon Says for Frank to stand on the rectangle.”
- “Simon Says for Joey to stand on the closest oval to the right of Frank.”
- “Simon Says for Liam to stand on the closest oval to the left of Frank.”
- “Simon Says for Mark to stand on the farthest oval to the right of Frank.”
- “Simon Says for Juan to stand on the farthest oval to the left of Frank.”
- “Simon Says for Jacob to stand on the middle oval to the right of Frank.”
- “Simon Says for Sean to stand on the middle oval to the left of Frank.”
Once the students are standing in the correct places, pose questions about their positions with respect to Frank. The members of the class who are not playing the game should be asked to respond to these questions about the position of their classmates. Some questions that should be asked are the following:
- “Which 2 students are standing closest to Frank?”
- “Are Joey and Liam both the same distance away from Frank?”
- “Which 2 students are furthest away from Frank?”
- “Are Mark and Juan both the same distance away from Frank?”
When the students have completed playing Simon Says, they should have an understanding of the concept that the mean is the middle of the distribution and the remainder of the distribution is evenly spread out on either side of the mean.
The picture below is a simplified form of the game you have just played. The yellow rectangle is the mean, and the remaining rectangles represent 3 steps to the right of the mean and 3 steps to the left of the mean.
If we consider the spread of the data away from the mean, which is measured using standard deviation, as being a stepping process, then 1 step to the right or 1 step to the left is considered 1 standard deviation away from the mean. 2 steps to the left or 2 steps to the right are considered 2 standard deviations away from the mean. Likewise, 3 steps to the left or 3 steps to the right are considered 3 standard deviations away from the mean. The standard deviation of a data set is simply a value, and in relation to the stepping process, this value would represent the size of your footstep as you move away from the mean. Once the value of the standard deviation has been calculated, it is added to the mean for moving to the right and subtracted from the mean for moving to the left. If the value of the yellow mean tile was 58, and the value of the standard deviation was 5, then you could put the resulting sums and differences on the appropriate tiles.
For a normal distribution, 68% of the data values would be located within 1 standard deviation of the mean, which is between 53 and 63. Also, 95% of the data values would be located within 2 standard deviations of the mean, which is between 48 and 68. Finally, 99.7% of the data values would be located within 3 standard deviations of the mean, which is between 43 and 73. The percentages mentioned here make up what statisticians refer to as the 68-95-99.7 Rule. These percentages remain the same for all data that can be assumed to be normally distributed. The following diagram represents the location of these values on a normal distribution curve.
Now that you understand the distribution of the data and exactly how it moves away from the mean, you are ready to calculate the standard deviation of a data set. For the calculation steps to be organized, a table is used to record the results for each step. The table will consist of 3 columns. The first column will contain the data and will be labeled . The second column will contain the differences between the data values and the mean of the data set. This column will be labeled . The final column will be labeled , and it will contain the square of each of the values recorded in the second column.
Example 2
Calculate the standard deviation of the following numbers:
Solution:
Step 1: It is not necessary to organize the data. Create a table and label each of the columns appropriately. Write the data values in column .
Step 2: Calculate the mean of the data values.
Step 3: Calculate the differences between the data values and the mean. Enter the results in the second column.
2 | |
7 | 2 |
5 | 0 |
6 | 1 |
4 | |
2 | |
6 | 1 |
3 | |
6 | 1 |
9 | 4 |
Step 4: Calculate the values for column 3 by squaring each result in the second column.
Step 5: Calculate the mean of the third column and then take the square root of the answer. This value is the standard deviation of the data set.
9 |
4 |
0 |
1 |
1 |
9 |
1 |
4 |
1 |
16 |
Step 5 can be written using the formula .
The standard deviation of the data set is approximately 2.1.
Now that you have completed all the steps, here is the table that was used to record the results. The table was separated as the steps were completed. Now that you know the process involved in calculating the standard deviation, there is no need to work with individual columnswork with an entire table.
2 | 9 | |
7 | 2 | 4 |
5 | 0 | 0 |
6 | 1 | 1 |
4 | 1 | |
2 | 9 | |
6 | 1 | 1 |
3 | 4 | |
6 | 1 | 1 |
9 | 4 | 16 |
Example 3
A company wants to test its exterior house paint to determine how long it will retain its original color before fading. The company mixes 2 brands of paint by adding different chemicals to each brand. 6 one-gallon cans are made for each paint brand, and the results are recorded for every gallon of each brand of paint. The following are the results obtained in the laboratory:
Brand A (Time in months) | Brand B (Time in months) |
---|---|
15 | 40 |
65 | 50 |
55 | 35 |
35 | 40 |
45 | 45 |
25 | 30 |
Calculate the standard deviation for each brand of paint.
Solution:
Brand A:
15 | 625 | |
65 | 25 | 625 |
55 | 15 | 225 |
35 | 25 | |
45 | 5 | 25 |
25 | 225 |
The standard deviation for Brand A is approximately 17.1.
Brand B:
40 | 0 | 0 |
50 | 10 | 100 |
35 | 25 | |
40 | 0 | 0 |
45 | 5 | 25 |
30 | 100 |
The standard deviation for Brand B is approximately 6.5.
Note: The standard deviation for Brand A (17.1) was much larger than that for Brand B (6.5). However, the means of both brands were the same. When the means are equal, the larger the standard deviation is, the more variable are the data.
To find the standard deviation, you subtract the mean from each data value to determine how much each data value varies from the mean. The result is a positive value when the data value is greater than the mean, a negative value when the data value is less than the mean, and 0 when the data value is equal to the mean.
If we were to add the variations found in the second column of the table, the total would be 0. This result of 0 implies that there is no variation between the data value and the mean. In other words, if we were conducting a survey of the number of hours that students use a cell phone in 1 day, and we relied upon the sum of the variations to give us some pertinent information, the only thing that we would learn is that all the students who participated in the survey use a cell phone for the exact same number of hours each day. We know that this is not true, because the survey does not show all the responses as being the same. In order to ensure that these variations do not lose their significance when added, the variation values are squared prior to calculating their sum.
What we need for a normal distribution is a measure of spread that is proportional to the scatter of the data, independent of the number of values in the data set and independent of the mean. The spread will be small when the data values are consistent, but large when the data values are inconsistent. The reason that the measure of spread should be independent of the mean is because we are not interested in this measure of central tendency, but rather, only in the spread of the data. For a normal distribution, both the variance and the standard deviation fit the above profile for an appropriate measure of spread, and both values can be calculated for the set of data.
To calculate the variance for a population of normally distributed data:
Step 1: Determine the mean of the data values.
Step 2: Subtract the mean of the data from each value in the data set to determine the difference between the data value and the mean: .
Step 3: Square each of these differences and determine the total of these positive, squared results.
Step 4: Divide this sum by the number of values in the data set.
These steps for calculating the variance of a data set for a population can be summarized in the following formula:
where:
is a data value.
is the population mean.
is number of data values (population size).
These steps for calculating the variance of a data set for a sample can be summarized in the following formula:
where:
is a data value.
is the sample mean.
is number of data values (sample size).
The only difference in the formulas is the number by which the sum is divided. For a population, it is divided by , and for a sample, it is divided by .
Example 4
Calculate the variance of the 2 brands of paint in Example 3. These are both small populations.
Brand A (Time in months) | Brand B (Time in months) |
---|---|
15 | 40 |
65 | 50 |
55 | 35 |
35 | 40 |
45 | 45 |
25 | 30 |
Solution:
Brand A
15 | 625 | |
65 | 25 | 625 |
55 | 15 | 225 |
35 | 25 | |
45 | 5 | 25 |
25 | 225 |
Brand B
40 | 0 | 0 |
50 | 10 | 100 |
35 | 25 | |
40 | 0 | 0 |
45 | 5 | 25 |
30 | 100 |
From the calculations done in Example 3 and in Example 4, you should have noticed that the square root of the variance is the standard deviation, and the square of the standard deviation is the variance. Taking the square root of the variance will put the standard deviation in the same units as the given data. The variance is simply the average of the squares of the distance of each data value from the mean. If these data values are close to the value of the mean, the variance will be small. This was the case for Brand B. If these data values are far from the mean, the variance will be large, as was the case for Brand A.
The variance and the standard deviation of a data set are always positive values.
Example 5
The following data represents the morning temperatures and the monthly rainfall (mm) in July for all the Canadian cities east of Toronto:
Temperature
Precipitation (mm)
Which data set is more variable? Calculate the standard deviation for each data set.
Solution:
Temperature
11.7 | 1 | |
13.7 | 1 | 1 |
10.5 | 4.84 | |
14.2 | 1.5 | 2.25 |
13.9 | 1.2 | 1.44 |
14.2 | 1.5 | 2.25 |
10.4 | 5.29 | |
16.1 | 3.4 | 11.56 |
16.4 | 3.7 | 13.69 |
4.8 | 62.41 | |
15.2 | 2.5 | 6.25 |
13.0 | 0.3 | 0.09 |
14.4 | 1.7 | 2.89 |
12.7 | 0 | 0 |
8.6 | 16.81 | |
12.9 | 0.2 | 0.04 |
11.5 | 1.44 | |
14.6 | 1.9 | 3.61 |
The variance of the data set is approximately , and the standard deviation of the data set is approximately .
Precipitation (mm)
18.6 | 2970.3 | |
37.1 | 1296 | |
70.9 | 4.84 | |
102.0 | 28.9 | 835.21 |
59.9 | 174.24 | |
58.0 | 228.01 | |
73.0 | 0.01 | |
77.6 | 4.5 | 20.25 |
89.1 | 16.0 | 256 |
86.6 | 13.5 | 182.25 |
40.3 | 1075.8 | |
119.5 | 46.4 | 2153 |
36.2 | 1361.6 | |
85.5 | 12.4 | 153.76 |
59.2 | 193.21 | |
97.8 | 24.7 | 610.09 |
122.2 | 49.1 | 2410.8 |
82.6 | 9.5 | 90.25 |
The variance of the data set is approximately 778.66 mm, and the standard deviation of the data set is approximately 27.9 mm.
Therefore, the data values for the precipitation are more variable. This is indicated by the large variance of the data set.
Example 6
Now that you know how to calculate the variance and the standard deviation of a set of data, let’s apply this to a normal distribution by determining how your bowling average compared to those of the other bowlers in your league. This time technology will be used to determine both the variance and the standard deviation of the data.
Solution:
From the list, you can see that the mean of the bowling averages is approximately 63.7 and that the standard deviation is approximately 14.1.
To use technology to calculate the variance involves naming the lists according to the operations that you need to do in order to determine the correct values. In addition, you can use the CATALOG menu of the calculator to determine the sum of the squared variations. All of the same steps used to calculate the standard deviation of the data are applied to give the mean of the data set. You could also use the CATALOG menu to find the mean of the data, but since you are now familiar with 1-Var Stats, you can use this method.
The mean of the data is approximately 63.7. L2 will now be renamed to compute the values for .
Likewise, L3 will be renamed .
The sum of the values in L3 divided by the number of data values (36) is the variance of the bowling averages.
Lesson Summary
In this lesson, you learned that the standard deviation of a set of data is a value that represents a measure of the spread of the data from the mean. You also learned that the variance of the data from the mean is the square of the standard deviation. Calculating the standard deviation manually and calculating it by using technology were additional topics you learned in this lesson.
Points to Consider
- Does the value of standard deviation stand alone, or can it be displayed with a normal distribution?
- Are there defined increments for how data spreads away from the mean?
- Can the standard deviation of a set of data be applied to real-world problems?