13.3 Median of Grouped Data
The median is the middle value: half the observations lie below it and half above. For grouped data, build a running total of the frequencies, find the class where the halfway point falls, and then place the median inside that class with a formula. A short relation then ties the mean, median and mode together.
Suppose five friends earn โน 20,000, โน 22,000, โน 25,000, โน 27,000 and โน 5,00,000 a month. The mean income is โน 1,18,800, a number that describes nobody in the group, because one very large value drags the mean upward. The median income, โน 25,000, is the middle one when the incomes are arranged in order, and it describes a typical person much better. This is why reports on income, house prices and marks often quote the median.
For a list the median is easy. For grouped data we cannot see the individual values, but we can still find the class that contains the middle observation, using a cumulative frequency column, and then estimate the median inside the class. At the end of the section you will meet a surprising relation among the three averages, mean, median and mode, which gives a quick check on your calculations.
The median of a list, and cumulative frequency
For example, the commuter data of Section 13.2 have frequencies $4,12,20,14,6$ in the classes $0$โ$10,\dots,40$โ$50$. The cumulative frequencies are $4,\ 16,\ 36,\ 50,\ 56$. Here $n=56$ and $\dfrac n2=28$. The first class with cumulative frequency at least $28$ is $20$โ$30$ (its cumulative frequency is $36$), so $20$โ$30$ is the median class.
The median formula
Once we know the median class, we need to find how far into it the median lies. The class $20$โ$30$ above contains $20$ observations, and $16$ observations lie before it. We need $28-16=12$ more to reach the middle. If the $20$ observations of the class are spread evenly across its width $10$, then $12$ of them take up $\dfrac{12}{20}$ of the width, and the median is $20+\dfrac{12}{20}\times10=26$. This is the idea of the formula.
Why it works. There are $cf$ observations below $l$. To reach the middle observation we must go through $\frac n2-cf$ more observations inside the median class. The class holds $f$ observations in a width $h$; if they are evenly spread, each takes $\dfrac hf$ of the width, so the distance we move from $l$ is $\left(\frac n2-cf\right)\dfrac hf$. $\blacksquare$
- Make the classes continuous if there are gaps (add and subtract $0.5$ as in Section 13.2).
- Add a cumulative frequency column and find $n$, the last entry. Compute $\dfrac n2$.
- Pick the median class: the first class whose cumulative frequency reaches $\dfrac n2$ or more. Read $l$, $h$, $f$.
- Take $cf$ from the row above the median class (the class before it). For the first class, $cf=0$.
- Substitute and check that the answer lies between $l$ and $l+h$.
1. Using the wrong $cf$. $cf$ belongs to the class before the median class, not to the median class itself. If you use the median class's own cumulative frequency, $\frac n2-cf$ becomes negative and the answer falls outside the class.
2. Using $f$ from the wrong row. $f$ is the ordinary frequency of the median class, not a cumulative one.
3. Forgetting to halve $n$, or searching for the class whose frequency (not cumulative frequency) reaches $\frac n2$.
4. Forgetting that the classes must be continuous and that the data must be in increasing order.
Mean, median and mode together
You now have three "averages" for the same data. For a symmetric histogram they coincide. If the histogram has a long tail to the right (a few very large values), the mean is dragged to the right, the mode stays at the peak, and the median lies in between. For distributions that are only moderately skewed, the three are tied by a relation found by observation.
This is an empirical (observed) relation, not an exact theorem: it comes from experience with many data sets, and it can be off by a few per cent. Its use is as a check, or to estimate the third average when two are known: $$\text{Mode}=3\,\text{Median}-2\,\text{Mean}.$$
Exercises
- 1 Find the median of $7,3,9,5,11$.
- 2 Find the median of $12,15,11,18,20,14$.
- 3 Frequencies $3,5,8,4$ in four consecutive classes: write the cumulative frequencies.
- 4 For $n=60$ the cumulative frequencies of the classes $0$โ$10,10$โ$20,20$โ$30,30$โ$40$ are $8,22,41,60$. Find the median class.
- 5 A median class is $20$โ$30$ with $\frac n2=25$, $cf=16$, $f=12$. Find the median.
- 6 A mean is $54$ and the mode is $60$ for a moderately skewed distribution. Estimate the median.
- 1 $0$โ$10$: $3$; $10$โ$20$: $7$; $20$โ$30$: $12$; $30$โ$40$: $5$; $40$โ$50$: $3$.
- 2 $10$โ$20$: $4$; $20$โ$30$: $6$; $30$โ$40$: $10$; $40$โ$50$: $8$; $50$โ$60$: $2$.
- 3 Heights (cm): $140$โ$150$: $5$; $150$โ$160$: $12$; $160$โ$170$: $10$; $170$โ$180$: $3$.
- 4 Pocket money (โน): $0$โ$50$: $8$; $50$โ$100$: $14$; $100$โ$150$: $20$; $150$โ$200$: $12$; $200$โ$250$: $6$.
- 5 Pages read: $1$โ$10$: $6$; $11$โ$20$: $9$; $21$โ$30$: $10$; $31$โ$40$: $5$.
- 6 Rainfall (mm): $0$โ$4$: $18$; $4$โ$8$: $10$; $8$โ$12$: $7$; $12$โ$16$: $5$.
- 1 The median of $50$ observations is $36$: $10$โ$20$: $5$; $20$โ$30$: $8$; $30$โ$40$: $x$; $40$โ$50$: $12$; $50$โ$60$: $y$. Find $x$ and $y$.
- 2 Ages of $80$ patients: $5$โ$15$: $6$; $15$โ$25$: $11$; $25$โ$35$: $21$; $35$โ$45$: $23$; $45$โ$55$: $14$; $55$โ$65$: $5$. Find the median age (to $2$ d.p.).
- 3 Speeds of $55$ vehicles (km/h): $40$โ$50$: $6$; $50$โ$60$: $14$; $60$โ$70$: $23$; $70$โ$80$: $9$; $80$โ$90$: $3$. Find the median speed.
- 4 Daily wages (โน): $400$โ$500$: $6$; $500$โ$600$: $10$; $600$โ$700$: $14$; $700$โ$800$: $12$; $800$โ$900$: $8$. Find the median wage. Using the mean โน 662 (Section 13.1) and the mode โน 666.67 (Section 13.2), check the relation $3\,\text{Median}=\text{Mode}+2\,\text{Mean}$.
- 5 For a moderately skewed distribution the median is $27$ and the mean is $28$. Estimate the mode.
- 1 Show that if $\frac n2$ equals the cumulative frequency of some class exactly, the median is the upper limit of that class.
- 2 Five friends earn โน 20,000, โน 22,000, โน 25,000, โน 27,000 and โน 5,00,000. Find the mean and the median, and say which better describes a typical friend.
- 3 Explain why the median formula gives a value between $l$ and $l+h$ whenever $cf\lt\frac n2\le cf+f$.
How this is examined: the median of a table is a standard 3- or 5-mark board question (cumulative frequency column, $\frac n2$, median class, formula, answer), often combined with a missing frequency, a case study or the mode. The relation $3\,\text{Median}=\text{Mode}+2\,\text{Mean}$ appears in 1โ2 mark items and in JEE Main as a data-interpretation shortcut.
E1. Board ยท 1 mark In the formula $\text{Median}=l+\left(\dfrac{\frac n2-cf}{f}\right)h$, the symbol $cf$ stands for (A) the cumulative frequency of the median class (B) the cumulative frequency of the class preceding the median class (C) the frequency of the class preceding the median class (D) half of the total frequency
E2. Board ยท 1 mark Assertion (A): For a distribution with $n=60$, the median class is the first class whose cumulative frequency is at least $30$. Reason (R): The median is the value below which half of the observations lie.
(A) Both A and R are true and R is the correct explanation of A. (B) Both A and R are true but R is not the correct explanation of A. (C) A is true but R is false. (D) A is false but R is true.
E3. Board ยท 3 marks The daily wages (โน) of $40$ workers are: $150$โ$200$: $4$; $200$โ$250$: $6$; $250$โ$300$: $12$; $300$โ$350$: $10$; $350$โ$400$: $5$; $400$โ$450$: $3$. Find the median wage.
E4. Board ยท 2 marks The total frequency of the distribution $0$โ$10$: $5$; $10$โ$20$: $x$; $20$โ$30$: $18$; $30$โ$40$: $9$; $40$โ$50$: $3$ is $40$. Find $x$ and the median.
E5. Board ยท Case study In a school sports day, the times (in seconds) of $50$ students in a race were: $12$โ$14$: $4$; $14$โ$16$: $10$; $16$โ$18$: $18$; $18$โ$20$: $12$; $20$โ$22$: $6$. (i) Write the cumulative frequencies and the median class. (2) (ii) Find the median time. (1) (iii) How many students took less than $18$ seconds? (1)
E6. JEE Main For a moderately skewed distribution the median is $20$ and the mean is $21$. The mode is approximately (A) $18$ (B) $19$ (C) $20$ (D) $23$
Research question. For real data from your class, how far apart are the mean, median and mode, and does the relation $3\,\text{Median}=\text{Mode}+2\,\text{Mean}$ hold?
Why it matters. Newspapers say "the median household income" rather than the mean because a few very high values distort the mean. Knowing when the mean, median and mode differ, and by how much, tells you whether a single number is a fair summary of a group.
What to do.
- Measure the heights (or arm spans, in cm) of at least 30 classmates and record them.
- Find the exact median from the sorted list.
- Group the heights with class size $5$ cm and build the cumulative frequency column.
- Compute the mean (Section 13.1), the mode (Section 13.2) and the median (this section) from the grouped table.
- Test the relation: compute $3\times\text{Median}$ and $\text{Mode}+2\times\text{Mean}$ and find their difference.
Tools: A tape measure, a calculator or a spreadsheet
Hand in: The raw heights, the grouped table with cumulative frequencies, the three averages, the test of the relation, and a short comment on whether your class data are symmetric or skewed.
Going further. Add one tall outlier (for example $210$ cm) to the data. Which of the three averages moves the most, and which barely moves?
๐งช Self-check quiz
Q1. The median of $3,\ 8,\ 5,\ 9$ is
Q2. For a distribution with $n=80$, the median class is the first class whose cumulative frequency is at least
Q3. A median class has $l=30$, $h=10$, $f=10$, $cf=20$ and $\frac n2=25$. The median is
Q4. A moderately skewed distribution has mean $30$ and mode $24$. Its median is about
Q5. The cumulative frequency of the last class of a table is always