Median class, n/2 and the median formula
The median is the middle student when all students stand in a line by marks. With grouped data we first find the class in which that middle student stands.
The median is the middle value. Find n/2; the class that contains the n/2-th observation is the median class. Then median = l + ((n/2 − cf) ÷ f) × h, where l is the lower limit of the median class, cf the cumulative frequency of the class before it, f its frequency and h its width.
Formula: median = l + ((n/2 − cf) ÷ f) × h
In the figure: Frequencies 5, 7, 10, 12, 6: n = 40, n/2 = 20 falls in the class 20–30.
Rule 1: What each symbol means — All the letters except n come from the median class or the class before it.
- Easy: n is the total frequency: 5 + 7 + 10 + 12 + 6 = 40.
- Medium: l = 20, h = 10, f = 10 belong to the class 20–30.
- Exam-type: cf = 12 belongs to the class before, 10–20.
Rule 2: Why the formula works — It counts how far into the median class the middle observation lies.
- Easy: n/2 − cf = 20 − 12 = 8 observations are still needed inside the class.
- Medium: The class has f = 10 observations over width h = 10.
- Exam-type: So we move 8/10 of the width: l + 8 = 28.
Check that the median lies inside the median class.
Using the cf of the median class instead of the class before it.
"Half the total, step into the class."
Practice questions
- 1The total frequency of a distribution is n = 100. Find n/2.
- 2The total frequency of a distribution is n = 20. Find n/2.
- 3The total frequency of a distribution is n = 40. Find n/2.
- 4For a distribution, n = 60, and the median class has l = 10, h = 10, f = 25 and cf = 8. Find the median.
- 5For class intervals 60–80, 80–100, 100–120, 120–140, the cumulative frequencies are 8, 14, 17, 40 respectively. Find the median class.
- 6For a distribution, n = 120, and the median class has l = 135, h = 15, f = 12 and cf = 50. Find the median.
- 7For a distribution, n = 100, and the median class has l = 100, h = 25, f = 10 and cf = 43. Find the median.
- 8For a distribution, n = 120, and the median class has l = 80, h = 20, f = 20 and cf = 44. Find the median.
Show answers (try them yourself first)
- 150
- 210
- 320
- 418.8
- 5120–140
- 6147.5
- 7117.5
- 896
Cumulative frequency and the median class
A running total of students: after the first class 5, after the second 5 + 7 = 12, and so on, until everyone is counted.
The cumulative frequency (cf) of a class is the sum of its frequency and all frequencies before it. The last cf equals n. The median class is the first class whose cf is at least n/2.
Formula: cf = running total of f
In the figure: cf = 5, 12, 22, 34, 40; the first cf ≥ 20 is 22, so the median class is 20–30.
Rule 1: Make the cf column — Add each f to the cf above it.
- Easy: 5, then 5 + 7 = 12, then 12 + 10 = 22.
- Medium: Then 22 + 12 = 34 and 34 + 6 = 40.
- Exam-type: The last cf must equal n = 40.
Rule 2: Pick the median class and its cf — The cf used in the formula comes from the row above.
- Easy: n/2 = 20; the cf 12 is below 20 and 22 is above, so the class is 20–30.
- Medium: The cf for the formula is 12, from the row above 20–30.
- Exam-type: If n/2 equals a cf exactly, the class with that cf is the median class.
Check the last cf equals n before looking for the median class.
Choosing the class with the largest frequency instead of the one found from n/2.
"Running total reaches half: that is the class."
Practice questions
- 1The cumulative frequencies of class intervals 60–80, 80–100, 100–120, 120–140 are 6, 31, 35, 40 respectively. Find the frequency of the class 100–120.
- 2The cumulative frequencies of class intervals 40–60, 60–80, 80–100, 100–120, 120–140 are 21, 22, 54, 62, 80 respectively. Find the frequency of the class 60–80.
- 3The cumulative frequencies of class intervals 15–20, 20–25, 25–30, 30–35, 35–40 are 6, 12, 15, 38, 60 respectively. Find the frequency of the class 30–35.
- 4The cumulative frequencies of class intervals 20–40, 40–60, 60–80, 80–100, 100–120, 120–140 are 12, 30, 32, 39, 58, 80 respectively. Find the frequency of the class 60–80.
- 5The cumulative frequencies of class intervals 20–25, 25–30, 30–35, 35–40, 40–45, 45–50 are 42, 43, 54, 69, 74, 80 respectively. Find the frequency of the class 25–30.
- 6The following distribution of ages of persons (in years) is given: class intervals 10–15, 15–20, 20–25, 25–30 with frequencies 4, 10, 3, 3 respectively. Find n/2.
- 7The following distribution of daily wages of workers (in ₹) is given: class intervals 300–310, 310–320, 320–330, 330–340, 340–350, 350–360 with frequencies 4, 13, 4, 4, 10, 5 respectively. Find n/2.
- 8The following distribution of ages of persons (in years) is given: class intervals 20–30, 30–40, 40–50, 50–60, 60–70, 70–80 with frequencies 2, 4, 2, 3, 2, 3 respectively. Find the cumulative frequency of the class 50–60.
Show answers (try them yourself first)
- 14
- 21
- 323
- 42
- 51
- 610
- 720
- 811
Computing the median from a table
To find the middle mark of a class of 40 students, we need only four numbers from the table and one formula.
Step 1: find n and n/2. Step 2: make the cf column and find the median class. Step 3: read l, cf, f, h. Step 4: put them in median = l + ((n/2 − cf) ÷ f) × h.
Formula: median = l + ((n/2 − cf) ÷ f) × h
In the figure: median = 20 + (20 − 12) ÷ 10 × 10 = 28.
Computing the median from a table
In the app you can move this figure with your finger.
Open in the appRule 1: The worked example — Frequencies 5, 7, 10, 12, 6 for classes 0–10 … 40–50.
- Easy: n = 40, n/2 = 20, median class 20–30.
- Medium: l = 20, cf = 12, f = 10, h = 10.
- Exam-type: median = 20 + (8/10) × 10 = 28.
Rule 2: A second example — Classes 0–20, 20–40, 40–60 with f = 6, 14, 10.
- Easy: n = 30, n/2 = 15; cf = 6, 20, 30, so the class is 20–40.
- Medium: l = 20, cf = 6, f = 14, h = 20.
- Exam-type: median = 20 + (9/14) × 20 = 20 + 12.86 ≈ 32.86.
Always write the four numbers l, cf, f, h on one line before substituting.
Taking h as the upper limit instead of the class width.
"n by 2, class, four numbers, formula."
Practice questions
- 1For class intervals 40–50, 50–60, 60–70, 70–80, 80–90 with frequencies 25, 2, 14, 6, 3 respectively, find the median.
- 2For class intervals 20–25, 25–30, 30–35, 35–40, 40–45 with frequencies 3, 22, 3, 8, 14 respectively, find the median.
- 3For class intervals 60–80, 80–100, 100–120, 120–140, 140–160 with frequencies 20, 5, 16, 1, 8 respectively, find the median.
- 4For class intervals 40–50, 50–60, 60–70, 70–80, 80–90 with frequencies 12, 1, 12, 8, 17 respectively, find the median.
- 5For class intervals 100–120, 120–140, 140–160, 160–180 with frequencies 3, 15, 7, 25 respectively, find the median.
- 6For class intervals 25–30, 30–35, 35–40, 40–45 with frequencies 24, 6, 11, 19 respectively, find the median.
- 7The following distribution of marks of students is given: class intervals 20–30, 30–40, 40–50, 50–60, 60–70 with frequencies 4, 28, 8, 4, 6 respectively. Find the median.
- 8The following distribution of ages of persons (in years) is given: class intervals 10–15, 15–20, 20–25, 25–30, 30–35 with frequencies 5, 11, 5, 5, 14 respectively. Find the median.
Show answers (try them yourself first)
- 150
- 230
- 3100
- 470
- 5160
- 635
- 737.5
- 824
Working backwards with the median formula
If the median mark and all but one frequency are known, the missing frequency can be found by solving the median equation.
Write n and the cf in terms of the unknown, put the given median in the formula, and solve. After solving, check that the median class you assumed is still the correct one.
Formula: solve: l + ((n/2 − cf) ÷ f) × h = median
In the figure: f = 5, 7, f, 12, 6 with median 28 gives f = 10.
Rule 1: Find the missing frequency — Assume the median class, solve, then verify.
- Easy: Median 28 lies in 20–30, so l = 20, h = 10, cf = 12, f is unknown.
- Medium: 20 + ((30 + f)/2 − 12) ÷ f × 10 = 28 gives (6 + f)/(2f) = 0.8.
- Exam-type: So 6 + f = 1.6f, which gives f = 10.
Rule 2: Verify the answer — Put the value back into the table.
- Easy: With f = 10: n = 40, n/2 = 20.
- Medium: cf = 5, 12, 22, 34, 40; the class 20–30 does contain n/2.
- Exam-type: median = 20 + 8 = 28, as given.
Verify that the assumed median class is still correct after solving.
Forgetting that the unknown frequency also changes n.
"Write it, solve it, put it back."
Practice questions
- 1For a distribution with n = 40, the median class is 80–90 with frequency f = 20, and the median is 89.5. Find cf.
- 2For a distribution with n = 60, the median class is 200–220 with frequency f = 16, and the median is 217.5. Find cf.
- 3For a distribution with n = 30, the median class is 90–100 with frequency f = 18, and the median is 95. Find cf.
- 4The median class of a distribution is 180–200, with f = 8 and cf = 41. If the median is 190, find the total frequency n.
- 5The median class of a distribution is 80–100, with f = 10 and cf = 24. If the median is 82, find the total frequency n.
- 6The median class of a distribution is 5–10, with f = 10 and cf = 49. If the median is 5.5, find the total frequency n.
- 7For a distribution with n = 100, the median class is 5–10 with cf = 42, and the median is 9. Find the frequency f of the median class.
- 8A distribution has n = 60, class width 20, median class frequency f = 8, cf = 27 and median 147.5. Find the lower limit l of the median class.
Show answers (try them yourself first)
- 11
- 216
- 36
- 490
- 550
- 6100
- 710
- 8140
Applications and comparisons
Salaries in a small firm: nine people earn a little and the owner earns a lot. The mean looks rich, but the median shows what a typical person earns.
The mean uses every value, so one very large value pulls it. The median only needs the middle position, so it is a better “typical” value when a few values are extreme.
In the figure: Table data: mean 26.75 and median 28 are close; with one huge value the gap is large.
Rule 1: Compare mean and median — Compute both from the same table.
- Easy: Mean: Σfx = 25 + 105 + 250 + 420 + 270 = 1070; 1070 ÷ 40 = 26.75.
- Medium: Median from the same data = 28.
- Exam-type: The two are close because the data is fairly even.
Rule 2: Which one to use — Choose by the shape of the data.
- Easy: Salaries 10, 12, 13, 14, 100 (thousand): mean = 149 ÷ 5 = 29.8, median = 13.
- Medium: The median 13 describes a typical earner better.
- Exam-type: For even data both are nearly equal.
Ask whether any value is very large or very small before choosing the average.
Saying the median is always smaller than the mean; it can be either.
"Extremes pull the mean, not the median."
Practice questions
- 1Marks of 40 students in each of two sections (classes 0–10, 10–20, 20–30, 30–40): Section A frequencies 10, 10, 11, 9; Section B frequencies 2, 9, 10, 19. Which section has the higher median?
- 2Marks of 40 students in each of two sections (classes 0–10, 10–20, 20–30, 30–40): Section A frequencies 4, 20, 14, 2; Section B frequencies 18, 5, 16, 1. Which section has the higher median?
- 3Marks of 40 students in each of two sections (classes 0–10, 10–20, 20–30, 30–40): Section A frequencies 8, 12, 4, 16; Section B frequencies 1, 16, 6, 17. Which section has the higher median?
- 4Marks of 40 students in each of two sections (classes 0–10, 10–20, 20–30, 30–40): Section A frequencies 10, 4, 8, 18; Section B frequencies 15, 5, 14, 6. Which section has the higher median?
- 5Marks of 40 students in each of two sections (classes 0–10, 10–20, 20–30, 30–40): Section A frequencies 5, 10, 20, 5; Section B frequencies 17, 4, 18, 1. Which section has the higher median?
- 6The median of some observations is 89. If every observation is decreased by 5, what is the new median?
- 7The median of some observations is 190. If every observation is multiplied by 12, what is the new median?
- 8The median of some observations is 230. If every observation is decreased by 7, what is the new median?
Show answers (try them yourself first)
- 1Section B
- 2Section A
- 3Section B
- 4Section A
- 5Section A
- 684
- 72280
- 8223