Histograms and frequency density
A histogram displays grouped continuous data. Its defining rule is
This matters whenever class widths differ. A class covering twice as much of the horizontal axis has twice the area at the same height, so bar height cannot simply be frequency. Instead, the vertical axis usually shows frequency density:
Equivalently,
Prerequisites
Section titled “Prerequisites”You should be able to:
- interpret grouped continuous data and class boundaries;
- calculate the width of an interval;
- find the area of a rectangle;
- use inequalities such as .
Review presenting and interpreting data if class intervals or frequency tables are unfamiliar. Histograms are then used to estimate quantities in averages and measures of spread.
Histogram or bar chart?
Section titled “Histogram or bar chart?”These diagrams are not interchangeable.
| Feature | Bar chart | Histogram |
|---|---|---|
| Typical data | qualitative or discrete | grouped continuous |
| Horizontal axis | categories | continuous numerical scale |
| Gaps between bars | usually present | absent between adjacent classes |
| Frequency represented by | height | area |
| Vertical axis | frequency, relative frequency or percentage | usually frequency density |
Touching bars alone do not make a histogram. The horizontal scale must encode numerical class widths, and each bar’s area must represent its frequency.
Class width and frequency density
Section titled “Class width and frequency density”For a class ,
The units help explain frequency density. If frequency is a count and time is measured in seconds, then
is a density of observations along the time axis. It is not a physical rate of events happening each second. It is only the scale needed to make area equal frequency.
Worked example 1: calculate densities
Section titled “Worked example 1: calculate densities”The times , in minutes, taken by students to complete a task are grouped below.
| Time, | Frequency, | Class width | Frequency density, |
|---|---|---|---|
For the class ,
For ,
Although the second of these classes contains more students, its bar is lower because those students are spread across a wider interval. Its area is still
equal to its frequency. The first area is .
Self-check 1
Section titled “Self-check 1”A class has frequency . Find its class width and frequency density.
Answer
The width is
Therefore
Constructing a histogram
Section titled “Constructing a histogram”Use this reliable procedure.
- Write every class using its continuous boundaries.
- Calculate each class width.
- Calculate for every class.
- Draw the horizontal axis to scale and mark the class boundaries.
- Label the vertical axis frequency density and choose a suitable scale.
- Draw touching rectangles across the exact intervals at the calculated heights.
For Worked example 1, the first rectangle runs from to and has height . The second runs from to and has height . Do not give every class the same drawn width: a width of minutes must occupy half the horizontal distance of a width of minutes.
Rounded measurements and class boundaries
Section titled “Rounded measurements and class boundaries”If lengths are measured to the nearest centimetre, the labelled group to has continuous boundaries
so its width is , not . Adjacent groups to and to meet at and leave no gap.
If the table already states , its boundaries are explicit. Do not adjust them again.
Worked example 2: boundaries from rounded data
Section titled “Worked example 2: boundaries from rounded data”Masses are recorded to the nearest kilogram.
| Recorded mass, kg | Frequency |
|---|---|
| to | |
| to | |
| to |
The continuous intervals and densities are:
| Continuous class | Width | Frequency density |
|---|---|---|
The first and third bars have equal height but different areas. Their frequencies are and because the third bar is three times as wide.
Reading frequencies from a histogram
Section titled “Reading frequencies from a histogram”If frequency density is labelled, recover a class frequency directly:
Worked example 3: recover a frequency
Section titled “Worked example 3: recover a frequency”A histogram bar covers and has frequency density . Its width is
so its frequency is
If a second bar covers at density , its frequency is
The first bar is both taller and larger in area, so it has the greater frequency.
When the vertical scale is missing
Section titled “When the vertical scale is missing”Sometimes a histogram gives one known frequency but no numerical density scale. Areas are still proportional to frequencies. A known bar calibrates the diagram.
If a known class has frequency , drawn width and drawn height , then its drawn area represents . For another bar,
You may instead use the known class to find the scale factor between a measured diagram height and frequency density. Be consistent with the actual horizontal scale.
Worked example 4: use area ratios
Section titled “Worked example 4: use area ratios”On a histogram with no labelled vertical scale:
- class has frequency and drawn height cm;
- class has drawn height cm;
- horizontal lengths are drawn in proportion to the true class widths.
The drawn areas are proportional to
and
The areas are equal, so the frequencies are equal. The second frequency is therefore
Notice that the second bar is lower but wider.
Self-check 2
Section titled “Self-check 2”A histogram has no vertical scale. A class of width has drawn height cm and frequency . Another class has width and drawn height cm. Find its frequency.
Answer
The area ratio is
Hence the second frequency is
Estimating frequencies within a class
Section titled “Estimating frequencies within a class”A histogram preserves the class totals, not the exact positions of observations inside each class. To estimate a frequency in part of a bar, assume observations are distributed evenly through that class. The estimate is proportional to horizontal width:
This is the same as finding the relevant part of the bar’s area.
Worked example 5: estimate from part of a bar
Section titled “Worked example 5: estimate from part of a bar”The class has frequency density . Estimate how many observations satisfy .
The required interval has width
Its area is
So the histogram estimate is about observations.
The non-integer intermediate result is acceptable because this is an estimate based on an even spread. The actual count must be a whole number, but the grouped data do not reveal it.
Alternatively, the whole class has estimated frequency
and the required fraction is , giving
Worked example 6: combine complete and partial classes
Section titled “Worked example 6: combine complete and partial classes”A histogram represents journey times. The relevant bars are:
| Time, | Frequency density |
|---|---|
Estimate the number of journeys with .
Split the interval at class boundaries:
The corresponding areas are
Therefore the estimate is
or about journeys.
Shape and the modal class
Section titled “Shape and the modal class”The distribution’s shape can be described as symmetric, positively skewed, negatively skewed, unimodal or bimodal. Interpret this cautiously because grouping can hide detail.
For unequal class widths, the modal class is the class with the greatest frequency density, not necessarily the greatest frequency. It is the interval with the greatest concentration of observations per unit width.
In Worked example 1, is the modal class because its density is the largest. It also happens to have the greatest frequency, but that need not occur.
Self-check 3
Section titled “Self-check 3”Class A has width and frequency . Class B has width and frequency .
- Which class has the greater frequency?
- Which class produces the taller histogram bar?
Answer
- Class B has the greater frequency because .
- The densities are
Therefore Class A produces the taller bar and is the modal class of these two.
Common misconceptions
Section titled “Common misconceptions”| Misconception | Correction |
|---|---|
| Height always equals frequency | Area represents frequency; height is usually frequency density. |
| Class width is the number of integer labels | Width is upper boundary minus lower boundary. |
| A class to has width | For whole-number rounded data its boundaries are and , so its width is . |
| The tallest bar has the greatest frequency | It has the greatest density. Compare areas for frequencies. |
| Every estimate from a histogram is exact | Estimates inside a class assume an even spread. |
| Bars may be equally wide for convenience | Their horizontal widths must follow the numerical scale. |
Exam method
Section titled “Exam method”Before accepting a histogram calculation, ask:
- Have I used continuous class boundaries?
- Did I calculate width as upper boundary minus lower boundary?
- Am I comparing heights or areas for the quantity asked?
- If I split a class, have I stated or recognised the uniformity assumption?
- Are all axes and units labelled?
The identity
is the central check. If any two of frequency , class width and frequency density are known, the third follows.
Mixed self-check
Section titled “Mixed self-check”The lifetimes , in hours, of components are summarised by a histogram.
| Lifetime, | Frequency density |
|---|---|
| unknown |
- Find the frequencies in the first three classes.
- Find the frequency density for .
- State the modal class.
- Estimate how many components lasted between and hours.
Answer
- Using :
- The first three frequencies total
The final frequency is . Its width is , so
- The greatest density is , so the modal class is
- From to , the width is and density is . From to , the width is and density is . Hence
The estimate is components.
Next steps
Section titled “Next steps”- Use class midpoints to estimate grouped means and standard deviations in averages and measures of spread.
- Compare distribution shape, centre and spread in presenting and interpreting data.
- Learn how unusual values affect summaries in outliers and cleaning data.
- Apply statistical summaries to paired variables in correlation and regression.