Skip to content

Histograms and frequency density

A histogram displays grouped continuous data. Its defining rule is

frequency is proportional to bar area.\boxed{\text{frequency is proportional to bar area}.}

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:

frequency density=frequencyclass width.\boxed{\text{frequency density}=\frac{\text{frequency}}{\text{class width}}.}

Equivalently,

frequency=class width×frequency density.\boxed{\text{frequency}=\text{class width}\times\text{frequency density}.}

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 20x<3020\leq x<30.

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.

These diagrams are not interchangeable.

FeatureBar chartHistogram
Typical dataqualitative or discretegrouped continuous
Horizontal axiscategoriescontinuous numerical scale
Gaps between barsusually presentabsent between adjacent classes
Frequency represented byheightarea
Vertical axisfrequency, relative frequency or percentageusually 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.

For a class ax<ba\leq x<b,

class width=ba.\text{class width}=b-a.

The units help explain frequency density. If frequency is a count and time is measured in seconds, then

observationsseconds\frac{\text{observations}}{\text{seconds}}

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.

The times tt, in minutes, taken by 6060 students to complete a task are grouped below.

Time, ttFrequency, ffClass widthFrequency density, f/wf/w
0t<100\leq t<108810100.80.8
10t<1510\leq t<1599551.81.8
15t<2515\leq t<25242410102.42.4
25t<4025\leq t<40151515151.01.0
40t<6040\leq t<604420200.20.2

For the class 10t<1510\leq t<15,

frequency density=95=1.8.\text{frequency density}=\frac95=1.8.

For 25t<4025\leq t<40,

frequency density=1515=1.\text{frequency density}=\frac{15}{15}=1.

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

15×1=15,15\times1=15,

equal to its frequency. The first area is 5×1.8=95\times1.8=9.

A class 32x<4432\leq x<44 has frequency 3030. Find its class width and frequency density.

Answer

The width is

4432=12.44-32=12.

Therefore

frequency density=3012=2.5.\text{frequency density}=\frac{30}{12}=2.5.

Use this reliable procedure.

  1. Write every class using its continuous boundaries.
  2. Calculate each class width.
  3. Calculate f/wf/w for every class.
  4. Draw the horizontal axis to scale and mark the class boundaries.
  5. Label the vertical axis frequency density and choose a suitable scale.
  6. Draw touching rectangles across the exact intervals at the calculated heights.

For Worked example 1, the first rectangle runs from 00 to 1010 and has height 0.80.8. The second runs from 1010 to 1515 and has height 1.81.8. Do not give every class the same drawn width: a width of 55 minutes must occupy half the horizontal distance of a width of 1010 minutes.

If lengths are measured to the nearest centimetre, the labelled group 1010 to 1414 has continuous boundaries

9.5x<14.5,9.5\leq x<14.5,

so its width is 55, not 44. Adjacent groups 1010 to 1414 and 1515 to 1919 meet at 14.514.5 and leave no gap.

If the table already states 10x<1510\leq x<15, 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, kgFrequency
5050 to 545466
5555 to 64642020
6565 to 79791818

The continuous intervals and densities are:

Continuous classWidthFrequency density
49.5m<54.549.5\leq m<54.5556/5=1.26/5=1.2
54.5m<64.554.5\leq m<64.5101020/10=2.020/10=2.0
64.5m<79.564.5\leq m<79.5151518/15=1.218/15=1.2

The first and third bars have equal height but different areas. Their frequencies are 66 and 1818 because the third bar is three times as wide.

If frequency density is labelled, recover a class frequency directly:

f=w×d.f=w\times d.

A histogram bar covers 12x<2012\leq x<20 and has frequency density 3.53.5. Its width is

2012=8,20-12=8,

so its frequency is

f=8×3.5=28.f=8\times3.5=28.

If a second bar covers 20x<3520\leq x<35 at density 1.61.6, its frequency is

(3520)×1.6=24.(35-20)\times1.6=24.

The first bar is both taller and larger in area, so it has the greater frequency.

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 f0f_0, drawn width w0w_0 and drawn height h0h_0, then its drawn area w0h0w_0h_0 represents f0f_0. For another bar,

ff0=whw0h0.\frac{f}{f_0}=\frac{wh}{w_0h_0}.

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.

On a histogram with no labelled vertical scale:

  • class 0x<100\leq x<10 has frequency 1818 and drawn height 33 cm;
  • class 10x<2510\leq x<25 has drawn height 22 cm;
  • horizontal lengths are drawn in proportion to the true class widths.

The drawn areas are proportional to

A1=10×3=30A_1=10\times3=30

and

A2=15×2=30.A_2=15\times2=30.

The areas are equal, so the frequencies are equal. The second frequency is therefore

18.\boxed{18}.

Notice that the second bar is lower but wider.

