6.1 - Histograms and frequency density

6.1 - Histograms and frequency density

Learn to construct and interpret histograms for continuous measurements with unequal class widths. You will use bar areas to recover frequencies and explain when a count is only an estimate.

Class widths and frequency density (Higher)

Can the tallest bar contain fewer pupils than a shorter bar? A waiting-time table will show why this can happen.

You already know

Rectangle area is width multiplied by height. A categorical bar chart uses separate equal-width bars; a histogram uses the actual numerical widths of measurement intervals.

A continuous variable, such as time or mass, can take values between recorded measurements. A class interval groups values between two boundaries. Its width is upper boundary minus lower boundary. For 20<t≤4020<t\leq40, the width is 40−20=2040-20=20, not a count of written integers.

Frequency density

Frequency per unit of the measured variable. In a histogram, frequency density is bar height and frequency is bar area.

If height were frequency, a class twice as wide would gain twice the area for no extra observations. Dividing frequency by width prevents that distortion.

Histogram area

frequency density=frequencyclass width\text{frequency density}=\frac{\text{frequency}}{\text{class width}} frequency=class width×frequency density\text{frequency}=\text{class width}\times\text{frequency density}

Not in the Higher formulae sheet: learn these relationships. Histograms are Higher content.

Start with the widths before calculating heights. Density and frequency answer different questions.

Worked example 1: turn frequencies into heights

Question. Find the histogram heights for these waiting times of 100100 pupils.

Time tt in minutesFrequency
0<t≤100<t\leq101010
10<t≤2010<t\leq203030
20<t≤4020<t\leq404040
40<t≤6040<t\leq602020

Plan. Divide each frequency by its own class width.

10÷(10−0)=1first class30÷(20−10)=3second class40÷(40−20)=2third class20÷(60−40)=1fourth class\begin{aligned} 10\div(10-0)&=1 &&\text{first class}\\ 30\div(20-10)&=3 &&\text{second class}\\ 40\div(40-20)&=2 &&\text{third class}\\ 20\div(60-40)&=1 &&\text{fourth class} \end{aligned}

Why use different divisors? The last two classes are twice as wide as the first two.

Answer. The heights are 1,3,2,11,3,2,1 pupils per minute. The tallest bar has 3030 pupils, fewer than the third bar's 4040.

Check. Width times height recovers 10,30,40,2010,30,40,20, totalling 100100.

Change only the third frequency from 4040 to 6060. Its interval stays 2020 minutes wide.

Worked example 2: change a frequency

Question. Find the changed height and compare the second and third bars.

Plan. Recalculate only the changed class's density.

third density=60÷20=3same width, new countsecond area=10×3=30recover its frequencythird area=20×3=60recover its frequency\begin{aligned} \text{third density}&=60\div20=3 &&\text{same width, new count}\\ \text{second area}&=10\times3=30 &&\text{recover its frequency}\\ \text{third area}&=20\times3=60 &&\text{recover its frequency} \end{aligned}

Why can equal heights hide different counts? Their widths, and therefore their areas, differ.

Answer. Both bars have height 33, but the third contains twice as many pupils.

Check. The new total is 10+30+60+20=12010+30+60+20=120, which is 2020 above the original total.

This is a useful surprise: equal height means equal density, not equal frequency. Area resolves the opening puzzle.

Watch out

The line third height=40\text{third height}=40 uses frequency as height. Correct it to 40÷20=240\div20=2. Unequal widths require frequency density.

A tall narrow bar may contain fewer observations than a shorter wide bar. Calculate before deciding.

Constructing a histogram (Higher)

Construct each rectangle over its actual class interval, using a uniform scale on each axis.

The horizontal axis shows the variable and its unit. The vertical axis shows frequency density. Adjacent classes touch at their shared boundary; do not give every class the same drawn width. A zero-frequency interval has zero height. Draw accurate vertical sides and horizontal tops.

Worked example 3: draw the waiting-time histogram

Question. Construct the histogram for the original waiting-time table.

Plan. Mark boundaries on the horizontal scale, then draw the calculated heights.

boundaries:0,10,20,40,60actual timeswidths:10,10,20,20successive differencesheights:1,3,2,1frequency divided by width\begin{aligned} \text{boundaries}&:0,10,20,40,60 &&\text{actual times}\\ \text{widths}&:10,10,20,20 &&\text{successive differences}\\ \text{heights}&:1,3,2,1 &&\text{frequency divided by width} \end{aligned}

Why are the last two rectangles wider? Each covers 2020 minutes rather than 1010.

Answer. Draw the four touching rectangles shown below, with labelled axes.

[DIAGRAM: asset_slug: m087_histogram; caption: Waiting-time histogram with unequal widths and frequency-density heights of 1, 3, 2 and 1; description: Boundaries 0, 10, 20, 40 and 60 minutes with rectangle areas 10, 30, 40 and 20 pupils; file: m087_histogram.png; recommended_method: matplotlib]
Waiting-time histogram with unequal widths and frequency-density heights of 1, 3, 2 and 1

Check. The first and last have equal heights but areas 1010 and 2020, matching their different frequencies.

Change only the final boundary from 6060 to 8080 minutes, keeping all four frequencies fixed. Only one width and its corresponding density change.

Worked example 4: widen the final class

Question. Redraw the waiting-time histogram with final class 40<t≤8040<t\leq80, still containing 2020 pupils.

Plan. Keep the first three bars and recalculate the last width and height.

last width=80−40=40new upper boundarylast density=20÷40=0.5same frequencyheights:1,3,2,0.5earlier bars unchanged\begin{aligned} \text{last width}&=80-40=40 &&\text{new upper boundary}\\ \text{last density}&=20\div40=0.5 &&\text{same frequency}\\ \text{heights}&:1,3,2,0.5 &&\text{earlier bars unchanged} \end{aligned}

Why does widening make this bar shorter? Its area must still represent the same 2020 pupils.

Answer. Draw the final bar from 4040 to 8080 with height 0.50.5; retain the other three bars.

[DIAGRAM: asset_slug: m087_wider_last; caption: The same waiting frequencies with only the final class widened; description: The first three rectangles are unchanged and the last extends from forty to eighty minutes with density zero point five, preserving its frequency of twenty; file: m087_wider_last.png; recommended_method: matplotlib]
The same waiting frequencies with only the final class widened

Check. The final area is 40×0.5=2040\times0.5=20; all four areas still total 100100.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account