Section 1.5 Statistical Measures of Variation
These measures provide some indication of how much the data set is "spread out". Indeed, note that the data sets {-2,-1,0,1,2} and {-200,-100,0,100,200} have the same mean but one is much more spread out than the other. Measures of variation should catch this difference.
Using the order statistics,
Definition 1.5.1. Range:.
It is trivial to note that the range is very easy to compute but it completely ignores all data values except for the two ends.
From the Presidential data 1.3.2, the maximum is 69 and the minimum is 46 so the range is 23, the difference of these two.
Definition 1.5.2. Interquartile Range (IQR):.
For the data set {2, 5, 8, 10}, you have found that \(Q_1 = 2.75\) and \(Q_3 = 9.5\text{.}\) Therefore,
Let's now consider a measure of variation that is the counterpart to the mean in that it involves a computation that utilizes the actual values of all the data.
Average Deviation from the Mean (Population): Given a population data set \(x_1, x_2, ... , x_n\) with mean \(\mu\) each term deviates from the mean by the value \(x_k - \mu\text{.}\) So, averaging these gives
This metric is therefore always zero for any provided set of data since cancellation makes this not useful. You should have expected this to be true since the definition of the mean is indeed the place where the data is "balanced". So, we need to determine ways to avoid cancellation.
Average Absolute Deviation from the Mean (Population):
which, although nicely stated, is difficult to deal with algebraically since the absolute values do not simplify well algebraically. Indeed, it is easy to see that, for example when n=3, the mean lies somewhere between \(y_1\) and \(y_3\) (using the ordered data) but could be on either side of \(y_2\) and so
where the ? is either a + or a - but it could be either in general. To avoid this algebraic roadblock, we can look for another way to nearly accomplish the same goal by squaring and then square rooting.
Average Squared Deviation from the Mean (Population):
which will always be non-negative but can be easily expanded using algebra. Since this is a mouthful, this measure is generally called the "variance".
Using the average squared deviation from the mean, differences have been squared. Thus all of the squared differences added are non-negative but very small ones have been made even smaller and larger ones have been made relatively larger. To undo this scaling issue, one must take a square root to get things back into the right ball park.
The variance is the average squared deviation from the mean. If this data comes from the entire universe of possibilities then we call it a population variance and denote this value by \(\sigma^2\text{.}\) Therefore The standard deviation is the square root of the variance. If this data comes from the entire universe of possibilities then we call it a population standard deviation and denote this value by \(\sigma\text{.}\) Therefore If data comes from a sample of the population then we call it a sample variance and denote this value by Sample data tends to reflect certain "biases". For example, a small data set is unlikely to contain a member of the data set that is far away from the major portion of the data. However, data values that are far from the mean provide a much greater contribution to the calculation of v than do values that are close to the mean. Technically, bias is defined mathematically using something called "expected value" and would be discussed in a course that might follow this one. To account for this, we increase the value computed for v slightly by \(\frac{n}{n-1}\) to give the sample variance via and the sample standard deviation \(s\) similarly as the square root of the sample variance.
Definition 1.5.3. Variance and Standard Deviation.
From the data {2,5,8,10}, you have found that the mean is 6.25. Computing the variance then involves accumulating and averaging the squared differences of each data value and this mean. Then
Theorem 1.5.4. Alternate Forms for Variance.
Proof.
The second part is proved similarly. Using the first part of the proof above,
Example 1.5.5. Computing means and variances by hand.
In the data table below, notice that the \(x_k\) column would be the given data values but the column for \(x_k^2\) you could easily compute.
\(x_k\)
\(x_k^2\)
1
1
-1
1
0
0
2
4
2
4
5
25
Therefore, \(s^2 = \frac{6}{5} \times v = \frac{26}{5}\text{.}\)
Checkpoint 1.5.7. Computing Descriptive Statistics.
Once again, we can compute these descriptive statistics using R. We again display a box and whisker diagram and you should now notice the the "box" corresponds to the IQR.
Experiment in the above interactive cell by using one of the built-in data sets.
We can also consider once again the Population of the individual USA states according to the 2013 Census is considered below.
Checkpoint 1.5.8. USA State Population Measures of Variation.
Using the US Census Bureau state populations 1.4.8 (in millions) for 2014 provided earlier, determine the range, quartiles, and variance for this sample data.
SolutionAgain, you should note that these are already in order so the range is quickly found to be
million residents.
For IQR, we first must determine the quartiles. The median (found earlier) already is the second quartile so we have \(Q_2 = 4.5\) million. For the other two, the formula for computing percentiles gives you the 25th percentiile
and the 75th percentile
Hence, the IQR = 7.325 - 2.05 = 5.275 million residents.
From the computation before, again note that n=51 since the District of Columbia is included. The mean of this data found before was found to be approximately 6.20 million residents. So, to determine the variance you may find it easier to compute using the the alternate variance formulas Theorem 1.5.4.
and so you get a sample variance of
and a sample standard deviation of
million residents.
The interquartile range is sometimes also called the interquantile range. It must be noted that R computes the IQR differently for some reason. You can look up the R documentation to see what they do but notice that you can force R to use the standard approach as well. Below, for example, the interactive cell determine the IQR using R's preferred method. However, to use the method from this text, you can make the function call IQR(data, type=2). This might be helpful to know when working on some WeBWorK exercises where the author could be using R to compute the correct answer.
The state population data set has been entered for you in the R cell below...