O Level Maths 4024 · Area 9 · Statistics

Histograms

A histogram is drawn for continuous data in classes that are not all the same width. Frequency goes into the area of each bar, so the height has to be frequency density=frequencyclass width and the vertical axis is labelled 'Frequency density'. Read a frequency back off the diagram by multiplying the height of the bar by its width, and read the total by adding those frequencies rather than the heights.

Not started

Syllabus coverage

  • Draw and interpret histograms
  • On histograms, the vertical axis is labelled 'Frequency density'
  • Frequency density is defined as frequency density = frequency divided by class width

Part of the O Level Maths syllabus 4024.

Histogram of the masses of 72 apples, with the frequency table it was drawn from0204060801001401800.00.20.40.60.81.0Mass (g)Frequency densityMass (g)FrequencyClass widthFrequencydensity0 to 204200.220 to 4010200.540 to 6018200.960 to 8016200.880 to 1008200.4100 to 14012400.3140 to 1804400.1Bar height is frequency density, so the two wide classes are short bars even though 12 and 4 apples fall in them.
A histogram of the masses of 72 apples in seven classes, five of them 20 grams wide and two 40 grams wide, drawn beside the table of frequency, class width and frequency density.

Why unequal classes need a different diagram

A bar chart puts frequency in the height of the bar, which works only when every bar covers the same width of the variable. If one class is twice as wide as another, it has twice as much room to collect data, so a tall bar may simply be a wide class rather than a busy one. Plotting frequency as height then makes wide classes look more common than they are.

A histogram fixes this by putting frequency into the area of the bar. Each bar's width is the class width from the table, and its height is adjusted so that width times height gives the frequency. A wide class ends up with a short bar for the same frequency, which is exactly what fairness requires.

That is why the vertical axis of a histogram is never labelled 'Frequency'. Cambridge states the label explicitly: the vertical axis is labelled 'Frequency density'. A histogram with frequency on the vertical axis and unequal classes is wrong, however neat the drawing.

DiagramDataHeight of barWidth of bar
bar chartdiscrete categoriesfrequencyfixed, no meaning
histogram, equal classescontinuous, groupedfrequency (equal to frequency density here)class width
histogram, unequal classescontinuous, groupedfrequency densityclass width
In a histogram, area means frequency. Height alone has no meaning until you multiply by the width of the bar.

Frequency density: the definition and its two rearrangements

Frequency density is defined as frequency divided by class width: frequency density=frequencyclass width. A class containing 18 values and 20 units wide has a density of 1820=0.9, so its bar is 0.9 units tall.

The formula rearranges in the two directions you need. To find the frequency from a drawn bar, multiply: frequency=frequency density×class width. To find the class width when you know the frequency and the density, divide: class width=frequencyfrequency density.

The units of frequency density are awkward on purpose: values per unit of the variable. If the classes are masses in grams, the density is measured in values per gram, which is why the axis is labelled with words rather than a single unit. You are not expected to give units for it.

  • frequency density=frequencyclass width
  • frequency=frequency density×class width
  • class width=frequencyfrequency density
  • Class width is a difference: for 40<m≤60 it is 60−40=20
Class width is the gap between the boundaries, not the number of values in the class and not the midpoint. For 100<m≤140 the width is 40.

Building the table before you draw

Every histogram question starts with a table that has a column for class width and a column for frequency density. Write both columns before touching the axes, because the vertical scale cannot be chosen until you know the largest density.

Take the masses of 72 apples in seven classes. The first five classes are 20 grams wide and the last two are 40 grams wide. The class 40<m≤60 holds 18 apples, so its density is 1820=0.9. The class 100<m≤140 holds 12 apples, so its density is 1240=0.3, which is lower even though 12 is a large count.

Add the frequencies to check the total before drawing. Here 4+10+18+16+8+12+4=72, which matches the number of apples, so no class has been lost. A table whose frequencies do not add to the stated total contains an error that will show up as a wrong bar height.

Mass m (g)FrequencyClass widthFrequency density
0<m≤204200.2
20<m≤4010200.5
40<m≤6018200.9
60<m≤8016200.8
80<m≤1008200.4
100<m≤14012400.3
140<m≤1804400.1
The tallest bar is the one with the greatest frequency density, not the greatest frequency. Here that is 40<m≤60 with 18 apples, not the class of 12 apples spread over 40 grams.

Drawing the bars

The bars of a histogram touch. Continuous data has no gaps between classes, so the bars have no gaps either: the right-hand edge of one bar is the left-hand edge of the next. A histogram drawn with gaps between the bars is a bar chart with the wrong axis label.

Each bar runs from the lower boundary to the upper boundary of its class, and its height is the frequency density. Mark the boundaries on the horizontal axis and the densities on the vertical axis, and draw the bars to those heights with a ruler. The vertical axis carries the label 'Frequency density' in words, because the numbers are not counts.

