13.2 Mean Deviation for Grouped Data
Real data arrive as frequency tables. Weight each distance by its frequency โ $\text{M.D.}(a)=\tfrac1N\sum f_i|x_i-a|$ โ use class marks for class intervals, and find the median from the cumulative frequencies.
A survey of $40$ school football matches does not list forty separate scores; it says "$5$ matches had no goals, $10$ had one goal, $12$ had two โฆ". A hospital reporting the ages of $600$ patients does not print $600$ ages; it gives the number of patients aged $0$โ$10$, $10$โ$20$ and so on. Most real data come grouped like this, in a frequency table, and that is how Board papers present them too.
In Section 13.1 we found mean deviations of plain lists. Here we do the same for frequency tables. The idea is simple: a value that occurs $f_i$ times contributes its distance $f_i$ times. For values given only as class intervals we do not know the individual observations, so โ as in Class 10 โ we let the class mark stand for every observation in its class. The main new skill is organising the work in a table so that the arithmetic stays short and checkable.
Discrete Frequency Distributions
In a discrete frequency distribution the observations take separate values $x_1,x_2,\dots,x_n$, occurring $f_1,f_2,\dots,f_n$ times. The total number of observations is $N=\sum f_i$, and the mean is $\bar x=\dfrac{1}{N}\sum f_ix_i$ (Class 10). Listing the data in full would repeat $x_1$ exactly $f_1$ times, $x_2$ exactly $f_2$ times, and so on; adding the distances of that long list gives $\sum f_i|x_i-a|$.
For values (or class marks) $x_1,\dots,x_n$ with frequencies $f_1,\dots,f_n$ and $N=\sum_{i=1}^{n}f_i$, the mean deviation about $a$ is $$\text{M.D.}(a)=\frac{1}{N}\sum_{i=1}^{n}f_i\,|x_i-a|.$$ In particular $\text{M.D.}(\bar x)=\dfrac1N\sum f_i|x_i-\bar x|$ and $\text{M.D.}(M)=\dfrac1N\sum f_i|x_i-M|$. For a continuous (class-interval) distribution, $x_i$ is the class mark (mid-point) of the $i$th class, and the result is an estimate.
To find the median of a discrete distribution, put the values in increasing order and add up the frequencies as you go โ the cumulative frequencies (c.f.). The c.f. of a value is the number of observations less than or equal to it, so it tells you which value occupies any given position in the ordered list.
- Make a table with columns $x_i$, $f_i$ and then, as needed, $f_ix_i$, c.f., $|x_i-a|$ and $f_i|x_i-a|$.
- About the mean: $\bar x=\dfrac{\sum f_ix_i}{N}$.
- About the median: if $N$ is odd, $M$ is the $\tfrac{N+1}{2}$th observation; if $N$ is even, $M$ is the mean of the $\tfrac N2$th and $\left(\tfrac N2+1\right)$th observations. The $k$th observation is the first value whose c.f. is at least $k$.
- Compute $f_i|x_i-a|$ in each row, add, and divide by $N$ (not by the number of rows).
| Goals $x_i$ | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| Matches $f_i$ | 5 | 10 | 12 | 8 | 3 | 2 |
| $x_i$ | $f_i$ | $|x_i-2|$ | $f_i|x_i-2|$ |
|---|---|---|---|
| 0 | 5 | 2 | 10 |
| 1 | 10 | 1 | 10 |
| 2 | 12 | 0 | 0 |
| 3 | 8 | 1 | 8 |
| 4 | 3 | 2 | 6 |
| 5 | 2 | 3 | 6 |
| Total | 40 | 40 |
| Size $x_i$ | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|
| Students $f_i$ | 4 | 6 | 10 | 13 | 9 | 5 | 3 |
Continuous Frequency Distributions
In a continuous frequency distribution the data are grouped into class intervals such as $10$โ$20$, $20$โ$30$, โฆ with no gaps between them (by convention $20$ belongs to the class $20$โ$30$, not $10$โ$20$). We no longer know the individual observations, so we assume that every observation in a class sits at its class mark, $$x_i=\frac{\text{lower limit}+\text{upper limit}}{2},$$ and then apply Definition 13.3 exactly as for discrete data. With many classes and large numbers the products $f_ix_i$ become unpleasant; the step-deviation method from Class 10 keeps them small.
Let the class marks $x_i$ be equally spaced with common class width $h$, let $A$ be any one of them (the assumed mean), and put $u_i=\dfrac{x_i-A}{h}$. Then $$\bar x=A+h\cdot\frac{\sum f_iu_i}{N}.$$
Proof. From the definition of $u_i$, $x_i=A+hu_i$. Multiply by $f_i$ and add: $\sum f_ix_i=A\sum f_i+h\sum f_iu_i=AN+h\sum f_iu_i$. Divide by $N$. $\blacksquare$
Choose $A$ to be a class mark near the middle of the table: then the $u_i$ are small integers such as $-3,-2,\dots,3$ and all the arithmetic can be done in your head. The formula is exact; it is only a shortcut for $\tfrac{\sum f_ix_i}{N}$.
| Marks | 0โ10 | 10โ20 | 20โ30 | 30โ40 | 40โ50 | 50โ60 | 60โ70 |
|---|---|---|---|---|---|---|---|
| Students | 3 | 6 | 11 | 14 | 8 | 5 | 3 |
| Class | $f_i$ | $x_i$ | $u_i$ | $f_iu_i$ | $|x_i-34|$ | $f_i|x_i-34|$ |
|---|---|---|---|---|---|---|
| 0โ10 | 3 | 5 | โ3 | โ9 | 29 | 87 |
| 10โ20 | 6 | 15 | โ2 | โ12 | 19 | 114 |
| 20โ30 | 11 | 25 | โ1 | โ11 | 9 | 99 |
| 30โ40 | 14 | 35 | 0 | 0 | 1 | 14 |
| 40โ50 | 8 | 45 | 1 | 8 | 11 | 88 |
| 50โ60 | 5 | 55 | 2 | 10 | 21 | 105 |
| 60โ70 | 3 | 65 | 3 | 9 | 31 | 93 |
| Total | 50 | โ5 | 600 |
Mean Deviation about the Median for Grouped Data
For class-interval data the median is found with the Class 10 formula. It locates the median class from the cumulative frequencies, then assumes that the observations in that class are spread evenly across it and moves the right fraction of the way through.
Let $N=\sum f_i$. The median class is the first class whose cumulative frequency is at least $\tfrac N2$. If its lower limit is $l$, its frequency $f$, its width $h$, and the cumulative frequency of the class before it is $\text{c.f.}$, then (assuming the observations are spread evenly across the median class) $$M=l+\frac{\frac N2-\text{c.f.}}{f}\times h.$$
Why. $\text{c.f.}$ observations lie below $l$; we need $\tfrac N2-\text{c.f.}$ more of the median class's $f$ observations, that is the fraction $\tfrac{N/2-\text{c.f.}}{f}$ of the way across a class of width $h$.
| Age | 20โ30 | 30โ40 | 40โ50 | 50โ60 | 60โ70 | 70โ80 |
|---|---|---|---|---|---|---|
| People | 4 | 8 | 14 | 20 | 8 | 6 |
| Class | 0โ10 | 10โ20 | 20โ30 | 30โ40 | 40โ50 |
|---|---|---|---|---|---|
| Frequency | 5 | $p$ | 12 | 8 | 5 |
1. Dividing by the number of classes. Divide $\sum f_i|x_i-a|$ by $N=\sum f_i$, the number of observations.
2. Forgetting the frequencies. $\sum|x_i-\bar x|$ (without the $f_i$) treats every value as if it occurred once.
3. Using the class limit instead of the class mark. The distance of the class $30$โ$40$ from $\bar x$ is $|35-\bar x|$.
4. Taking c.f. of the median class itself. In $M=l+\dfrac{N/2-\text{c.f.}}{f}h$, c.f. belongs to the class before the median class, and $f$ to the median class.
5. Gapped classes. For $10$โ$19$, $20$โ$29$, โฆ convert to $9.5$โ$19.5$, โฆ before using $l$ in the median formula.
6. Discrete median between two values. When $N$ is even and the $\tfrac N2$th and $\left(\tfrac N2+1\right)$th observations are different values, the median is their mean (Exam corner E2).
Exercises
- 1 Mean deviation about the mean:
$x_i$ 1 2 3 4 5 6 $f_i$ 6 9 12 7 4 2 - 2 Mean deviation about the mean:
$x_i$ 10 20 30 40 50 $f_i$ 4 10 15 6 5 - 3 Mean deviation about the median:
$x_i$ 3 6 9 12 15 18 $f_i$ 3 8 12 9 5 3 - 4 Mean deviation about the median of the shirt collar sizes (cm) sold by a shop in a day:
Size 36 38 40 42 44 46 Shirts 4 9 15 11 7 2 - 5 Mean deviation about the median of the numbers of spelling mistakes in $35$ essays:
Mistakes 0 1 2 3 4 Essays 9 12 7 4 3 - 6 The distribution $x_i: 2, 4, 6, 8, 10$ with $f_i: 5, p, 10, 6, 4$ has mean $6$. Find $p$ and the mean deviation about the mean.
- 7 Every frequency in a discrete distribution is doubled (the values stay the same). What happens to the mean, the median and the mean deviation about the mean? Explain.
- 1
Class 0โ10 10โ20 20โ30 30โ40 40โ50 $f_i$ 6 8 16 15 5 - 2 Daily wages of $50$ workers:
Wage (โน) 100โ200 200โ300 300โ400 400โ500 500โ600 Workers 8 12 20 6 4 - 3 Times of $40$ students for a $100\ \text{m}$ run:
Time (s) 12โ14 14โ16 16โ18 18โ20 20โ22 Students 4 10 14 8 4 - 4 Ages of $100$ residents of a housing society:
Age 0โ20 20โ40 40โ60 60โ80 Residents 15 25 35 25 - 5 The distribution below has mean $8$. Find $k$ and the mean deviation about the mean.
Class 0โ4 4โ8 8โ12 12โ16 $f_i$ 3 $k$ 7 4 - 6
Class 0โ8 8โ16 16โ24 24โ32 32โ40 $f_i$ 5 9 13 8 5
- 1
Class 0โ10 10โ20 20โ30 30โ40 40โ50 50โ60 $f_i$ 4 8 10 20 5 3 - 2 Weekly hours of self-study of $50$ students:
Hours 0โ5 5โ10 10โ15 15โ20 20โ25 Students 6 9 20 10 5 - 3 Marks (inclusive classes):
Marks 1โ10 11โ20 21โ30 31โ40 41โ50 Students 5 7 16 8 4 - 4 Ages of $80$ members of a public library:
Age 10โ20 20โ30 30โ40 40โ50 50โ60 60โ70 Members 6 12 20 25 12 5 - 5 For the self-study data of part 2, find the mean and the mean deviation about the mean, and compare with your answer to part 2.
- 6 For the classes $0$โ$10$, โฆ, $40$โ$50$ with frequencies $5, 10, 10, 15, 10$, the cumulative frequency reaches $\tfrac N2$ exactly at the end of a class. Find the median using the class $20$โ$30$, and again using the class $30$โ$40$. Then find the mean deviation about the median.
- 1 A pizza outlet recorded the delivery times of $40$ orders: $10$โ$20$ min: $6$; $20$โ$30$ min: $18$; $30$โ$40$ min: $12$; $40$โ$50$ min: $4$. Find the mean delivery time and the mean deviation about it.
- 2 A bowler's wickets in $30$ matches: $0$ wickets in $5$ matches, $1$ in $7$, $2$ in $9$, $3$ in $5$, $4$ in $3$ and $5$ in $1$. Find the mean deviation about the mean and about the median. Which is smaller?
- 3 The lifetimes of $50$ LED bulbs in a test were: $600$โ$700$ h: $5$; $700$โ$800$ h: $10$; $800$โ$900$ h: $18$; $900$โ$1000$ h: $12$; $1000$โ$1100$ h: $5$. Find the mean lifetime and the mean deviation about the mean.
- 4 Explain why a mean deviation computed from a class-interval table with class marks is only an estimate. When would it be exact?
- 5 The marks of $30$ students were: $0$โ$10$: $2$; $10$โ$20$: $5$; $20$โ$30$: $10$; $30$โ$40$: $8$; $40$โ$50$: $5$. Find the median and the mean deviation about the median.
- 6 In a survey, $40$ students reported their numbers of siblings: $0$ siblings: $8$; $1$: $16$; $2$: $10$; $3$: $4$; $4$: $2$. Find both mean deviations (about the mean and about the median).
- 7 A government report on household incomes gives a median income and the mean deviation about the median, rather than the mean and the mean deviation about the mean. Give two reasons why this is sensible.
How this is examined: Board papers set a frequency table (discrete, or with class intervals) and ask for the mean deviation about the mean or the median, set out in columns; 1-mark items test whether you divide by $N$ and weight by $f_i$. Case studies often use inclusive classes. JEE Main uses distributions with a pattern (binomial-looking frequencies, "value $k$ occurs $k$ times") so the sums can be done quickly.
E1. Board ยท 1 mark For the distribution $x_i: 1, 2, 3$ with $f_i: 2, 6, 2$, the mean deviation about the mean is (A) $0.4$ (B) $0.67$ (C) $4$ (D) $2$
E2. Board ยท 3 marks Find the mean deviation about the median of the distribution below.
| $x_i$ | 5 | 10 | 15 | 20 | 25 | 30 |
|---|---|---|---|---|---|---|
| $f_i$ | 4 | 7 | 9 | 11 | 6 | 3 |
E3. Board ยท 5 marks Find the mean deviation about the mean for the ages of $60$ people given below.
| Age | 0โ10 | 10โ20 | 20โ30 | 30โ40 | 40โ50 | 50โ60 | 60โ70 |
|---|---|---|---|---|---|---|---|
| People | 4 | 7 | 12 | 16 | 11 | 6 | 4 |
E4. Board ยท Case study A metro company surveyed $50$ commuters about their journey times (in minutes): $1$โ$10$: $6$; $11$โ$20$: $14$; $21$โ$30$: $20$; $31$โ$40$: $6$; $41$โ$50$: $4$. (i) Rewrite the classes so that they are continuous. (1 mark) (ii) Find the median journey time. (1 mark) (iii) Find the mean deviation about the median. (2 marks)
E5. JEE Main The values $2, 4, 6, 8, 10$ occur with frequencies $1, 4, 6, 4, 1$. The mean deviation about the mean is (A) $1.5$ (B) $2.4$ (C) $1.2$ (D) $3$
E6. JEE Main Numerical answer. In a data set the value $k$ occurs exactly $k$ times, for $k=1,2,3,4$. If $m$ is the mean deviation about the mean, find $10m$.
Research question. How spread out are the journey times of students in your school โ and how much information is lost when the data are put into a frequency table?
Why it matters. City transport planners in Delhi, London or Singapore decide bus routes and school timings from surveys of journey times, and they almost always publish them as grouped tables. Knowing how much a grouped mean deviation can differ from the true one tells you how far to trust such reports.
What to do.
- Ask at least $40$ students (several classes) for their usual journey time to school in minutes. Keep the raw list.
- Compute the mean, the median, $\text{M.D.}(\bar x)$ and $\text{M.D.}(M)$ from the raw list (a spreadsheet's
AVERAGE,MEDIANandABSfunctions help). - Group the data in classes of width $5$ min, then of width $10$ min and $15$ min. For each table compute the same four statistics using class marks and Theorem 13.4.
- Tabulate the errors (grouped minus raw). Which statistic is most affected by grouping? Does the error grow steadily with the class width?
Tools: A class survey sheet, a spreadsheet or calculator
Hand in: The raw data, the three frequency tables, a table of all the statistics and their errors, a histogram for width $5$, and a paragraph recommending a class width for reporting such data.
Going further. Repeat step 3 with the same width but the classes shifted (e.g. $2.5$โ$7.5$, $7.5$โ$12.5$, โฆ instead of $0$โ$5$, $5$โ$10$, โฆ). Does the choice of class boundaries matter as much as the width?
๐งช Self-check quiz
Q1. In $\text{M.D.}(\bar x)=\dfrac1N\sum f_i|x_i-\bar x|$ for a frequency table, $N$ is
Q2. For $x_i: 2, 4, 6$ with $f_i: 1, 2, 1$, the mean deviation about the mean is
Q3. Before using the median formula, the inclusive class $11$โ$20$ (in a table with classes $1$โ$10$, $11$โ$20$, โฆ) should be written as
Q4. For a distribution with $N=40$, the median class is $30$โ$40$, the cumulative frequency before it is $14$ and its frequency is $12$. The median is
Q5. In the step-deviation method, $A=35$, $h=10$, $N=50$ and $\sum f_iu_i=-5$. The mean is