11.3 Diagrams for single-variable data and the histogram — Learn
Prerequisites: reading a table, finding a fraction of a total, and drawing and reading axes at GCSE.
By the end of this section you can: choose a diagram for single-variable data; explain why the area of a histogram bar represents frequency; calculate a frequency density; and use a histogram to find a frequency or a probability.
1. Diagrams for discrete and categorical data
A bar chart shows the frequency of each category. The bars have gaps between them, and the height of each bar is the frequency. A bar chart is used for categories, such as eye colour, or for discrete values, such as the number of siblings.
A pie chart shows each category as a share of a whole. The angle of each sector is
A pictogram uses a symbol to stand for a number of items. Each symbol must have a key.
For these diagrams, the frequency is read from the height, the angle or the number of symbols.
2. Grouped continuous data and the histogram
Continuous data, such as time or mass, are grouped into classes. A histogram shows grouped continuous data. Its bars have no gaps, because the variable passes smoothly from one class to the next.
The important difference from a bar chart is this: the area of a bar represents the frequency, not its height. When the classes all have the same width, the heights are proportional to the frequencies, so a histogram looks like a bar chart. When the classes have different widths, the heights alone mislead.
The height of a bar is called the frequency density:
So the frequency of a class is
3. Completing a frequency table
Example 1. The table shows some grouped data. Complete the frequency density column.
| Class | Class width | Frequency | Frequency density |
|---|---|---|---|
| – | 10 | 20 | 2 |
| – | 10 | 35 | 3.5 |
| – | 20 | 30 | 1.5 |
For the first row, . For the second, . For the third, .
Notice that the third class has a larger frequency than the first, but a smaller frequency density, because the class is twice as wide.
4. Finding a frequency from a histogram
Example 2. A histogram has frequency density for the class –. How many values lie between and ?
Example 3. The same histogram has frequency density for the class –. How many values lie between and ?
The part of the class from to has width , so
The area over part of a bar gives the frequency in that part.
5. Estimating a probability from a histogram
A histogram of a sample can be used to estimate probabilities. The probability that a value lies in a class is the frequency in that class divided by the total frequency.
Example 4. A histogram of 200 values has frequency density in the class –. Estimate the probability that a value lies in that class.
The frequency is
So the probability is
This is an estimate from the sample, and it connects the histogram to the probability distributions of Chapter 13.
6. Comparing distributions
Two distributions can be compared using their histograms. Describe:
- the centre, or where the data cluster;
- the spread, or how far the data reach;
- the shape, such as symmetric or skewed, and any gaps or peaks;
- any outliers, which stand apart from the rest.
A distribution with a long tail on the right is positively skewed. Waiting times are often positively skewed, because most waits are short and a few are long.
7. Try it: why the area matters
Predict first. The figure draws a histogram of the same 60 values with different class widths. Before you move the control, predict what happens to the bar heights when the class width doubles. Write down whether the total area of all the bars will change.
Test. Change the class width and watch the bars. Read the total frequency each time.
Explain. Write two sentences. The first explains why the bars become shorter when the classes become wider. The second explains why the total area stays the same.
Watch out. Three mistakes are common.
Reading histogram bar heights as frequencies. The height is a frequency density. Multiply it by the class width to get the frequency.
Leaving gaps between histogram bars. A histogram has no gaps, because the variable is continuous. Gaps belong on a bar chart.
Using the frequency as the height when class widths differ. This makes a wide class look far more common than it is. The area, not the height, is the frequency.
Re-check: multiply every frequency density by its class width and add the results. The total must equal the number of values in the data set.
You should now be able to
- choose a bar chart, pie chart or histogram for a data set;
- calculate a frequency density and complete a grouped frequency table;
- find a frequency, or a probability, from a histogram;
- explain why the area of a histogram bar represents frequency;
- describe and compare distributions using centre, spread, shape and outliers.