Choose a vertical scale that fits the largest density comfortably, with a little space above it. With densities up to 0.9, a scale of 0.1 per small square or 1 unit per 10 small squares both work; what matters is that the scale is uniform and labelled at every major division. A bar drawn to the wrong height because the scale was improvised is the most expensive mistake in the topic.

  • Bars touch: the classes are continuous, so there are no gaps
  • Bar width = class width, bar height = frequency density
  • Vertical axis labelled 'Frequency density', horizontal axis labelled with the variable and its unit
  • Uniform vertical scale, with the largest density comfortably inside the grid
  • Ruler for the bar edges; a neat histogram is quicker to read and to mark
The first and last bars are the ones that show whether you understood the topic: in the apple data they are 20 and 40 grams wide, so they must be drawn wider than the middle bars.

Reading a frequency back off the diagram

To read the frequency of a class from a histogram, multiply the height of its bar by its width. The bar for 60<m≤80 is 0.8 high and 20 grams wide, so it represents 0.8×20=16 apples. Reading 0.8 and calling it 16, or reading 0.8 and calling it 0.8 apples, are both wrong.

The same multiplication works when the numbers come from a question rather than a drawing. A bar 0.35 high over a class 40 wide represents 0.35×40=14 values. A bar 1.8 high over a class 10 wide represents 18 values.

To find the total number of values, add the frequencies, not the heights. For the apples the frequencies are 4, 10, 18, 16, 8, 12 and 4, which total 72; adding the densities would give 3.2, a number with no meaning here.

Bar height (frequency density)Bar width (class width)Frequency
0.2204
0.92018
0.34012
0.1404
Frequency equals the area of the bar. Height times width, every time, and the answer is a count, so it has no unit beyond 'values' or 'apples' or 'students'.

Area is frequency, so the whole diagram adds to the total

Because each bar's area is its frequency, the total area under the histogram equals the total number of values. For the apples, the areas are 4+10+18+16+8+12+4=72, the same 72 as the table. This gives a second check on a drawing: if the areas do not add to the stated total, a height or a width is wrong.

It also explains why a wide, low bar can hold more data than a narrow, tall one. A bar 40 wide and 0.3 high holds 12; a bar 20 wide and 0.5 high holds 10. The tall bar is not automatically the busiest, which is the single idea that separates a histogram from a bar chart.

Some questions give the total and one missing density. Work out the known frequencies first, subtract to find the missing frequency, then divide by that class's width. With a total of 50, known frequencies of 8 and 18 and a class 10 wide, the missing frequency is 50−26=24 and its density is 2.4.

  • Total area under the histogram = total frequency
  • A wide low bar can hold more values than a narrow tall one
  • Missing density: find the missing frequency first, then divide by the width
  • Check every finished histogram by adding the areas back to the total

Class widths that are not whole numbers of units

The width is always the difference between the two boundaries, whatever the boundaries look like. For 2.5<t≤4.5 the width is 2, and for 0<t≤0.5 the width is 0.5. A class with a fractional width can have a density much larger than its frequency, which is why the vertical scale has to be chosen after the table is built.

Watch for tables where the classes are written with inequalities that mix < and ≤. The width is still the gap between the two numbers, and the bar is still drawn from one boundary to the next, touching its neighbours.

Where a question gives frequencies and asks for densities, keep the division exact or give a sensible decimal. 720=0.35 is exact; 53 is 1.67 to 3 significant figures, and a plotted bar should be drawn at the exact position rather than at the rounded number if the grid allows.

ClassWidthFrequencyFrequency density
0<t≤0.50.5612
0.5<t≤21.596
2<t≤4.52.552
A density of 12 looks alarming next to a frequency of 6, but the class is only 0.5 wide, so 12×0.5=6. Check by multiplying back before you decide a number is wrong.

Interpreting a histogram: where the data really is

The tallest bar tells you where the data is most densely packed, and for the apples that is the 40 to 60 gram class. The bar does not tell you how many apples are in that class until you multiply, and a question may ask for either the density or the count, so read the wording carefully.

The shape of the histogram describes the distribution: a single mound means most values are near the middle, a long tail on one side means the data is skewed, and two separate mounds mean the data probably comes from two different groups mixed together. Saying 'most of the apples are between 40 and 80 grams' is an interpretation, not just a reading.

A histogram cannot tell you the individual values, only how many fall in each class. If a question asks for the median from a histogram, that is a different technique altogether; the syllabus asks you to draw and interpret the diagram, and to read frequencies from it.

  • Tallest bar = greatest frequency density, not greatest frequency
  • Shape describes the distribution: one mound, a tail, or two groups
  • Frequencies are read by multiplying height by width
  • Individual values are lost once data is grouped
