Histograms with frequency density and box plots

A histogram has bars of different widths, so the height is frequency density, not frequency. A box plot summarises the middle half of the data between the quartiles.

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

Before you start

This page is easier if you are comfortable with:

What this topic covers

On a histogram the area is the frequency, so the height is frequency density. A box plot uses the five-number summary and the quartiles and interquartile range; unusual values are flagged by the outliers rule. Cumulative methods are on cumulative frequency.

Each part of this topic has its own page with the formula, worked examples and a solver: Outliers (rule of thumb), Frequency density (histograms), Quartiles and interquartile range, Moving average, Pie chart angle, Cumulative frequency: median and quartiles, Five-number summary (box plot).

Closely related topics: Averages and spread, Cumulative frequency, Regression and correlation, Probability distributions.

What is it used for?

Histograms show grouped data with area, and box plots summarise the quartiles and extremes. Both help you compare distributions quickly.

How to solve it

  1. Frequency density = frequency ÷ class width.
  2. The area of each bar is then the frequency.
  3. For a box plot find the minimum, lower quartile, median, upper quartile and maximum.
  4. Quartile positions here are (n+1)/4, (n+1)/2 and 3(n+1)/4.
  5. Outliers lie beyond 1.5 × IQR outside the quartiles.

Worked examples

The examples marked with a button were worked out by the solver on this page. You can try each one yourself.

Example 1: histogram 0-10: 5, 10-30: 12, 30-40: 8

Worked out by the solver on this page. Press the button to try it yourself.

Histogram Answer checked
Answer
Heights (frequency density): 0.5, 0.6, 0.8\text{Heights (frequency density): } 0.5,\ 0.6,\ 0.8
Histogram-505101520253035404500.20.40.60.8Histogramvaluefrequency densityGraph with x from -6 to 46 and y from -0.12 to 0.92. Shows bars (3).
  1. Frequency density = frequency ÷ class width
    In a histogram the AREA of a bar (not its height) shows the frequency.
  2. Work out each class
  3. Check: the bar areas add up to the total frequency

Example 2: histogram 0-5: 10, 5-10: 20

Worked out by the solver on this page. Press the button to try it yourself.

Histogram Answer checked
Answer
Heights (frequency density): 2, 4\text{Heights (frequency density): } 2,\ 4
Histogram024681001234Histogramvaluefrequency densityGraph with x from -1.5 to 11.5 and y from -0.6 to 4.6. Shows bars (2).
  1. Frequency density = frequency ÷ class width
    In a histogram the AREA of a bar (not its height) shows the frequency.
  2. Work out each class
  3. Check: the bar areas add up to the total frequency

Example 3: box plot of 3, 5, 8, 12, 15, 21

Worked out by the solver on this page. Press the button to try it yourself.

Box plot Answer checked
Answer
min 3, Q1=4.5, median 10, Q3=16.5, max 21\text{min } 3,\ Q_1 = 4.5,\ \text{median } 10,\ Q_3 = 16.5,\ \text{max } 21
Box plot24681012141618202200.20.40.60.811.21.41.61.82Box plotvalueGraph with x from 0.3 to 23.7 and y from 0 to 2. Shows a box plot from 3 to 21 with median 10.
  1. Put the values in order
  2. Five-number summary
    Quartile positions are , , , going between two values when the position is not whole.
  3. Interquartile range
  4. Outlier fences (1.5 × IQR rule)
    No values are outside the fences, so there are no outliers.
  5. Check: about a quarter, a half and three quarters of the values are at or below Q1, median, Q3

Example 4: box plot of 2, 4, 4, 5, 6, 7, 8, 9, 30

Worked out by the solver on this page. Press the button to try it yourself.

Box plot Answer checked
Answer
min 2, Q1=4, median 6, Q3=8.5, max 30\text{min } 2,\ Q_1 = 4,\ \text{median } 6,\ Q_3 = 8.5,\ \text{max } 30
Box plot05101520253000.20.40.60.811.21.41.61.82Box plotvalueGraph with x from -2.2 to 34.2 and y from 0 to 2. Shows a box plot from 2 to 9 with median 6; outliers (1).
  1. Put the values in order
  2. Five-number summary
    Quartile positions are , , , going between two values when the position is not whole.
  3. Interquartile range
  4. Outlier fences (1.5 × IQR rule)
    Values outside the fences are outliers: 30. The whiskers stop at the most extreme values inside the fences.
  5. Check: about a quarter, a half and three quarters of the values are at or below Q1, median, Q3

Special cases

A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.

Frequency density

12 in a class of width 20: 0.6

Frequency ÷ width.

Frequency from a bar

density 0.5, width 10: 5

Density × width.

IQR

Q1 = 5, Q3 = 15: 10

Q3 − Q1.

Outlier fence

Q3 + 1.5 IQR = 30

Above this is unusual.

Word problems

On a histogram, frequency density = frequency ÷ class width and area = frequency. A box plot shows minimum, Q1, median, Q3 and maximum.

Density

Class 10–30 has frequency 12.

  1. Width20
  2. Density12 ÷ 20 = 0.6
  3. Check: 0.6 × 20 = 12 ✓0.6

Frequency

A bar has density 0.5 and width 10.

  1. Frequency0.5 × 10
  2. Check: ✓5

Box plot Higher

Box plot of 3, 5, 8, 12, 15, 21: median.

  1. Middle two8 and 12
  2. Average10
  3. Check: ✓10

Outlier Higher

Data 2, 4, 4, 5, 6, 7, 8, 9, 30: Q3 = 8.5, Q1 = 4. Upper fence.

  1. IQR4.5
  2. Fence8.5 + 6.75
  3. Check: 30 is above 15.25, so an outlier ✓15.25

Common mistakes

Plotting frequency as the height

height = frequency ✗

height = frequency density ✓

Unequal widths.

Reading the area as the height

height 0.6 means 0.6 people ✗

area gives people ✓

Multiply by width.

Median not at the centre of the box

wrong ✗

any position ✓

The median can be off centre.

Whiskers always to the extremes

to the max ✗

to the largest non-outlier ✓

Plot outliers separately.

Exam tips

  1. Area = frequency.
  2. Density = frequency ÷ width.
  3. Box plot: five numbers.
  4. IQR = Q3 − Q1.
  5. Fences at 1.5 × IQR.

Practice questions

Try each one on paper, then open the answer. Use the solver above to see the full working.

1. Frequency density: frequency 18, width 6 Foundation

3

2. Frequency: density 2.5, width 4 Foundation

10

3. IQR: Q1 = 12, Q3 = 31 Foundation

19

4. Upper fence: Q3 = 20, IQR = 8 Higher

32

5. Median of 2, 4, 6, 8, 10 Higher

6

6. Range of 3, 9, 14, 22 Higher

19

Practice generator

Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.

Solve: …

Key terms

Histogram
A chart where area shows frequency.
Frequency density
Frequency per unit width.
Class width
Size of a group.
Box plot
Chart of the five-number summary.
Interquartile range
Q3 − Q1.
Outlier
An extreme value.

Frequently asked questions

What is frequency density?

Frequency divided by class width.

What does the area of a bar show?

The frequency.

What does a box plot show?

The minimum, Q1, median, Q3 and maximum.

Which page covers frequency density?

frequency density.

Which page covers the five-number summary?

five-number summary.

Which page covers outliers?

outliers.

More in Statistics and the formula sheets.