Measures of spread
From range and interquartile range to variance, standard deviation, coefficient of variation, and z-scores: understand differences in data and their relative positions.
Does the same mean imply the same spread?
Two groups each contain 5 students, and both mean scores are 70 points. Keep the mean fixed and try increasing the spread of Group B's scores.
- Mean of both groups A and B
- 70
- Group A sample standard deviation
- 3.16
- Group B sample standard deviation
- 12.65
Range, interquartile range, and mean absolute deviation: three measures of spread
Change the largest observation and compare its effects on three measures. Quartiles follow the preceding lesson's rule: split the sorted data into lower and upper halves and take the median of each.
10 sorted values: 5, 7, 8, 9, 10, 11, 12, 13, 14, 18
- Range R
- 13.0
- Interquartile range IQR
- 5.0
- Mean absolute deviation MD
- 2.90
Current mean 10.70; sum of absolute deviations 29.00
In the original chart, "the green segment represents the range containing the middle 50% of the data"; this lesson marks the same interval with Q1 and Q3.
Variance and standard deviation: calculate step by step from each deviation
Treat the 5 values as a population or as a drawn sample, and compare calculations using denominators N and n−1.
| Observed value xᵢ | Deviation xᵢ−x̄ | Squared deviation |
|---|---|---|
| 4 | -4.00 | 16.00 |
| 6 | -2.00 | 4.00 |
| 8 | 0.00 | 0.00 |
| 10 | 2.00 | 4.00 |
| 12 | 4.00 | 16.00 |
| Total | 0.00 | 40.00 |
- Sample mean
- 8.00
- Sum of squared deviations
- 40.00
- Sample standard deviation
- 3.16
Mean = (4 + 6 + 8 + 10 + 12)÷5 = 8.00.
Sum of squared deviations = 16.00 + 4.00 + 0.00 + 4.00 + 16.00 = 40.00.
As a population: variance 8.00, standard deviation 2.83; as a sample: variance 10.00, standard deviation 3.16.
Can we calculate variance from only a grouped frequency table?
Use each class midpoint to represent all observations in that class, obtaining approximate grouped-data variance and standard deviation. Compare results from the raw data and the midpoint-substituted data.
| Class interval [lower limit, upper limit) | Class midpoint mᵢ | Frequency fᵢ | fᵢmᵢ |
|---|---|---|---|
| 50—60 | 55.0 | 3 | 165.0 |
| 60—70 | 65.0 | 7 | 455.0 |
| 70—80 | 75.0 | 5 | 375.0 |
| 80—90 | 85.0 | 4 | 340.0 |
| 90—100 | 95.0 | 1 | 95.0 |
| Total | 20 | 1430.0 |
Mean 71.00
Sample variance 126.95
Sample standard deviation 11.27
Mean 71.50
Sample variance 129.21
Sample standard deviation 11.37
Coefficient of variation: which production line's daily output is more stable?
Suppose a factory has production lines A and B. The following records show their mean daily outputs and daily-output standard deviations over a period. Which line's daily output is more stable? First examine absolute variability, then variability relative to mean output.
Production line A
Production line B
| Daily-output measure | Production line A | Production line B |
|---|---|---|
| Mean daily output (units) | 100 | 500 |
| Daily-output standard deviation (units) | 20 | 50 |
| Coefficient of variation CV | 20.00% | 10.00% |
① Compare standard deviations: Production line B has a larger standard deviation and greater absolute variability in daily output.
② Compare coefficients of variation: Production line B has a smaller CV and less daily-output variability relative to its own mean, so it is relatively more stable.
The judgments appear to conflict because standard deviation measures absolute variability, while CV measures variability relative to each line's mean daily output. A smaller CV usually means greater relative stability in daily output; CV alone cannot measure production efficiency, cost, or product quality.
Z-scores and the empirical rule: how many standard deviations from the mean?
A z-score subtracts the mean and divides by the standard deviation, allowing comparison of relative positions for observations with different units, means, or variability. For a normal distribution, the empirical rule also helps explain probability ranges around the mean.
Why standardize using z-scores? A large company and a small campus store
Suppose we compare daily revenue at Saudi Aramco and a small campus store on a given day. Their scales differ greatly, so directly comparing "how much more revenue than usual" is not meaningful; if different currencies are used, their units also cannot be compared directly. A z-score converts the amount above or below each mean into a number of standard deviations, giving a dimensionless relative position.
| Purely hypothetical teaching data (not actual business data) | Saudi Aramco | Small campus store |
|---|---|---|
| Mean daily revenue | 100 × 100 million yuan | 2,000 yuan |
| Standard deviation of daily revenue | 10 × 100 million yuan | 400 yuan |
| Revenue on a given day | 115 × 100 million yuan | 2,800 yuan |
| Amount above each mean | 15 × 100 million yuan | 800 yuan |
| Z-score | (115−100) / 10 = +1.50 | (2800−2000) / 400 = +2.00 |
① Z-scores: compare relative positions
- Z-score Z
- 1.50
- Distance from mean in standard deviations
- 1.50 (in standard deviations)
- Side of the mean
- Right of the mean
② Empirical rule: areas under the normal curve
Range around the mean:1 standard deviation on either side of the mean: approximately 68.27%
The horizontal axis shows standard deviations from the mean; shading represents the corresponding theoretical probability area
- Approximate proportion under normality
- Approximately 68.27%
- Lower interval limit (points)
- 60
- Upper interval limit (points)
- 80