Histograms

Histograms

IB MYP Maths Extended: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • A histogram shows continuous data in classes with no gaps; classes can have unequal widths.
  • The area of each bar is the frequency, so the height is the frequency density.
  • Frequency density =frequencyclass width=\frac{\text{frequency}}{\text{class width}}; frequency == density ×\times width.
  • The tallest bar has the greatest frequency density, not always the greatest frequency.
  • For part of a class, assume the data are evenly spread and give an estimate.

Why the area matters

With unequal class widths, height alone would make wide classes look too big, so area stands for frequency.

A histogram shows continuous data (such as time, mass or age) in classes. There are no gaps between the bars. Unlike a bar chart, a histogram can have classes of unequal width.

When the widths are unequal, the height of the bar cannot be the frequency. Instead, the area of each bar represents the frequency, and the height is the frequency density.

0204060802.43.54.21.5Class 1 (width 10)Class 2 (width 10)Class 3 (width 20)Class 4 (width 30)ClassValue
  • Frequency
  • Frequency density
The same four classes: frequency and frequency density differ because the classes have different widths.
  • Frequencyfrequency density ×\times class width

Worked example

A bar has height (frequency density) 2.52.5 and class width 66. Find the frequency.

A class has frequency density 2.52.5 and width 66. What is its frequency?

Frequency density

Divide the frequency by the class width.

Example: 21 customers waited between 2 and 5 minutes. The class width is 5−2=35-2=3, so the frequency density is 213=7\frac{21}{3}=7.

Add a column for the class width and another for the frequency density to your table. The tallest bar has the greatest frequency density, which is not always the greatest frequency: a class with frequency 30 and width 5 has density 6, lower than the density 7 of a class with frequency 21 and width 3.

051015202530Frequency 21, width 3Frequency 30, width 5ClassValue
  • Frequency
  • Frequency density
Frequency 30 over width 5 has density 6; frequency 21 over width 3 has density 7. The taller bar is not the larger frequency.
  • Frequency densityfrequencyclass width\dfrac{\text{frequency}}{\text{class width}}

Worked example

21 customers waited between 22 and 55 minutes. Find the frequency density.

A class has frequency 1818 and width 44. What is its frequency density?

Drawing a histogram

Tabulate the class widths, work out the frequency densities and draw touching bars of that height.

Classes 0<t≤20<t\le2, 2<t≤52<t\le5, 5<t≤105<t\le10, 10<t≤2010<t\le20 with frequencies 8,21,30,118,21,30,11 have frequency densities 4,7,6,1.14,7,6,1.1.

Draw a continuous horizontal axis with a scale and a vertical axis labelled frequency density. Each bar runs from its lower class boundary to its upper boundary, and the bars touch. Add a title and label the axes with units.

FD = 4FD = 7FD = 6FD = 1.1b0b2b5b10b20a0a1c0c1d0d1e0e1
Histogram: the area of each bar is the frequency (8, 21, 30, 11)

Frequency

0<t≤2:
8
2<t≤5:
21
5<t≤10:
30
10<t≤20:
11

Width

0<t≤2:
2
2<t≤5:
3
5<t≤10:
5
10<t≤20:
10

Frequency density

0<t≤2:
4
2<t≤5:
7
5<t≤10:
6
10<t≤20:
1.1

A class 0<t≤20<t\le2 has frequency 88. What height is its bar?

Reading a histogram

Multiply each bar height by its width.

To find the frequency of a class, multiply its bar height by its width.

The total of all the frequencies is the number of items in the data set, which you can use to check your work: here 24+35+84+45=18824+35+84+45=188.

01234Class 1 (width 10)Class 2 (width 10)Class 3 (width 20)Class 4 (width 30)ClassFrequency density
Bar heights are frequency densities. Multiply each by its width to find the frequency: 24, 35, 84, 45.

Frequency density

Bar 1:
2.4
Bar 2:
3.5
Bar 3:
4.2
Bar 4:
1.5

Width

Bar 1:
10
Bar 2:
10
Bar 3:
20
Bar 4:
30

Frequency

Bar 1:
24
Bar 2:
35
Bar 3:
84
Bar 4:
45

A bar has height 3.53.5 and width 1010. What is the frequency?

Estimating from part of a class

Assume the data are evenly spread across the class, so the part you want is in proportion to its width.

Sometimes a question covers only part of a class. Assume the data is evenly spread across the class, then take the matching fraction of its frequency.

The class 20≤a<4020\le a<40 has frequency 8484. The number aged 20 to 30 is 1020×84=42\frac{10}{20}\times84=42. Add the whole classes below: 24+35+42=10124+35+42=101.

Say your answer is an estimate, because the real spread inside a class is not known.

2022242628303234363840203040
The shaded half of the class 20 to 40 holds half of its 84 values

Worked example

The class 20≤a<4020\le a<40 has frequency 8484 and the classes below it have frequencies 2424 and 3535. Estimate the number aged under 3030.

A class 10≤x<3010\le x<30 has frequency 6060. Estimate the number with 10≤x<1510\le x<15.

Try an exam question

A histogram has a bar for the class 10<t≤3010<t\le30 with frequency density 1.81.8. (a) Find the frequency of this class. (b) Another class 30<t≤4030<t\le40 has frequency 2727. Find the height of its bar.

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

What is the frequency density of the class 2<t≤52<t\le5?

1 mark, marked against the mark scheme

Revision notes