Histograms
A histogram shows the shape of a large set of grouped, continuous data. It looks like a bar chart, but it works on a different principle: the area of each bar, not its height, represents the frequency. That is what lets classes have different widths without distorting the picture. Paper 5 almost always includes a histogram question, and the marks go on three things: the correct class boundaries, the correct frequency densities, and an accurately drawn diagram with labelled axes.
Why area, not height
Imagine people aged to and people aged to . If both bars had height , the wider bar would look four times as important, yet both classes hold the same number of people. The fix is to make the bar heights show how densely packed the data are: people over years is people per year, and people over years is people per year. Then area height width frequency, and the picture is honest.
The frequency density of a class is its frequency divided by its class width. In a histogram each bar is drawn between the class boundaries with height equal to the frequency density, so the area of each bar equals (or is proportional to) the class frequency.
Class boundaries
The bars of a histogram touch, so they must start and end at the class boundaries: the values where one class genuinely ends and the next begins. How you find them depends on how the data were recorded.
| How the data are recorded | Class written as | Boundaries | Width |
|---|---|---|---|
| Continuous, given with inequalities | and | ||
| Continuous, rounded to the nearest unit | – | and | |
| Discrete (whole numbers) | – | and | |
| Age in completed years | – | and | |
| Continuous, to d.p. | – | and |
The rule behind the table: the lower boundary is the smallest value that would be recorded in the class, and the upper boundary is where the next class starts. A length of recorded to the nearest cm becomes , so it falls in the class –; the boundary between "–" and "–" is therefore .
Age is the exception because people do not round their ages; they truncate. Someone who is years and months says they are , so "–" includes everyone up to (but not including) their th birthday.
The class width is upper boundary minus lower boundary, never the difference of the numbers written in the table: "–" has width , not .
The mid-point (class mark), used for estimating the mean, is halfway between the boundaries: for "–" rounded to the nearest unit it is ; for ages "–" it is .
Drawing a histogram
- Find the class boundaries and class widths.
- Calculate each frequency density, frequency width. Add columns for these to the table.
- Draw a horizontal axis with a continuous, uniform scale for the variable (label it with units) and a vertical axis labelled frequency density, with a uniform scale.
- Draw each bar between its class boundaries with height equal to its frequency density. Bars touch; there are no gaps (unless a class has frequency ).
- Check one bar: height width should give back the frequency.
Here is a histogram for the journey times of people.
| Time (minutes) | |||||
|---|---|---|---|---|---|
| Frequency | |||||
| Class width | |||||
| Frequency density |
Notice that the class with the largest frequency (, people) is not the tallest bar. The modal class is the class with the highest frequency density, here , because that is where the data are most concentrated.
Reading a histogram
Going backwards is just as common in exams: you are given the histogram (or the frequency densities) and asked for frequencies.
- The frequency of a class is its frequency density times its width.
- To estimate how many values lie in part of a class, assume the values are spread evenly through the class, and take the matching fraction of the bar's area: frequency density the width of the part you want.
If the histogram is drawn with a vertical axis that is not frequency density (for example the question says "the bar has height "), then area is only proportional to frequency. Find the constant from a bar whose frequency you know: frequency area.
Worked examples
The lengths of fish, measured to the nearest centimetre, are summarised.
| Length (cm) | – | – | – | – |
|---|---|---|---|---|
| Frequency |
Find the class boundaries and the frequency densities needed to draw a histogram.
Solution
Lengths are rounded to the nearest cm, so each class extends below and above the numbers written.
| Length (cm) | Boundaries | Width | Frequency | Frequency density |
|---|---|---|---|---|
| – | to | |||
| – | to | |||
| – | to | |||
| – | to |
The bars are drawn from to on the horizontal axis with these heights.
The numbers of words in sentences are grouped as –, –, – and –, with frequencies , , and . Find the frequency densities, and state the modal class.
Solution
Word counts are whole numbers, so the gaps between classes are bridged at the half-way points: boundaries , widths .
Frequency densities: , , , .
The modal class is – words (highest frequency density, ), even though – has the largest frequency.
The masses, kg, of suitcases are shown in a histogram. The frequency densities are:
| Mass (kg) | |||||
|---|---|---|---|---|---|
| Frequency density |
(a) Find . (b) Estimate the number of suitcases with mass more than . (c) Estimate the number with mass between and .
Solution
(a) Frequencies are density width: , , , . These total , so the last class has suitcases, and .
(b) From to : . Then all of the last two classes: . Estimate: suitcases.
(c) From to : . From to : . From to : . Estimate: suitcases.
These are estimates because we have assumed the masses are spread evenly within each class.
The masses grams of some objects are grouped as follows.
| Mass (g) | ||||
|---|---|---|---|---|
| Frequency |
In a histogram drawn on paper, the bar for is wide and high. Find the width and height of each of the other bars.
Solution
Widths. A class of width is drawn wide, so the scale is per gram. The other widths are , and .
Areas. The first bar has area for a frequency of , so represents objects, i.e. area frequency.
| Class | Frequency | Area () | Width (cm) | Height (cm) |
|---|---|---|---|---|
Check with frequency densities: per gram. The heights are exactly these, so the vertical scale is per unit of frequency density.
A histogram is drawn for values grouped as (frequency ), (frequency ), (frequency ) and (frequency ). The bars for the first and third classes have the same height. Find and and state the modal class.
Solution
Equal heights means equal frequency densities: , so .
Total: , so , and .
Frequency densities: , , , . The modal class is , though the class has the largest frequency.
Using frequency as bar height with unequal classes. This is the most heavily penalised histogram error; the whole diagram scores almost nothing. Always calculate frequency density, even if the classes look equal (check them; often one is not).
Wrong boundaries. Drawing "–" from to leaves gaps between bars and gives width . For rounded or discrete data, use to . For ages, use to .
Labelling the vertical axis "frequency". It must say "frequency density". An unlabelled or mislabelled axis loses a mark even when the bars are right.
- Show a table with boundaries, widths and frequency densities. This earns method marks even if the drawing is slightly off.
- Choose scales that use most of the graph paper and are easy to plot (e.g. for units). Awkward scales cause plotting errors.
- Bars must be accurate to within half a small square; use a sharp pencil and a ruler.
- A histogram's horizontal axis starts at the lowest boundary; do not draw an extra bar or a gap from unless the data start there.
- For any estimate from a histogram (part of a class, the median, the mean), say it is an estimate and why: values are assumed evenly spread within each class.
- Area represents frequency; height is frequency density frequency class width.
- Bars run between class boundaries and touch.
- Rounded continuous or discrete "–" gives boundaries and ; ages "–" give and ; "" gives and .
- Class width is the difference of the boundaries.
- Frequency density width; for part of a class, assume an even spread.
- The modal class has the highest frequency density, not necessarily the highest frequency.
- When the axis is not labelled in frequency density, frequency area; find from a known bar.
Practice questions
- Write down the class boundaries and class width for: (a) masses –, measured to the nearest ; (b) the number of goals, –; (c) ages – years; (d) .
- The heights of plants, measured to the nearest cm, are grouped as – ( plants), – (), – () and – (). Calculate the frequency densities.
- A histogram has bars for (height ), (height ), (height ) and (height ), where the heights are frequency densities. Find the total frequency.
- For the histogram in question 3, estimate how many values lie between and .
- Explain why, in question 3, the modal class is not the class with the largest frequency.
- The times of runners are grouped as (frequency ), (), (), (). In a histogram the bar for is wide and high. Find the width and height of the bar for .
- In a histogram of values, the classes are , , and . The first class has frequency . The second and third classes have the same frequency density, and the fourth class has frequency density . Find the frequencies of the second and third classes.
- The numbers of pages in books are grouped as – ( books), – (), – () and – (). Calculate the frequency densities, and estimate the number of books with more than pages.
Answers
-
(a) and , width . (b) Discrete: and , width . (c) Ages: and , width years. (d) and , width .
-
Boundaries ; widths . Frequency densities , , , .
-
Frequencies: , , , . Total .
-
From to : . From to : . Estimate , so about values.
-
The class has the largest frequency () but it is twice as wide as ; its values are spread over a wider interval. The modal class is the one where values are most concentrated, i.e. the highest frequency density: (density ).
-
Width: minutes is drawn as , so per minute; the class has width . Area: represents runners, so represents runners. runners need , so height .
-
Fourth class: . Let the common frequency density of classes 2 and 3 be ; their widths are and , so their frequencies are and . Then , so and . The frequencies are and . (Check: .)
-
Pages are discrete: boundaries ; widths . Frequency densities . "More than pages" means or more, i.e. from . From to : . Plus all in the last class. Estimate , about books.