Measures of Variability

Standard Deviation

The standard deviation is simply the square root of the variance. This makes the standard deviations of the two quiz distributions \mathrm{1.257} and \mathrm{2.203}. The standard deviation is an especially useful measure of variability when the distribution is normal or approximately normal (see Chapter on Normal Distributions) because the proportion of the distribution within a given number of standard deviations from the mean can be calculated. For example, \mathrm{68\%} of the distribution is within one standard deviation of the mean, and approximately \mathrm{95\%} of the distribution is within two standard deviations of the mean. Therefore, if you had a normal distribution with a mean of \mathrm{50} and a standard deviation of \mathrm{10}, then \mathrm{68\%}  of the distribution would be between 50 - 10 = 40 and 50 +10 =60. Similarly, about \mathrm{95\%} of the distribution would be between 50 - 2 \times 10 = 30 and 50 + 2 \times 10 = 70. The symbol for the population standard deviation is σ; the symbol for an estimate computed in a sample is \mathrm{s}. Figure 2 shows two normal distributions. The red distribution has a mean of \mathrm{40} and a standard deviation of \mathrm{5}; the blue distribution has a mean of \mathrm{60} and a standard deviation of \mathrm{10}. For the red distribution, \mathrm{68\%} of the distribution is between \mathrm{35} and \mathrm{45}; for the blue distribution, \mathrm{68\%} is between \mathrm{50} and \mathrm{70}.

Figure 2. Normal distributions with standard deviations of \mathrm{5} and \mathrm{10}.



R code

q1=c(9,9,9,8,8,8,8,7,7,7,7,7,6,6,6,6,6,6,5,5)
IQR(q1, type = 6)
[1] 2
x=c(1,2,4,5)
var(x)
[1] 3.333333
sd(q1)
[1] 1.256562
q2=c(10,10,9,9,9,8,8,8,7,7,7,6,6,6,5,5,4,4,3,3)
sd(q2)
[1] 2.202869