Topic contents

Lesson 4

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.

Group A scores (fixed): 66, 68, 70, 72, 74
Group B scores (change with the slider): 54, 62, 70, 78, 86
Mean of both groups A and B
70
Group A sample standard deviation
3.16
Group B sample standard deviation
12.65
Think about it: if the groups have the same average level, can we conclude that their score patterns are also the same?
Group A
6668707274Score (points)Mean 706668707274
Group B
607080Score (points)Mean 705462707886
Why measure spread?
The mean describes the center of the data; spread describes how dispersed the data are around that center. Looking only at the mean may conceal differences within a group.

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
Why does increasing the rightmost value increase the range sharply, while the interquartile range may remain completely unchanged?
① Range
R=xmax⁡−xmin⁡R=x_{\max}-x_{\min}
R=18−5=13.0R=18-5=13.0
② Interquartile range
IQR=Q3−Q1IQR=Q_3-Q_1
IQR=13.0−8.0=5.0IQR=13.0-8.0=5.0
③ Mean absolute deviation about the arithmetic mean
MD=∑∣xi−xˉ∣nMD=\frac{\sum|x_i-\bar{x}|}{n}

Current mean 10.70; sum of absolute deviations 29.00

MD=29.0010=2.90MD=\frac{29.00}{10}=2.90
51015Score (points)Q1Q35789101112131418

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.

Range, IQR, and mean absolute deviation
The range uses only the two extreme values; the interquartile range focuses on the middle 50% of the data; mean absolute deviation uses each observation's absolute deviation from the mean. MD here is not median absolute deviation (MAD).

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.

Edit 5 observations (0–20):
Observed value xᵢDeviation xᵢ−x̄Squared deviation
4-4.0016.00
6-2.004.00
80.000.00
102.004.00
124.0016.00
Total0.0040.00
Sample mean
8.00
Sum of squared deviations
40.00
Sample standard deviation
3.16
Why can't we measure spread by adding signed deviations directly? Why does squaring prevent positive and negative deviations from canceling?
① Population variance and standard deviation
σ2=∑(xi−μ)2N,σ=σ2\sigma^2=\frac{\sum(x_i-\mu)^2}{N},\quad\sigma=\sqrt{\sigma^2}
σ2=40.005=8.00\sigma^2=\frac{40.00}{5}=8.00
② Sample variance and standard deviation
s2=∑(xi−xˉ)2n−1,s=s2s^2=\frac{\sum(x_i-\bar{x})^2}{n-1},\quad s=\sqrt{s^2}
s2=40.005−1=10.00s^2=\frac{40.00}{5-1}=10.00
s=10.00≈3.16s=\sqrt{10.00}\approx3.16
Substitute step by step:

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.

4681012Score (points)Mean 8.04681012
Variance and standard deviation
Deviations from the sample mean sum to 0, leaving only n−1 free to vary. Under conditions including independent and identically distributed observations with finite variance, dividing by n−1 makes sample variance an unbiased estimator of population variance. Standard deviation has the original measurement unit; variance has its square.

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.

Raw scores (20 students): 52, 55, 58, 60, 61, 62, 65, 66, 68, 69, 72, 73, 75, 77, 79, 81, 83, 85, 88, 91
Class interval [lower limit, upper limit)Class midpoint mᵢFrequency fᵢfᵢmᵢ
50—6055.03165.0
60—7065.07455.0
70—8075.05375.0
80—9085.04340.0
90—10095.0195.0
Total201430.0
Why can coarser grouping lose more information about spread? Must the grouped standard deviation be larger or smaller than the raw-data value?
Class midpoint approximation (equal-width classes)
xˉ≈∑fimin\bar{x}\approx\frac{\sum f_im_i}{n}
xˉ≈1430.020=71.50\bar{x}\approx\frac{1430.0}{20}=71.50
s2≈∑fi(mi−xˉ)2n−1s^2\approx\frac{\sum f_i(m_i-\bar{x})^2}{n-1}
s2≈2455.0020−1≈129.21s^2\approx\frac{2455.00}{20-1}\approx129.21
s≈129.21≈11.37s\approx\sqrt{129.21}\approx11.37
Using the 20 raw scores

