Histograms

Histograms

Spec E9.7 · Cambridge IGCSE Maths: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • A histogram displays grouped continuous data, especially when class widths are unequal.
  • The vertical axis is frequency density, never "frequency". Bars have no gaps.
  • Frequency density =frequencyclass width=\dfrac{\text{frequency}}{\text{class width}}.
  • Frequency == frequency density ×\times class width, so the area of a bar is its frequency.
  • For part of a class, assume the data is evenly spread and use the area of that part.

What a histogram is

A histogram is a chart of grouped continuous data where bar area, not height, shows frequency.

A histogram displays grouped continuous data, and is needed when the class widths are unequal. Plotting raw frequency as height would make wide classes look misleadingly tall. Instead the vertical axis is frequency density, and the area of each bar represents the frequency. Examiners require the axis label "Frequency density".

010204080t0t1u1u2v2v4w4w8
Histogram with unequal class widths (horizontal scale drawn at one tenth). Area, not height, shows frequency: 20, 30, 40 and 20

Bar chart

  • Gaps between bars
  • Height shows frequency
  • Categories or discrete data

Histogram

  • No gaps between bars
  • Area shows frequency
  • Continuous grouped data

Which label belongs on the vertical axis of a histogram?

Why frequency density

Dividing by class width makes bar areas comparable when classes differ in width.

If class widths are unequal, a class twice as wide would look twice as tall for the same spread of data. Plotting frequency density fixes this: the area of each bar then equals the frequency, so bars can be compared fairly. Think of it like population density on a map: how packed the data is per unit of width.

0102030400–1010–2020–4040–80ClassValue
  • Frequency
  • Class width
Illustrative: the 20–40 class has the highest frequency only because it is twice as wide. Class widths are 10, 10, 20 and 40
  • Frequency densityfrequencyclass width\dfrac{\text{frequency}}{\text{class width}}

0 ≤ x < 10

Frequency:
20
Class width:
10
Frequency density:
2

10 ≤ x < 30

Frequency:
40
Class width:
20
Frequency density:
2

30 ≤ x < 40

Frequency:
15
Class width:
10
Frequency density:
1.5

40 ≤ x < 60

Frequency:
10
Class width:
20
Frequency density:
0.5

Two classes have the same frequency of 40, but one is twice as wide. Which has the taller bar?

Calculating frequency density

Divide the frequency by the class width.

Find the class width as the upper boundary minus the lower boundary. Divide the class frequency by it. This gives the height of the bar. To go the other way, multiply the frequency density by the class width to get the frequency.

00.511.522.530–1010–2020–4040–80ClassFrequency density
Frequency density = frequency ÷ class width: 20 ÷ 10 = 2, 30 ÷ 10 = 3, 40 ÷ 20 = 2, 20 ÷ 40 = 0.5
  • Frequency densityfrequency ÷ class width
  • Frequencyfrequency density × class width

Worked example

A class 10 to 25 has frequency 30. Find the frequency density.

A class from 20 to 40 has frequency 50. What is its frequency density?

Drawing a histogram

Work out frequency density for each class, then draw touching bars.

Add a class width column and a frequency density column to the grouped table. Draw bars with no gaps, using class boundaries on the horizontal axis. Each bar's height is its frequency density, so its area is its frequency. Label the vertical axis "Frequency density" and the horizontal axis with the variable.

FD 2FD 2FD 1.5FD 0.5AaAbAcAdBaBbBcBdCaCbCcCdDaDbDcDd
Histogram for the table: heights are frequency density × 10 (2, 2, 1.5, 0.5)
  1. 1

    Table

    Add class width and frequency density columns

  2. 2

    Calculate

    Frequency ÷ class width for each class

  3. 3

    Draw

    Touching bars on class boundaries

  4. 4

    Label

    Frequency density on the vertical axis

Drawing a histogram

In a histogram, what must each bar's area equal?

Reading a histogram

Frequency = frequency density × class width, and part of a bar gives part of the frequency.

Read the bar height (frequency density) and the class width, then multiply to get the frequency. For part of a class that does not line up with the boundaries, assume the data is spread evenly across the class and use the area of that part.

010204080t0t1u1u2v2v4w4w830
The shaded part is the class 20–40 up to 30: frequency = 2 × 10 = 20
  • Frequencydensity × width

Worked example

The bar for the class 10 to 30 has height 2. Find the class frequency and the number of values between 10 and 15.

A bar over the class 40 to 60 has frequency density 0.5. What is the frequency?

Try an exam question

A histogram has a bar for the class 20<x≤5020<x\le50 with a frequency of 45. (a) Work out the frequency density for this class. (b) The bar for the class 50<x≤6050<x\le60 has frequency density 0.8. Work out the frequency of this class.

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Find the frequency density of the class 0≤t<100 \leq t < 10.

1 mark, marked against the mark scheme

Revision notes