STAT 200 – Introductory Statistics
January 13, 2026
After today’s lecture, you should:
In the previous lecture, we talked about how to mathematically describe the center of the data. But how do we define the uncertainty of the data?
For example, the datasets \(\{ 1,5,9 \}\) and \(\{ 4,5,6 \}\) have the same mean, median and mode. What is the difference between the two sets? How could I describe the difference?
A measure of spread of data describes how similar or varied the set of observed values are for a particular data set. It is used to describe the variability in a sample or population.
Examples:
The variance, \(s^2\), is an average (positive) distance to the center of the data set.
\[ s^2 = \frac{1}{n-1} \sum_{i=1}^n \big( x_i - \bar{x} \big)^2 \]
Some notes on the variance:
The R function to calculate the variance is var().
The standard deviation, \(s\), is an average (positive) distance to the center of the data set. Specifically, it’s the square root of the variance.
\[ s = \sqrt{s^2} = \sqrt{\frac{1}{n-1} \sum_{i=1}^n \big( x_i - \bar{x} \big)^2} \]
Some notes on the standard deviation:
The R function to calculate the standard deviation is sd().
Which of the two pairs have a greater standard deviation/variance?
\[ \begin{aligned}[t] \textrm{Set A:} \quad 1, 2, 3, 4, 5 \\ \textrm{Set B:} \quad 1, 1, 3, 5, 5 \end{aligned} \]
\[ \begin{aligned}[t] \textrm{Set A:} \quad 22, 25, 30, 35, 38 \\ \textrm{Set B:} \quad 61, 62, 71, 80, 81 \end{aligned} \]
\[ \begin{aligned}[t] \textrm{Set A:} \quad 15, 17, 19, 21, 23 \\ \textrm{Set B:} \quad 85, 87, 89, 91, 93 \end{aligned} \]
Example: Find the sample variance and the sample standard deviation of the following data set:
\[ \begin{aligned} 1, 2, 4, 5, 6, 8, 9 \end{aligned} \]
Example: Find the sample variance and the sample standard deviation of the following data set:
\[ \begin{aligned} 2.0, 1.7, 1.9, 1.5, 1.6, 1.9, 1.7, 3.0 \end{aligned} \]
The coefficient of variation, \(c_v\), is also an average distance from the values to the center. However, it is scaled by the mean of the data.
\[ c_v = \frac{s}{\bar{x}} \]
Some notes on the coefficient of variation:
The R function to calculate the coefficient of variation is cv().
The interquartile range (IQR), is the range of the middle 50% of the data. It is defined as the difference between the first and third quartiles.
\[ IQR = Q_3 - Q_1 \]
Some notes on the interquartile range:
The R function to calculate the interquartile range is IQR().
Which set has the largest interquartile range (IQR)?
\[ \begin{aligned} 10, 12, 13, 14, 15, 16, 17, 18 \end{aligned} \]
\[ \begin{aligned} 11, 15, 17, 18, 19, 19 , 20 \end{aligned} \]
The Hildebrand ratio, \(H\), is a scaled measure of skewness of the data. It relies on the difference between the mean and the median, as scaled by the standard deviation.
\[ H = \frac{\bar{x} - \tilde{x}}{s} \]
The Hildebrand ratio is used to determine if the data are too skewed to use mean-based measures:
The R function to calculate the Hildebrand ratio is hildebrand.rule(). This is included in Dr. Forsberg’s R functions that can be loaded.
First we’ll look at a data set of scores on a geography quiz. Calculate and interpret the measures of center and the measures of spread.
Measures of Center:
mean(Score))median(Score))modal(Score))Measures of Spread:
sd(Score))IQR(Score))cv(Score))Measures of Skewness:
hildebrand.rule(Score))Let’s look at the school enrollment percentages for 1990 (enroll90) in the crime data.
The R code we’ll use here is:
Measures of Center:
mean(enroll90))median(enroll90))modal(enroll90))Measures of Spread:
sd(enroll90))IQR(enroll90))cv(enroll90))Measures of Skewness:
hildebrand.rule(enroll90))Let’s look at the school enrollment percentages for 2000 (enroll00) in the crime data instead.
Measures of Center:
mean(enroll00))median(enroll00))modal(enroll00))Measures of Center:
sd(enroll00))IQR(enroll00))cv(enroll00))Measures of Skewness:
hildebrand.rule(enroll00))Finally, let’s look at the violent crime rate in 2000 (vcrime00) in the crime data.
Measures of Center:
mean(vcrime00))median(vcrime00))Measures of Spread:
sd(vcrime00))IQR(vcrime00))cv(vcrime00))Measures of Skewness:
hildebrand.rule(vcrime00))The standard deviation gives us information about intervals that contain “a certain amount” of the data. One of the most useful is the Empirical Rule.
It is also sometimes called the “68-95-99.7% Rule”
According to the empirical rule, if the data are bell-shaped, then the following approximations hold.
Approximately 68% of the data is within one standard deviation of the mean (between \(\mu - 1\sigma\) and \(\mu + 1\sigma\)).
Approximately 95% of the data is within two standard deviation of the mean (between \(\mu - 2\sigma\) and \(\mu + 2\sigma\)).
Approximately 99.7% of the data is within three standard deviation of the mean (between \(\mu - 3\sigma\) and \(\mu + 3\sigma\)).
A graphical illustration:
Let us see how the data we looked at today fits with the empirical rule. The following gives the theoretical and the actual proportion of the data within one standard deviation of the mean.
| Variable | Empirical Rule | Actual |
|---|---|---|
Score
|
0.68 | 0.39 |
enroll90
|
0.68 | 0.63 |
enroll00
|
0.68 | 0.78 |
vcrime00
|
0.68 | 0.76 |
As expeced, the approximation is better for data distributions that are more bell-shaped. The less bell-shaped the distribution is, the worse the approximation.
While the empirical rule gives approximate bounds for specified proportions of the data, Chebyshev’s inequality gives absolute bounds (bounds that must be met).
According to the Chebyshev’s inequality, at least:
\[ 1 - \frac{1}{k^2} \]
of the data are within \(k\) standard deviations of the mean.
Note: These are guaranteed bounds.
Let us see how the data we looked at today fits with the empirical rule. The following gives the theoretical and the actual proportion of the data within two standard deviations of the mean.
| Variable | Empirical Rule | Chebyshev | Actual |
|---|---|---|---|
Score
|
0.95 | 0.75 | 1.00 |
enroll90
|
0.95 | 0.75 | 0.96 |
enroll00
|
0.95 | 0.75 | 0.98 |
vcrime00
|
0.95 | 0.75 | 0.98 |
As expected, the approximation is better for data distributions that are more bell-shaped. The less bell-shaped the distribution is, the worse the approximation.
Here are some things to take away from this discussion:
The empirical rule is an approximation.
Chebyshev’s inequality is guaranteed.
The empirical rule says approximately 95% of the data are within \(2\sigma\) of \(\mu\).
Chebyshev’s inequality says at least 75% of the data are within \(2\sigma\) of \(\mu\).
The empirical rule is better when the data are bell-shaped.
Chebyshev’s inequality is guaranteed, regardless of the data distribution
The empirical rule is useful in applied statistics.
Chebyshev’s inequality is useful in proofs.