Statistics · Lesson 2 of 6
Mean Deviation in Frequency Distributions
“Use frequencies, cumulative counts and class midpoints to measure average distance from a centre.”
• Interpret frequencies as repeated observations and use the total frequency N correctly. • Calculate weighted mean deviation about a mean or a discrete median. • Convert suitable inclusive classes to continuous boundaries and use class midpoints. • Estimate a grouped median and calculate mean deviation about it. • Use assumed-mean coding to simplify a mean calculation and explain the limitations of mean deviation.
A frequency table is a shorter way to write repeated data
A value recorded ten times should contribute ten times to a distance total. Frequency tables save us from writing every repeated observation separately. They do not change the underlying definition of mean deviation: we still average one distance for each original observation. Multiplying a value’s distance by its frequency accounts for all its repetitions at once.
A discrete frequency distribution lists observed values xᵢ and their frequencies fᵢ, where fᵢ is the number of times xᵢ occurs. The total number of observations is N = Σfᵢ, which may be much larger than the number of listed values.
If the table contains value 5 with frequency 8, those eight observations contribute 8 × 5 to the original-value total and 8 × |5 − a| to the absolute-deviation total about a. This is why frequencies must appear in both the centre calculation and the dispersion calculation. An unweighted average of the listed values would describe a different dataset.
Problem
Find mean deviation about the mean for values 2, 5, 6, 8, 10, 12 with frequencies 2, 8, 10, 7, 8, 5.
- 1.Total frequency is 2 + 8 + 10 + 7 + 8 + 5 = 40. Products fᵢxᵢ total 300, giving mean 300/40 = 7.5.
- 2.Distances from 7.5 are 5.5, 2.5, 1.5, 0.5, 2.5 and 4.5.
- 3.Multiply by frequencies to get contributions 11, 20, 15, 3.5, 20 and 22.5. Their sum is 92.
- 4.Therefore MD(x̄) = 92/40 = 2.3. Dividing by six would count table rows rather than observations.
| Value xᵢ | Frequency fᵢ | fᵢxᵢ | |xᵢ − centre| | fᵢ|xᵢ − centre| |
|---|---|---|---|---|
| 2 | 2 | 4 | 5.5 | 11 |
| 5 | 8 | 40 | 2.5 | 20 |
| 6 | 10 | 60 | 1.5 | 15 |
| 8 | 7 | 56 | 0.5 | 3.5 |
| 10 | 8 | 80 | 2.5 | 20 |
| 12 | 5 | 60 | 4.5 | 22.5 |
| Total | 40 | 300 | 92 |
Cumulative frequency locates a discrete median
A median is about ordered positions, not about averaging the listed values. Put the distinct values in ascending order and add a cumulative-frequency column. Each cumulative count tells us how many observations have been accounted for up to that value. It therefore identifies which value occupies any chosen position in the full dataset.
Cumulative frequency at a value or class is the total of its frequency and all preceding frequencies in ascending order. The final cumulative frequency is the total N.
For odd N, locate position (N + 1)/2. For even N, locate both positions N/2 and N/2 + 1, then average the corresponding values. Both positions often belong to the same frequency row, but not always. If a cumulative count equals N/2 exactly, the next position belongs to the following row; simply choosing the first row reaching N/2 can miss this case.
Problem
Find mean deviation about the median for values 3, 6, 9, 12, 13, 15, 21, 22 with frequencies 3, 4, 5, 2, 4, 5, 4, 3.
- 1.Total frequency is 30. Cumulative frequencies are 3, 7, 12, 14, 18, 23, 27 and 30.
- 2.For even N = 30, use the 15th and 16th observations. Positions 15 through 18 all have value 13, so M = (13 + 13)/2 = 13.
- 3.The weighted distances from 13 are 30, 28, 20, 2, 0, 10, 32 and 27. Their total is 149.
- 4.MD(M) = 149/30 ≈ 4.97. Keep the centre 13 exactly throughout the calculation.
| Value | Frequency | Cumulative frequency |
|---|---|---|
| 3 | 3 | 3 |
| 6 | 4 | 7 |
| 9 | 5 | 12 |
| 12 | 2 | 14 |
| 13 | 4 | 18 |
| 15 | 5 | 23 |
| 21 | 4 | 27 |
| 22 | 3 | 30 |
| Value xᵢ | Frequency fᵢ | fᵢxᵢ | |xᵢ − centre| | fᵢ|xᵢ − centre| |
|---|---|---|---|---|
| 3 | 3 | 9 | 10 | 30 |
| 6 | 4 | 24 | 7 | 28 |
| 9 | 5 | 45 | 4 | 20 |
| 12 | 2 | 24 | 1 | 2 |
| 13 | 4 | 52 | 0 | 0 |
| 15 | 5 | 75 | 2 | 10 |
| 21 | 4 | 84 | 8 | 32 |
| 22 | 3 | 66 | 9 | 27 |
| Total | 30 | 379 | 149 |
Problem
Values 2 and 8 each occur twice. Find the median and its mean deviation.
- 1.The ordered data are 2, 2, 8, 8, with N = 4. The cumulative frequencies are 2 and 4.
- 2.The second observation is 2 and the third is 8. Hence M = (2 + 8)/2 = 5, not 2.
- 3.Each observation is 3 units from 5, so the weighted distance total is 2 × 3 + 2 × 3 = 12.
- 4.MD(M) = 12/4 = 3. A median can lie between two listed values even in a frequency distribution.
Class intervals replace exact values by representatives
Sometimes a table records how many observations fall in intervals rather than their exact values. A continuous frequency distribution has adjacent class boundaries with no gaps. To calculate from such a table, represent each class by its midpoint. This is an approximation to the original data: we no longer know exactly where each observation lay within its class.
For a class with lower boundary l and upper boundary u, its midpoint is (l + u)/2 and its width is u − l. In grouped calculations, the midpoint stands in for the observations in that class.
For intervals 10–20, 20–30 and so on, use midpoints 15, 25 and so on. Adopt a consistent boundary convention, such as including a lower boundary and excluding the upper boundary, so a boundary observation is counted once. The frequency still tells us how many original observations are represented by each midpoint.
Problem
Find mean deviation about the mean for classes 10–20, 20–30, 30–40, 40–50, 50–60, 60–70, 70–80 with frequencies 2, 3, 8, 14, 8, 3, 2.
- 1.Replace the classes by midpoints 15, 25, 35, 45, 55, 65 and 75. Total frequency is 40.
- 2.The weighted midpoint total is 1800, so the grouped mean is 1800/40 = 45.
- 3.Distances from 45 are 30, 20, 10, 0, 10, 20 and 30. Frequency-weighted contributions are 60, 60, 80, 0, 80, 60 and 60.
- 4.Their total is 400, so MD(x̄) = 400/40 = 10. This is the mean deviation of the midpoint representation; exact raw observations could give a different value.
| Class | Frequency | Midpoint | fᵢxᵢ | |xᵢ − 45| | fᵢ|xᵢ − 45| |
|---|---|---|---|---|---|
| 10–20 | 2 | 15 | 30 | 30 | 60 |
| 20–30 | 3 | 25 | 75 | 20 | 60 |
| 30–40 | 8 | 35 | 280 | 10 | 80 |
| 40–50 | 14 | 45 | 630 | 0 | 0 |
| 50–60 | 8 | 55 | 440 | 10 | 80 |
| 60–70 | 3 | 65 | 195 | 20 | 60 |
| 70–80 | 2 | 75 | 150 | 30 | 60 |
| Total | 40 | 1800 | 400 |
Assumed means and step deviations simplify the mean
Large midpoint values can make multiplication tedious. An assumed mean A is a convenient reference value near the centre. Subtracting A shifts the origin; dividing by a positive common scale h reduces the numbers further. We then calculate a mean in the coded values and transform it back to the original unit.
Define dᵢ = (xᵢ − A)/h, so xᵢ = A + hdᵢ. Multiplying by fᵢ and summing gives Σfᵢxᵢ = AΣfᵢ + hΣfᵢdᵢ = AN + hΣfᵢdᵢ. Dividing by N gives the step-deviation mean formula. A is an assumed reference, not automatically the true mean.
Problem
Recalculate the mean for the previous continuous distribution using A = 45 and h = 10.
- 1.The coded midpoint values are −3, −2, −1, 0, 1, 2 and 3.
- 2.Frequency-weighted coded values are −6, −6, −8, 0, 8, 6 and 6, with total zero.
- 3.Thus x̄ = 45 + 10 × 0/40 = 45, agreeing with the direct calculation.
- 4.Return to |xᵢ − 45| for mean deviation. The same weighted distance total 400 gives MD = 10. The shortcut here simplifies finding the mean; the required distances remain in the original units.
| Midpoint xᵢ | Frequency fᵢ | dᵢ = (xᵢ − 45)/10 | fᵢdᵢ |
|---|---|---|---|
| 15 | 2 | -3 | -6 |
| 25 | 3 | -2 | -6 |
| 35 | 8 | -1 | -8 |
| 45 | 14 | 0 | 0 |
| 55 | 8 | 1 | 8 |
| 65 | 3 | 2 | 6 |
| 75 | 2 | 3 | 6 |
| Total | 40 | 0 |
Estimating a median within a class
For continuous grouped data we know which class contains the middle, but not the exact observation there. The grouped median formula estimates a position within that class by assuming observations are distributed evenly through its width. Cumulative frequencies identify the class first; interpolation then estimates the median itself.
Let the median class have lower boundary l, width h and frequency f. Let C be the cumulative frequency before it, and let total frequency be N. Of the N/2 observations needed to reach the middle, C have already occurred before the class. The remaining fraction (N/2 − C)/f of the class is converted to a distance by multiplying by h and adding l.
If N/2 is exactly a cumulative boundary, interpolation in either of the two adjacent continuous classes gives that shared boundary when the classes meet properly. Otherwise select the first class whose cumulative frequency exceeds N/2. Once M is estimated, use distances of class midpoints from M and weight them by frequency.
Problem
For classes 0–10, 10–20, 20–30, 30–40, 40–50, 50–60 with frequencies 6, 7, 15, 16, 4, 2, find mean deviation about the median.
- 1.Total frequency is 50, so N/2 = 25. Cumulative frequencies 6, 13, 28, 44, 48 and 50 locate the median class as 20–30.
- 2.Use l = 20, C = 13, f = 15 and h = 10: M = 20 + (25 − 13) × 10/15 = 28.
- 3.Midpoints are 5, 15, 25, 35, 45 and 55. Their distances from 28 are 23, 13, 3, 7, 17 and 27.
- 4.Weighted distances total 138 + 91 + 45 + 112 + 68 + 54 = 508. Hence MD(M) = 508/50 = 10.16.
| Class | Frequency | Cumulative frequency | Midpoint | |xᵢ − 28| | fᵢ|xᵢ − 28| |
|---|---|---|---|---|---|
| 0–10 | 6 | 6 | 5 | 23 | 138 |
| 10–20 | 7 | 13 | 15 | 13 | 91 |
| 20–30 | 15 | 28 | 25 | 3 | 45 |
| 30–40 | 16 | 44 | 35 | 7 | 112 |
| 40–50 | 4 | 48 | 45 | 17 | 68 |
| 50–60 | 2 | 50 | 55 | 27 | 54 |
| Total | 50 | 508 |
Make inclusive classes continuous when appropriate
An age table may use 16–20, 21–25 and so on for ages recorded to the nearest whole year. These written limits have apparent gaps, but the real dividing boundary between 20 and 21 is 20.5. For equally spaced whole-unit recording, subtract 0.5 from each lower limit and add 0.5 to each upper limit. The midpoints stay the same while the classes become adjacent.
Problem
Ages 16–20, 21–25, 26–30, 31–35, 36–40, 41–45, 46–50, 51–55 have frequencies 5, 6, 12, 14, 26, 12, 16, 9. Find mean deviation about the median.
- 1.Use continuous boundaries 15.5–20.5, 20.5–25.5 and so on. The class width is 5, not upper limit minus lower limit 4.
- 2.Cumulative frequencies are 5, 11, 23, 37, 63, 75, 91 and 100. Since N/2 = 50, the median class is 35.5–40.5.
- 3.M = 35.5 + (50 − 37) × 5/26 = 38 years.
- 4.Midpoints are 18, 23, 28, 33, 38, 43, 48 and 53. Weighted distances from 38 total 735.
- 5.Therefore MD(M) = 735/100 = 7.35 years. Correct boundaries matter for the median even though they leave the class midpoints unchanged.
The half-unit adjustment fits adjacent inclusive integer classes for quantities recorded in whole units. Already continuous intervals such as 10–20 and 20–30 do not need it. Use the measurement precision and the actual gap between successive class limits.
What mean deviation can and cannot tell us
Mean deviation is an understandable average distance, but it remains only one number. It cannot reconstruct a distribution’s shape, identify which particular values were extreme, or guarantee that a chosen centre represents every subgroup. For grouped data its accuracy also depends on the midpoint and median-interpolation assumptions.
The median minimises the sum of absolute deviations; the mean generally does not. This explains why mean deviation about the median is no larger than mean deviation about the mean for the same raw data. It does not make either calculation meaningless. They describe distances from different centres and should be interpreted with those centres stated.
Absolute values can be handled mathematically, but their case-dependent signs make some algebraic manipulations less straightforward than those involving squares. Variance and standard deviation use squared deviations and lead to useful identities for shifting, scaling and correcting data. They complement the distance interpretation developed here.
Check your understanding
Track whether a table contains exact values or class intervals. For median questions, distinguish the discrete middle-position rule from continuous interpolation; for every average use the total frequency N.
Quiz
A table has five distinct values and total frequency 40. What is the denominator for mean deviation?
Values 2 and 8 each have frequency 2. What is their median?
For class 20–30, which value represents it in a midpoint calculation?
For l = 20, N = 50, C = 13, f = 15 and h = 10, what is the grouped median?
When A = 45, h = 10 and Σfᵢdᵢ = 0, what is the mean?
What are the continuous boundaries for inclusive class 21–25 in whole-unit recording?
Why do grouped calculations use midpoints?
Practice Problems
- For values 5, 10, 15, 20, 25 with frequencies 7, 4, 6, 3, 5, calculate mean deviation about the mean using a weighted-distance table.
- Find mean deviation about the median for values 5, 7, 9, 10, 12, 15 with frequencies 8, 6, 2, 2, 2, 6. Locate both central positions.
- Income-per-day classes 0–100 through 700–800 have frequencies 4, 8, 9, 10, 7, 5, 4, 3. Calculate mean deviation about the mean.
- Height classes 95–105, 105–115, 115–125, 125–135, 135–145, 145–155 have frequencies 9, 13, 26, 30, 12, 10. Compare direct and step-deviation mean calculations before finding MD.
- For classes 0–10 through 50–60 with frequencies 6, 8, 14, 16, 4, 2, estimate the median and calculate mean deviation about it.
- Explain why a discrete median may require two different frequency rows, while a continuous grouped median is estimated within a class.
- State the assumptions behind midpoint representation and median interpolation, and describe information lost through grouping.
Key Takeaways
• Frequencies represent repeated observations; weighted sums must be divided by N = Σfᵢ. • For a discrete median, locate the actual middle position or both middle positions through cumulative counts. • Class midpoints represent grouped observations approximately, not exactly. • Grouped median interpolation uses the lower boundary, preceding cumulative frequency, class frequency and width. • Assumed-mean coding simplifies the mean calculation; restore original units before interpreting distances. • Mean deviation needs a stated centre and does not replace a view of the full distribution.