MathematicsCore20 min read

Information Handling (Grouped Data)

Histograms, cumulative frequency, and the quartiles read off an ogive

This topic appears in:

01

Grouped data: what you gain and what you lose

Grouping turns two hundred unreadable numbers into a table of six lines. The gain is obvious. The loss is that the individual values are gone: after grouping, you know that eleven students scored between 20 and 30, but not what any of them actually scored.

Everything that follows is a consequence. The mean has to be estimated using class midpoints. The mode becomes a modal class, not a value. The median has to be read from a graph rather than counted.

estimated mean x̄ = Σfx / Σf(x = class midpoint)class width = upper boundary − lower boundaryfrequency density = frequency / class widthfrequency density matters only when the classes have different widths — but then it matters absolutely
02

Histograms, and the trap of unequal class widths

A histogram looks like a bar chart with the gaps closed up, and while the classes are all the same width that is exactly what it is. The area of each bar represents the frequency, and when the widths are equal, area is proportional to height, so plotting the frequency works.

The moment the widths differ, plotting frequency as height is wrong: a class of width 20 would look twice as important as a class of width 10 with the same frequency. The vertical axis must then be frequency density, and the frequency is recovered as area = density × width.

The ogive plots each cumulative total at the upper boundary of its class. Reading across at N/2 gives the median, at N/4 the lower quartile and at 3N/4 the upper quartile.

Bar chart or histogram?

A bar chart shows separate categories, so the bars have gaps and only their heights carry meaning. A histogram shows continuous data, so the bars touch at the class boundaries and their areas carry the meaning. Drawing a histogram with gaps, or a bar chart without them, loses a mark in either direction.

03

The cumulative frequency curve

A cumulative frequency table records a running total: how many observations are at or below each class boundary. Plotting those totals against the upper class boundaries and joining them with a smooth curve gives the ogive.

Plotting at the midpoint instead of the upper boundary is the standard error, and it shifts every reading you take afterwards. The reason for the upper boundary is simple: the cumulative total "40 or fewer" is only complete once you reach the top of the 30–40 class.

Worked example

From marks grouped 0–10 (2), 10–20 (5), 20–30 (9), 30–40 (12), 40–50 (8), 50–60 (4), build the cumulative frequency table and explain how to find the median.

  1. Running totals: 2, 7, 16, 28, 36, 40.Each entry is the previous total plus the new frequency. The last must equal Σf = 40, which is a built-in check.
  2. Plot (10, 2), (20, 7), (30, 16), (40, 28), (50, 36), (60, 40), and start the curve at (0, 0).Upper boundaries on the horizontal axis. The point (0, 0) is legitimate because nobody scored below zero.
  3. The median is the N/2 = 20th value. Draw a horizontal line at 20 to meet the curve, then drop to the x-axis.For a cumulative frequency curve, use N/2 rather than (N+1)/2 — the curve is treating the data as continuous.
  4. The reading is about 34 marks.Sanity check: 16 students scored under 30 and 28 under 40, so the 20th value must lie between 30 and 40. It does.

Cumulative frequencies 2, 7, 16, 28, 36, 40; median ≈ 34 marks

04

Quartiles and the interquartile range

The quartiles cut the ordered data into four equal parts. Read them off the ogive in exactly the same way as the median, at different heights.

The interquartile range is Q₃ − Q₁, the width of the middle half of the data. It is a far better measure of spread than the range for the same reason the median beats the mean: it ignores the extremes entirely, so one freak value cannot distort it.

Q₁ at height N/4Q₂ (median) at N/2Q₃ at 3N/4interquartile range = Q₃ − Q₁semi-interquartile range = (Q₃ − Q₁) / 2the semi-interquartile range, or quartile deviation, is what Punjab papers most often ask for

Before you leave this chapter

  1. Grouping loses the individual values, so the mean becomes an estimate and the mode becomes a modal class.
  2. Equal class widths → plot frequency. Unequal widths → plot frequency density, and frequency is the area.
  3. A histogram has no gaps; a bar chart does.
  4. Plot cumulative frequency at the UPPER class boundary, never the midpoint.
  5. Read Q₁, median and Q₃ at N/4, N/2 and 3N/4. IQR = Q₃ − Q₁ and ignores the extremes.
05

Choosing the classes, and drawing an honest histogram

When you group the data yourself, the choice of class interval matters. Too few classes and the shape of the distribution disappears; too many and the frequencies are all 1 or 2 and the table tells you nothing. Between five and ten classes is the usual compromise, and they should be of equal width unless there is a good reason otherwise.

A good reason does sometimes exist. Income data, or examination marks with a long thin tail, may need wider classes where the data is sparse — and that is precisely when frequency density becomes compulsory.

Worked example