Mean 71.00

Sample variance 126.95

Sample standard deviation 11.27

Using midpoint approximations

Mean 71.50

Sample variance 129.21

Sample standard deviation 11.37

024685060708090100Score (points)
Spread of grouped data
Here sample variance uses denominator n−1. When only class frequencies are known, replacing observations by class midpoints is an approximation. Use the raw data whenever all of them are available.

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 measureProduction line AProduction line B
Mean daily output (units)100500
Daily-output standard deviation (units)2050
Coefficient of variation CV20.00%10.00%
First compare standard deviations: which line has greater absolute variability in daily output? Then compare CV: which line has less variability relative to its mean daily output?
Coefficient of variation (standard deviation divided by the mean)
CV=sxˉ×100%CV=\frac{s}{\bar{x}}\times100\%
CVA=20100×100%=20.00%CV_A=\frac{20}{100}\times100\%=20.00\%
CVB=50500×100%=10.00%CV_B=\frac{50}{500}\times100\%=10.00\%
Daily-output standard deviation (units): absolute variability
0.0020.0040.00A · Daily-output standard deviation (units): absolute variability: 20.00AB · Daily-output standard deviation (units): absolute variability: 50.00B
CV (%): relative variability
0.00%5.00%10.00%15.00%20.00%A · CV (%): relative variability: 20.00%AB · CV (%): relative variability: 10.00%B
Production-line output and coefficient of variation
Interpret the results in the production-management context:

① 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.

In this example, a smaller CV means less daily-output variability relative to that line's mean daily output, usually interpreted as greater relative stability. It does not guarantee higher output, better quality, or better overall production performance. CV generally suits ratio-scale data with a meaningful zero and a positive mean not close to 0. Do not apply this comparison mechanically when the mean is near 0, values may be positive or negative, or an interval scale such as Celsius temperature is used.

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 AramcoSmall campus store
Mean daily revenue100 × 100 million yuan2,000 yuan
Standard deviation of daily revenue10 × 100 million yuan400 yuan
Revenue on a given day115 × 100 million yuan2,800 yuan
Amount above each mean15 × 100 million yuan800 yuan
Z-score(115−100) / 10 = +1.50(2800−2000) / 400 = +2.00
Comparison: both had revenue above their respective means that day. Although the absolute increases cannot be compared directly, the small store was above its mean by 2 standard deviations, and Saudi Aramco by 1.5 standard deviations. Thus, the small store had a higher standardized position within its own revenue distribution that day. This does not mean its business scale or performance was better, nor can z-scores alone compare how unusual the two revenues were without further knowledge of the distribution shapes.

① Z-scores: compare relative positions

Z-score (known population mean and standard deviation)
Z=x−μσZ=\frac{x-\mu}{\sigma}
Z=85−7010=1.50Z=\frac{85-70}{10}=1.50
Z-score Z
1.50
Distance from mean in standard deviations
1.50 (in standard deviations)
Side of the mean
Right of the mean
Current interpretation: This student's score is above the mean; the distance in standard deviations is 1.50. This describes relative position, not a score percentile.
To describe an observation using the sample mean and sample standard deviation, we often write z=(x−x̄)/s. Z-scores themselves do not require normally distributed raw data.

② Empirical rule: areas under the normal curve

Range around the mean:
-4σ-3σ-2σ-1σμ+1σ+2σ+3σ+4σStandard deviationsApproximately 68.27%

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

Z-scores and the empirical rule
Approximate proportion under normality
Approximately 68.27%
Lower interval limit (points)
60
Upper interval limit (points)
80
Empirical rule: if scores follow a normal distribution with mean 70 and standard deviation 10, theoretically about 68.27% of scores fall between 60 and 80 points.
Think about it: two classes have different standard deviations. Do students scoring 85 points in each class have the same z-score? Why?
68%–95%–99.7% is an approximate empirical rule for the normal distribution. It does not apply to arbitrary distribution shapes; for general data, it cannot directly establish the proportions within these intervals.