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.
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.
| Diagram | Data | Height of bar | Width of bar |
|---|---|---|---|
| bar chart | discrete categories | frequency | fixed, no meaning |
| histogram, equal classes | continuous, grouped | frequency (equal to frequency density here) | class width |
| histogram, unequal classes | continuous, grouped | frequency density | class width |
Frequency density: the definition and its two rearrangements
Frequency density is defined as frequency divided by class width: . A class containing 18 values and 20 units wide has a density of , 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: . To find the class width when you know the frequency and the density, divide: .
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.
- Class width is a difference: for it is
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 holds 18 apples, so its density is . The class holds 12 apples, so its density is , which is lower even though 12 is a large count.
Add the frequencies to check the total before drawing. Here , 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 (g) | Frequency | Class width | Frequency density |
|---|---|---|---|
| 4 | 20 | ||
| 10 | 20 | ||
| 18 | 20 | ||
| 16 | 20 | ||
| 8 | 20 | ||
| 12 | 40 | ||
| 4 | 40 |
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
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 is 0.8 high and 20 grams wide, so it represents 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 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.2 | 20 | 4 |
| 0.9 | 20 | 18 |
| 0.3 | 40 | 12 |
| 0.1 | 40 | 4 |
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 , 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 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 the width is 2, and for 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. is exact; 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.
| Class | Width | Frequency | Frequency density |
|---|---|---|---|
| 0.5 | 6 | 12 | |
| 1.5 | 9 | 6 | |
| 2.5 | 5 | 2 |
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
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.
A table gives four classes with frequencies 4, 10, 18 and 16, all 20 units wide. The densities are , , and . Because the widths are equal the bars are in the same ratio as the frequencies, but the axis is still labelled frequency density.
The next class in the same table is , which is 40 units wide and holds 12 values. Its density is , 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.
On the finished histogram the bar for rises to 0.8 on the frequency density axis. The class is 20 grams wide, so the frequency is . The bar for rises to 0.3 and is 40 wide, giving . Reading the heights as 0.8 and 0.3 apples would be meaningless.
Adding the seven frequencies of the apple data gives , 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 histogram of 50 values has classes with density 0.8, with density 0.9, and with a density to be found. The first two classes hold and values, so 26 are accounted for. The last class holds 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.
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.
Mark scheme — tick each point you actually made
- B1not checked yet
Mark scheme — tick each point you actually made
- M1
- A1not checked yet
Mark scheme — tick each point you actually made
- M1
- M1
- M1
- A1not checked yet
Mark scheme — tick each point you actually made
- M1
- A1 and , in that ordernot checked yet
Mark scheme — tick each point you actually made
- B1
- B1
- B1
Mark scheme — tick each point you actually made
- M1
- M1
- A114not checked yet
Mark scheme — tick each point you actually made
- M1
- A1not checked yet
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
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.