Classes 0–10 (f = 15), 10–20 (f = 25) and 20–40 (f = 30). Find the height of each bar on a histogram.

  1. Class widths are 10, 10 and 20.The third class is twice as wide as the others, so raw frequency cannot be used as the height.
  2. Frequency densities: 15/10 = 1.5, 25/10 = 2.5, 30/20 = 1.5.Density = frequency ÷ class width.
  3. Bar heights are 1.5, 2.5 and 1.5.The first and last bars have the same height even though the last has twice the frequency — because it is twice as wide, so its area is twice as large.
  4. Check the areas: 1.5 × 10 = 15, 2.5 × 10 = 25, 1.5 × 20 = 30Area returns the original frequency, which is exactly what a histogram is supposed to guarantee.

Heights 1.5, 2.5 and 1.5 in frequency density units

Practice questions

6 questions · 20 marks · full working on every one

Try each one on paper first, then open the working. The marks are shown where they are actually awarded, because that is where they are actually lost.

Short questions

3 · 6 marks

Two marks each, in the style of the short-question section of the paper. Answer in two or three lines.

SQ1[2 marks]
State two differences between a bar chart and a histogram.
Model answer

A bar chart displays discrete categories with gaps between the bars, and only the heights are meaningful. A histogram displays continuous data with no gaps, and it is the area of each bar that represents the frequency.

Examiner tip. Any two of the three differences — gaps, type of data, height versus area — will earn the marks.

SQ2[2 marks]
Why is cumulative frequency plotted against the upper class boundary?
Model answer

Because the cumulative total for a class counts every observation up to and including the top of that class. The count "36 or fewer" is only complete at the upper boundary, so plotting at the midpoint would claim the total was reached earlier than it was.

Examiner tip. This is the single most common error in the chapter, and examiners ask for the reason directly.

SQ3[2 marks]
Define the interquartile range and state one advantage it has over the range.
Model answer

IQR = Q₃ − Q₁, the spread of the middle 50% of the data. Unlike the range it is unaffected by extreme values, since it depends only on the quartiles and ignores the top and bottom quarters entirely.

Examiner tip. The definition alone is one mark; the advantage is the second, so answer both halves.

Solved numericals

2 · 8 marks

Full working, one step per line, with the marks shown where they are awarded.

N1[4 marks]
The masses of 50 parcels are grouped: 0–5 kg (6), 5–10 kg (14), 10–15 kg (18), 15–20 kg (9), 20–25 kg (3). Estimate the mean mass and state the modal class.
Full working
  1. Midpoints 2.5, 7.5, 12.5, 17.5, 22.5[1]
  2. fx values 15, 105, 225, 157.5, 67.5 with Σfx = 570[1]
  3. x̄ = 570 / 50 = 11.4 kgaccept 11.4 kg[1]
  4. Modal class 10–15 kg, having the greatest frequency of 18a class, not a single value[1]

Estimated mean 11.4 kg; modal class 10–15 kg

Examiner tip. The mean should land inside or near the modal class. If it does not, an arithmetic error in the fx column is the likely cause.

N2[4 marks]
A cumulative frequency curve for 80 students gives Q₁ = 42, median = 55 and Q₃ = 68 marks. Find the interquartile range, the semi-interquartile range, and estimate how many students scored above 68.
Full working
  1. IQR = 68 − 42 = 26 marks[1]
  2. Semi-IQR = 26 / 2 = 13 marks[1]
  3. Q₃ is the value below which three quarters of the data lie, so 3/4 × 80 = 60 students scored 68 or less[1]
  4. 80 − 60 = 20 students scored above 68a quarter of the data lies above Q₃, by definition[1]

IQR 26 marks; semi-IQR 13 marks; 20 students above 68

Examiner tip. A quarter of the data lies above Q₃ by definition, so the last part can be answered in one step as 80 ÷ 4 = 20.

Long questions

1 · 6 marks

Theory and numerical together, as they appear in the long-question section.

LQ1[6 marks]
The lifetimes of 100 bulbs in hours are grouped: 0–200 (10), 200–400 (25), 400–600 (35), 600–800 (20), 800–1000 (10).
  1. Construct the cumulative frequency table.
  2. Describe how you would use the ogive to estimate the median.
  3. Estimate the mean lifetime and comment on how it compares with the median.
Mark scheme
  1. Cumulative frequencies 10, 35, 70, 90, 100the last value must equal 100[1]
  2. Points plotted at the upper boundaries 200, 400, 600, 800, 1000, starting from (0, 0)[1]
  3. Draw a horizontal line at N/2 = 50 to the curve and read down to the horizontal axisthe median is about 490 hours[1]
  4. Midpoints 100, 300, 500, 700, 900 with Σfx = 1000 + 7500 + 17500 + 14000 + 9000 = 49 000[1]
  5. x̄ = 49 000 / 100 = 490 hours[1]
  6. The mean and median are almost identical, which indicates that the distribution is roughly symmetrical with no strong skewthe comment is required, not just the two numbers[1]

(a) 10, 35, 70, 90, 100 (b) read across at 50 and down to the axis (c) mean ≈ 490 h, almost equal to the median, so the data is nearly symmetrical

Examiner tip. Comparing mean and median is a standard final part. Mean above median means the tail stretches to the right; mean below means it stretches left; roughly equal means symmetrical.