Data Representation

Three graphs that turn a table of numbers into a picture you can read at a glance: the histogram, the cumulative frequency curve, and the box-and-whisker plot.

MYP 4Extended MathsStatistics~10 min read

Histograms and frequency density

A histogram looks like a bar chart, but it is built for grouped continuous data and the two are not the same thing. In a bar chart the height tells you the frequency and the bars have gaps. In a histogram the bars touch, and it is the area of each bar, not its height, that represents the frequency.

That matters as soon as the class intervals are different widths. To keep areas fair, the vertical axis plots frequency density, not frequency:

\[ \text{frequency density} = \frac{\text{frequency}}{\text{class width}} \]
Class width
The size of an interval: upper boundary minus lower boundary. The class \(10 \le x < 25\) has width \(15\).
Frequency density
Frequency per unit of the measured quantity. Plotting it on the vertical axis makes each bar's area equal to its frequency.
Worked example

Find the frequency density for each unequal class below, ready to draw the histogram.

1
Work out each class width, then divide the frequency by it.
2
Class \(0 \le x < 10\): width \(10\), frequency \(8\), density \(= \dfrac{8}{10} = 0.8\).
3
Class \(10 \le x < 15\): width \(5\), frequency \(9\), density \(= \dfrac{9}{5} = 1.8\).
4
Class \(15 \le x < 30\): width \(15\), frequency \(12\), density \(= \dfrac{12}{15} = 0.8\).
Densities: \(0.8\), \(1.8\), \(0.8\). Note the narrow middle class is the tallest bar even though it does not hold the most data.

Height is not frequency

To recover a frequency from a finished histogram, multiply the bar's height (density) by its width to get back the area. Reading the height alone is the classic histogram trap.

Cumulative frequency curves

Cumulative frequency is a running total: for each class you add its frequency to all the frequencies before it. The final cumulative total equals the number of data values, \(n\).

You plot cumulative frequency against the upper boundary of each class, then join the points with a smooth curve. The result climbs from bottom-left to top-right in a stretched "S" shape (an ogive).

Mark \(m\)FrequencyUpper boundaryCumulative frequency
\(0 < m \le 20\)5205
\(20 < m \le 40\)114016
\(40 < m \le 60\)186034
\(60 < m \le 80\)108044
\(80 < m \le 100\)610050

Here \(n = 50\), so the curve ends at a height of \(50\). The points you would plot are \((20, 5)\), \((40, 16)\), \((60, 34)\), \((80, 44)\) and \((100, 50)\).

Reading the median and quartiles

The great strength of the curve is that it hands you the median and quartiles by reading across from the vertical axis. For \(n\) values:

  • Median: read across from \(\dfrac{n}{2}\).
  • Lower quartile \(Q_1\): read across from \(\dfrac{n}{4}\).
  • Upper quartile \(Q_3\): read across from \(\dfrac{3n}{4}\).
Worked reading

Using the table above (\(n = 50\)), read off the median and the interquartile range.

1
Median: go up the vertical axis to \(\dfrac{n}{2} = 25\), across to the curve, then down. That lands between the \((40,16)\) and \((60,34)\) points, giving a median mark of about \(50\).
2
Lower quartile: read across from \(\dfrac{n}{4} = 12.5\). Between \((20,5)\) and \((40,16)\), this gives \(Q_1 \approx 34\).
3
Upper quartile: read across from \(\dfrac{3n}{4} = 37.5\). Between \((60,34)\) and \((80,44)\), this gives \(Q_3 \approx 67\).
4
Interquartile range: \(\text{IQR} = Q_3 - Q_1 \approx 67 - 34 = 33\).
Median \(\approx 50\) marks, IQR \(\approx 33\) marks.

Show your read-lines

Draw the dashed lines you used to read a value, straight across from the axis then straight down. They show the examiner your method (Criterion C) and let you pick up marks even if the final read is slightly off.

Box-and-whisker plots

A box plot is the tidiest summary of a distribution. It is drawn from the five-number summary: the minimum, \(Q_1\), the median, \(Q_3\), and the maximum. The box spans \(Q_1\) to \(Q_3\) (so its length is the IQR), a line inside marks the median, and the whiskers reach out to the smallest and largest values.

Worked reading

Find the five-number summary of: 5, 8, 9, 12, 14, 15, 18, 20, 22, 25, 30, and describe the box plot.

1
The list is ordered with \(n = 11\). Minimum \(= 5\), maximum \(= 30\).
2
Median is the 6th value: \(15\).
3
Lower half \(5, 8, 9, 12, 14\) gives \(Q_1 = 9\); upper half \(18, 20, 22, 25, 30\) gives \(Q_3 = 22\).
4
So the box runs from \(9\) to \(22\) with a line at \(15\); the left whisker reaches \(5\), the right whisker reaches \(30\). The IQR is \(22 - 9 = 13\).
Five-number summary: \(5,\ 9,\ 15,\ 22,\ 30\). IQR \(= 13\), range \(= 25\).

Where this is assessed

Drawing the graph correctly is Criterion C (communicating). Comparing two box plots, for example "the second class has a higher median but a wider IQR, so it is more spread out", is Criterion D and often Criterion B when it forms part of an investigation.

Check yourself

Try each before revealing the answer.

1. A histogram class \(20 \le x < 50\) has frequency \(24\). What is its frequency density? +

Class width \(= 50 - 20 = 30\). Frequency density \(= \dfrac{24}{30} = \) \(0.8\).

2. On a cumulative frequency curve for \(n = 80\) values, which cumulative frequency do you read across from to find the upper quartile? +

The upper quartile is read from \(\dfrac{3n}{4} = \dfrac{3 \times 80}{4} = \) \(60\). (The median would be read from \(40\) and the lower quartile from \(20\).)

3. A box plot shows minimum 4, \(Q_1 = 10\), median 13, \(Q_3 = 19\), maximum 28. State the IQR and the range. +

IQR \(= Q_3 - Q_1 = 19 - 10 = \) \(9\). Range \(= \text{max} - \text{min} = 28 - 4 = \) \(24\).


Part of the Extended Maths library. Spotted an error or want a topic added? That feedback makes the notes better.