A histogram has no vertical scale. A class of width 44 has drawn height 66 cm and frequency 1212. Another class has width 1010 and drawn height 33 cm. Find its frequency.

Answer

The area ratio is

10×34×6=3024=54.\frac{10\times3}{4\times6}=\frac{30}{24}=\frac54.

Hence the second frequency is

12×54=15.12\times\frac54=15.

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:

estimated frequency in part=width of partclass width×class frequency.\text{estimated frequency in part} =\frac{\text{width of part}}{\text{class width}}\times\text{class frequency}.

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 20t<3520\leq t<35 has frequency density 2.42.4. Estimate how many observations satisfy 20t<2820\leq t<28.

The required interval has width

2820=8.28-20=8.

Its area is

8×2.4=19.2.8\times2.4=19.2.

So the histogram estimate is about 1919 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

15×2.4=36,15\times2.4=36,

and the required fraction is 8/158/15, giving

815×36=19.2.\frac8{15}\times36=19.2.

Worked example 6: combine complete and partial classes

Section titled “Worked example 6: combine complete and partial classes”

A histogram represents 8080 journey times. The relevant bars are:

Time, ttFrequency density
10t<2010\leq t<201.51.5
20t<3020\leq t<303.23.2
30t<5030\leq t<501.11.1

Estimate the number of journeys with 15t<3815\leq t<38.

Split the interval at class boundaries:

[15,20),[20,30),[30,38).[15,20),\qquad [20,30),\qquad [30,38).

The corresponding areas are

(2015)(1.5)=7.5,(3020)(3.2)=32,(3830)(1.1)=8.8.\begin{aligned} (20-15)(1.5)&=7.5,\\ (30-20)(3.2)&=32,\\ (38-30)(1.1)&=8.8. \end{aligned}

Therefore the estimate is

7.5+32+8.8=48.3,7.5+32+8.8=48.3,

or about 4848 journeys.

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, 15t<2515\leq t<25 is the modal class because its density 2.42.4 is the largest. It also happens to have the greatest frequency, but that need not occur.

Class A has width 55 and frequency 1818. Class B has width 1212 and frequency 3030.

  1. Which class has the greater frequency?
  2. Which class produces the taller histogram bar?
Answer
  1. Class B has the greater frequency because 30>1830>18.
  2. The densities are
dA=185=3.6,dB=3012=2.5.d_A=\frac{18}{5}=3.6, \qquad d_B=\frac{30}{12}=2.5.

Therefore Class A produces the taller bar and is the modal class of these two.

MisconceptionCorrection
Height always equals frequencyArea represents frequency; height is usually frequency density.
Class width is the number of integer labelsWidth is upper boundary minus lower boundary.
A class 1010 to 1919 has width 99For whole-number rounded data its boundaries are 9.59.5 and 19.519.5, so its width is 1010.
The tallest bar has the greatest frequencyIt has the greatest density. Compare areas for frequencies.
Every estimate from a histogram is exactEstimates inside a class assume an even spread.
Bars may be equally wide for convenienceTheir horizontal widths must follow the numerical scale.

Before accepting a histogram calculation, ask:

  1. Have I used continuous class boundaries?
  2. Did I calculate width as upper boundary minus lower boundary?
  3. Am I comparing heights or areas for the quantity asked?
  4. If I split a class, have I stated or recognised the uniformity assumption?
  5. Are all axes and units labelled?

The identity

f=wd\boxed{f=wd}

is the central check. If any two of frequency ff, class width ww and frequency density dd are known, the third follows.

The lifetimes xx, in hours, of 100100 components are summarised by a histogram.

Lifetime, xxFrequency density
0x<200\leq x<200.60.6
20x<5020\leq x<501.41.4
50x<7050\leq x<701.81.8
70x<9070\leq x<90unknown
  1. Find the frequencies in the first three classes.
  2. Find the frequency density for 70x<9070\leq x<90.
  3. State the modal class.
  4. Estimate how many components lasted between 3535 and 6060 hours.
Answer
  1. Using f=wdf=wd:
f1=20(0.6)=12,f2=30(1.4)=42,f3=20(1.8)=36.\begin{aligned} f_1&=20(0.6)=12,\\ f_2&=30(1.4)=42,\\ f_3&=20(1.8)=36. \end{aligned}
  1. The first three frequencies total
12+42+36=90.12+42+36=90.

The final frequency is 10090=10100-90=10. Its width is 2020, so

d=1020=0.5.d=\frac{10}{20}=0.5.
  1. The greatest density is 1.81.8, so the modal class is
50x<70.50\leq x<70.
  1. From 3535 to 5050, the width is 1515 and density is 1.41.4. From 5050 to 6060, the width is 1010 and density is 1.81.8. Hence
15(1.4)+10(1.8)=21+18=39.15(1.4)+10(1.8)=21+18=39.

The estimate is 3939 components.