If a question asks which class contains the most data, compare frequencies by multiplying each height by its width. Comparing heights alone answers a different question.

Key terms you must be able to define

Histogram
A diagram for continuous grouped data in which the area of each bar represents the frequency of its class.
Frequency density
Frequency divided by class width; the height of a bar in a histogram.
Class width
The difference between the upper and lower boundaries of a class, and the width of its bar.
Class boundary
The value where one class ends and the next begins; the bars of a histogram meet at these values.
Area of a bar
Frequency density times class width, which equals the frequency of the class.
Continuous data
Data that can take any value in a range, such as mass or time, so classes have no gaps between them.
Unequal class widths
Classes of different widths in the same table, which is the situation a histogram exists to handle.
Distribution
The overall shape of the data: where it is concentrated, how it spreads and whether it has tails.
Total frequency
The sum of the frequencies, equal to the total area under the histogram.

In context

Cambridge sets 4024 in real situations - a recipe, a bank statement, a map, a garden, a graph of a car's journey. These show how the mathematics appears in a question, then you write your own working for the numbers you are given.

Completing a table of densities

A table gives four classes with frequencies 4, 10, 18 and 16, all 20 units wide. The densities are 420=0.2, 1020=0.5, 1820=0.9 and 1620=0.8. Because the widths are equal the bars are in the same ratio as the frequencies, but the axis is still labelled frequency density.

A class twice as wide

The next class in the same table is 100<m≤140, which is 40 units wide and holds 12 values. Its density is 1240=0.3, so its bar is 40 wide and 0.3 high. Although the frequency of 12 is nearly as large as the 16 in the previous class, the bar is less than half as tall, because the same data is spread over twice the width.

Reading a frequency from the diagram

On the finished histogram the bar for 60<m≤80 rises to 0.8 on the frequency density axis. The class is 20 grams wide, so the frequency is 0.8×20=16. The bar for 100<m≤140 rises to 0.3 and is 40 wide, giving 0.3×40=12. Reading the heights as 0.8 and 0.3 apples would be meaningless.

The total from the areas

Adding the seven frequencies of the apple data gives 4+10+18+16+8+12+4=72, which matches the stated number of apples. The same total can be found from the areas of the bars, since each area is a frequency. A total that does not match signals a wrong density or a wrong class width somewhere in the table.

A missing density

A histogram of 50 values has classes 0<x≤10 with density 0.8, 10<x≤30 with density 0.9, and 30<x≤40 with a density to be found. The first two classes hold 0.8×10=8 and 0.9×20=18 values, so 26 are accounted for. The last class holds 50−26=24 values over a width of 10, giving a density of 2.4.

Flashcards

Click a card to flip it. Mark honestly — the tracker uses this.

Q1When is a histogram used instead of a bar chart?
For continuous grouped data, especially when the classes are not all the same width.
Q2What does the area of a bar in a histogram represent?
The frequency of that class.
Q3Write the formula for frequency density.
frequency density=frequencyclass width.
Q4How do you find the frequency from a bar?
Multiply the height by the width: frequency=frequency density×class width.
Q5What is the label on the vertical axis of a histogram?
'Frequency density', in words.
Q6How is the class width of 40<m≤60 found?
60−40=20. It is a difference between boundaries, not a count.
Q7Do the bars of a histogram touch?
Yes. The data is continuous, so classes meet at the boundaries and there are no gaps.
Q8A bar is 0.3 high and 40 wide. What is the frequency?
0.3×40=12.
Q9Which bar is tallest?
The one with the greatest frequency density, which is not always the one with the greatest frequency.
Q10How do you find the total number of values from a histogram?
Add the frequencies found from the areas of the bars; the total area equals the total frequency.
Q11A class holds 18 values and is 20 wide. What is its density?
1820=0.9.
Q12Why can a wide, low bar hold more data than a narrow, tall one?
Because the frequency is the area of the bar, so width matters as much as height.
0 of 12 marked as known

Exam-style questions

7 questions, 17 marks. Write your answer and press Mark my answer — it is marked against the scheme and tells you which points you made and what would gain the next mark. You can still reveal the scheme and mark it yourself instead.

Work outAO11 mark
A class of a histogram is 20 units wide and contains 14 values. Work out the frequency density of the class.
Write a number, a fraction such as 3/4, or an expression such as 3x+2.

Mark scheme — tick each point you actually made

  • B11420=0.7not checked yet
Examiner tip: Divide the frequency by the class width, in that order. 20 divided by 14 is the wrong way up and gives 1.43.
Work outAO12 marks
A bar of a histogram is 0.6 high and covers a class 25 units wide. Work out the frequency of the class.
Write a number, a fraction such as 3/4, or an expression such as 3x+2.

