Frequency tables for discrete and continuous values
Frequency tables often arise in official statistics and are often displayed in bar and pie charts. A frequency table counts the number of members from some 'population' (people, households, businesses, ...) categorised in some way. This grouping of individuals can be one of the following:
Note that we are describing the types of value that are counted here, not the frequencies themselves which are always whole numbers.
Female prisoners in New Zealand
The following three frequency tables describe characteristics of the 262 females in New Zealand prisons in a prison census that was conducted on 20th November 2003.
Categorical | Discrete | Continuous | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Major offence | Frequency | Previous periods in custody | Frequency | Age | Frequency | ||||||||
|
|
|
|
|
|
||||||||
Total | 262 |
Total | 262 |
Total | 262 |
The offence type is categorical. The number of previous periods in custody is a discrete numerical value (though it has been presented in the frequency table with some grouping of the values). However the ages of the prisoners are continuous — it is conventional to report ages in whole years, but an age of "20" means any age from 20 until just under 21.
Histograms for continuous measurements
Bar charts and pie charts are commonly used to display frequency tables for categorical and discrete values. However a simple bar chart can be misleading for a frequency table describing a continuous numerical measurement. A modified type of bar chart called a histogram should be used in preference.
A histogram is similar to a bar chart, but:
These issues are explained most clearly in an example.
Ages of New Zealand cars in 2006
Each year, Land Transport New Zealand publishes a frequency table describing the age distribution of cars that have been registered. The following is an extract from the table. Note that the ages are grouped into classes for the oldest cars. (Although the top class is '51 and over', we will treat it as '51-60' for the purpose of this illustration.)
Age in whole years | Frequency | ||
---|---|---|---|
|
|
||
Total | 2,726,403 |
The diagram below represents the data with a bar (rectangle) for each class. Initially the bar heights equal the frequencies of the classes.
This bar chart adequately describes the cars aged 40 and younger, but it gives the misleading impression of a bulge in ownership of cars aged 41 and over because the classes are wider. To see what has happened, click the checkbox Group ages 0-4 to combine the first five classes. If the height of the bar for this combined class is its frequency, then it becomes almost 5 times as high as before.
The solution is to divide the total frequency for the combined class by the number of years, so the height is the average frequency per year instead of the raw frequency. Click Correct diagram to do this. Now the visual appearance remains roughly the same when classes are combined.