Central tendency and measures of position
From average levels and ordered positions to boxplots: the same data set can have different representative values.
Why can three representative values differ?
Consider a set of student scores. Adjust the rightmost student's score and see whether the mean, median, and mode all change.
Scores of 10 students: 60, 65, 70, 70, 75, 80, 85, 90, 90, 95
- Arithmetic mean
- 78.0
- Median
- 77.5
- Mode
- 70, 90
Step 1: sort the n observations in ascending order as x₍₁₎ ≤ ⋯ ≤ x₍ₙ₎. Step 2: check whether the sample size n is odd or even.
Here n=10 (even); the 5th and 6th sorted values are 75 and 80.
If n=9 (odd), take the 5th sorted value directly.
Arithmetic mean: unweighted and weighted means
Unweighted arithmetic mean: every observation has equal weight.
Weighted arithmetic mean: different data values have different frequencies.
| Score or class midpoint xᵢ | Frequency fᵢ | fᵢxᵢ |
|---|---|---|
| 60 | 6 | 360 |
| 75 | 10 | 750 |
| 90 | 4 | 360 |
| Total | 20 | 1470 |
73.50
The unweighted mean of the three groups is 75; with unequal frequencies, the weighted mean generally differs from 75.
Geometric mean: why can't we simply average growth rates arithmetically?
Suppose a measure rises and falls over two successive periods. Change the growth rates and observe the total change after two periods and the compound average growth rate.
- Arithmetic mean growth rate
- 15.00%
- Geometric mean growth rate
- 9.54%
- Final level (initial 100)
- 120.00
Mode and median: from raw data to data grouped into class intervals
The following frequency table groups scores into classes of width 10 points. Drag each class frequency and observe how the modal and median classes change.
| Class interval [lower limit, upper limit) | Frequency f | Less-than cumulative frequency |
|---|---|---|
| 50—60 | 4 | 4 |
| 60—70 | 8 | 12 |
| 70—80 | 14 | 26 |
| 80—90 | 10 | 36 |
| 90—100 | 4 | 40 |
| Total | 40 | — |
① Grouped-data median estimate Me: find the median class, then estimate its position within the class
Examine the cumulative frequencies: the class spanning 70–80 points is the first to reach or exceed N/2=20.0. The cumulative count before it is 12; a further within-class count of 8.0 is needed to reach the median position.
Lower limit of median class + (median's relative position within the class) × class width
General formula:
Numerical substitution:
75.71
② Grouped-data mode estimate Mo: find the highest-frequency class, then estimate using neighboring frequencies
The highest-frequency class is 70–80 points (student count: 14); the preceding class has a count of 8, and the following class a count of 10.
Lower limit of modal class + (preceding frequency difference ÷ sum of both frequency differences) × class width
General formula:
Δ₁=14−8=6; Δ₂=14−10=4; L=70; h=10.
Numerical substitution:
76.00
Quantiles and percentiles: sort first, then locate positions
Quartiles divide sorted data into four parts; the median is the 50th percentile. Here, 12 scores illustrate how positions are determined.
12 sorted scores: 52, 58, 62, 66, 70, 73, 76, 79, 82, 85, 89, 98
- Q1 (25th percentile)
- 64.0
- Q2 (median)
- 74.5
- Q3 (75th percentile)
- 83.5
Boxplot: how does a separate data set change the box and outliers?
This page uses a separate set of 12 scores, independent of the preceding quantile example. First adjust the spread of the middle 11 scores, then adjust the 12th, potentially extreme value.
Current 12 values (sorted): 52.0, 58.0, 62.0, 66.0, 70.0, 73.0, 76.0, 79.0, 82.0, 85.0, 89.0, 98.0
- Median Q2
- 74.5
- Interquartile range IQR = Q3 − Q1
- 19.5
- Number of outliers
- 0
Five-number summary: minimum 52.0, Q1 64.0, median 74.5, Q3 83.5, maximum 98.0.
Outlier fences: lower Q1−1.5×IQR=34.75; upper Q3+1.5×IQR=112.75.
Whisker endpoints: 52.0 and 98.0; no outliers.
References and calculation conventions
NIST/SEMATECH e-Handbook: Box Plot
See the “Box plots with fences” section for the interquartile range, 1.5×IQR fences, and why whisker endpoints correspond to actual observations rather than necessarily coinciding with the fences.
This lesson's quantiles and boxplots use the median-of-halves method to calculate quartiles; software does not use one universal percentile algorithm. Other interpolation rules may produce different Q1, Q3, IQR, and outlier classifications. Check the quartile and boxplot conventions before comparing outputs.