Mark scheme — tick each point you actually made

  • M1
  • A10.6×25=15not checked yet
Examiner tip: The height alone is not the frequency. Multiplying by the width is the whole point of the topic.
Work outAO24 marks
A histogram has three classes: 0<x≤20 with frequency density 0.4, 20<x≤30 with frequency density 1.2, and 30<x≤50 with frequency density 0.6. Work out the total frequency.
Write a number, a fraction such as 3/4, or an expression such as 3x+2.

Mark scheme — tick each point you actually made

  • M1
  • M1
  • M1
  • A18+12+12=32not checked yet
Examiner tip: The three widths are 20, 10 and 20, not 20 each. Read each class boundary pair separately before multiplying.
Work outAO22 marks
The class 20<m≤40 contains 24 values and the class 40<m≤50 contains 18 values. Work out the frequency density of each class, giving the value for 20<m≤40 first.
Write a number, a fraction such as 3/4, or an expression such as 3x+2.

Mark scheme — tick each point you actually made

  • M1
  • A11.2 and 1.8, in that ordernot checked yet
Examiner tip: The second class has fewer values but a greater density, because its width is half as big. Keep the order the question asks for.
ExplainAO23 marks
Explain why the vertical axis of a histogram is labelled 'Frequency density' rather than 'Frequency' when the classes have different widths.

Mark scheme — tick each point you actually made

  • B1
  • B1
  • B1
Examiner tip: Three marks, three ideas: the problem with frequency as height, the fix (area equals frequency), and why the fix works.
Work outAO13 marks
A bar of a histogram covers the class 60<m≤100 and has height 0.35. Work out the frequency of the class.
Write a number, a fraction such as 3/4, or an expression such as 3x+2.

Mark scheme — tick each point you actually made

  • M1
  • M1
  • A114not checked yet
Examiner tip: Work out the width first and write it down. The commonest error is to multiply by 60 or by 100 instead of by the difference.
Work outAO22 marks
A histogram represents 50 values. The class 0<x≤10 has frequency density 0.8 and the class 10<x≤30 has frequency density 0.9. The remaining values are all in the class 30<x≤40. Work out the frequency density of that class.
Write a number, a fraction such as 3/4, or an expression such as 3x+2.

Mark scheme — tick each point you actually made

  • M1
  • A12410=2.4not checked yet
Examiner tip: Find the missing frequency before dividing by the width. Dividing 24 by 40 instead of 10 is the error to avoid.

Exam technique for this topic

  • Label the vertical axis 'Frequency density' in full. Putting 'Frequency' there is a marking error even if every bar height is right.
  • Work out class width and frequency density in a table before you draw. The tallest density sets the vertical scale, and choosing the scale first is how bars end up off the grid.
  • Draw the bars touching, with widths taken from the class boundaries. A gap between bars says the data is discrete, which it is not.
  • To read a frequency, multiply the height by the width and say what the number counts. To read the total, add the frequencies, never the heights.
  • Before you finish, check that the areas of the bars add to the total frequency given in the question. It catches most drawing and arithmetic slips in one step.

Why students lose marks here

A student wroteUsing frequency as the height of each bar when the classes are unequal
Why it loses marksHeight must represent frequency only when all classes are the same width. With unequal widths, a wide class would look busier than it is.
The answer that scoresPlot frequency density on the vertical axis, so that height times width, the area, equals the frequency.
A student wroteLabelling the vertical axis 'Frequency' on a histogram
Why it loses marksThe numbers on that axis are frequencies divided by class widths, not frequencies. The syllabus requires the label 'Frequency density'.
The answer that scoresLabel the axis 'Frequency density' and keep the frequencies in the table beside the diagram.
A student wroteTaking the class width as the number of values in the class
Why it loses marksWidth is a distance along the horizontal axis: for 100<m≤140 it is 40, whatever the frequency happens to be.
The answer that scoresClass width is the upper boundary minus the lower boundary, here 140−100=40.
A student wroteReading a bar of height 0.8 over a class 20 wide as 0.8 values
Why it loses marksThe height is a density. The frequency is the area of the bar, so the width has to be multiplied in.
The answer that scores0.8×20=16 values.
A student wroteAdding the bar heights to get the total number of values
Why it loses marksThe heights are densities and do not add to a count. Only the areas, which are the frequencies, add to the total.
The answer that scoresMultiply each height by its width and add those frequencies: 4+10+18+16+8+12+4=72.

Where this fits in O Level Maths 4024

This page is one topic of Cambridge O Level Maths 4024. O Level Maths 4024 is the course home: every area and every topic in Cambridge's own order, the papers you sit and what each one tests, and the exam-practice tools. The full topic list, with each topic linked to its revision page, is on the O Level Maths 4024 syllabus page.