Menu
Sign up Sign in

AI SL · 13.3

Statistics

13.3.5

Histograms and cumulative frequency graphs

13.3.5

Histograms and cumulative frequency graphs

Target: I can draw a histogram from a grouped frequency table, using frequency density when the classes are not the same width. (+5 more)

By the end of this section

Key points

Histograms

  • A histogram has a number scale on the horizontal axis. The bars touch. Label both axes.
  • When all the classes have the same width, the height of a bar is the frequency.
  • When the classes have different widths, the height is the frequency density: frequency ÷ class width. Then the area of a bar shows the frequency.
  • To estimate the frequency in part of a class, assume the values are spread evenly. Take the same fraction of the bar. The answer is an estimate.
  • To estimate a mean from grouped data, use the midpoint of each class: \(\bar x = \frac{\sum fx}{\sum f}\). Use the calculator with a list of midpoints and a list of frequencies.

Cumulative frequency graphs

  • The cumulative frequency at a value is the number of data values less than or equal to it. It is a running total of the frequencies.
  • Plot the cumulative frequency against the upper class boundary, never the midpoint. Start at the lowest boundary with 0 and finish at the total.
  • In an exam, join the points with a smooth curve. In this lesson the points are joined with straight lines so that every reading is exact.
  • A steep part of the graph is a tall bar of the histogram. A flat part is a short bar.
  • To turn a cumulative frequency table back into a histogram, subtract each total from the next to get the frequencies.

Reading a cumulative frequency graph

  • With n values: the median is at \(\frac{n}{2}\), the lower quartile \(Q_1\) at \(\frac{n}{4}\), the upper quartile \(Q_3\) at \(\frac{3n}{4}\). The kth percentile is at \(\frac{k}{100}\times n\).
  • Go across from the cumulative frequency axis to the curve, then down to the data axis. Show these lines on the graph.
  • To find how many values are below a number, go up from the number to the curve, then across. 'More than' means n minus that number.
  • A percentage is the count \(\div\) n \(\times\) 100. IQR \(= Q_3 - Q_1\). The range uses the two ends of the graph.

Box plots and outliers

  • A box plot shows the five-number summary: minimum, \(Q_1\), median, \(Q_3\), maximum. Draw it on a scale. From a cumulative frequency graph, the minimum and maximum are the ends of the graph.
  • An outlier is a value below \(Q_1 - 1.5\times\text{IQR}\) or above \(Q_3 + 1.5\times\text{IQR}\). Mark it with a cross. The whisker stops at the most extreme value that is not an outlier.
  • For a list with an odd number of values, leave the median out of both halves when you find the quartiles. The calculator does this.
  • To compare two distributions, write one comment about the centre (the medians) and one about the spread (the IQRs), in the context of the question.
  • Histograms, cumulative frequency graphs and box plots of the same data match: a tall bar is a steep part of the graph, and the box plot's median and quartiles are read from it.

On the calculator

A histogram

  • Enter the data values, or the midpoints with a frequency list, in a list.
  • Choose the histogram plot and set the bin width and the start value to match the classes.
  • Read the bar heights from the graph to check them against the table.

Screenshot and video to come

Mean from grouped data

  • Enter the class midpoints in one list and the frequencies in a second list.
  • Run one-variable statistics and choose the frequency list.
  • Read the mean. It is an estimate, because midpoints stand for the whole class.

Screenshot and video to come

Quartiles and a box plot from a list

  • Enter the data in a list and run one-variable statistics. Read \(Q_1\), the median and \(Q_3\).
  • The calculator leaves the median out of the halves when there is an odd number of values.
  • Draw the box plot. The calculator marks outliers separately; check them with the 1.5 × IQR rule.

Screenshot and video to come

A cumulative frequency graph

  • Enter the upper boundaries in one list and the cumulative frequencies in another, starting with the lowest boundary and 0.
  • Draw a scatter plot joined by lines, and trace along it to read values.
  • Check the readings against the lines you draw by hand.

Screenshot and video to come

Explore: reading a cumulative frequency graph

Drag the orange point up or down the axis. Go across to the graph, then down to read the value. The box plot below uses the same scale.

ClassFrequencyCumulative

Median (n ÷ 2)
Q₁ (n ÷ 4) and Q₃ (3n ÷ 4)
IQR

Drag the orange point.

  1. Press Median. What cumulative frequency is it, and why? How many values are above it?
  2. Where is the graph steepest? What does that tell you about the data there?
  3. Drag the point to a cumulative frequency of your choice. Go across to the graph, then down to read the value. How many values are above it?
  4. Compare the three data sets. Which has the biggest IQR? Does the box plot show it?

Explore: spread and outliers

Drag a dot along the number line, or select it and use the arrow keys. Watch the box plot, the mean and the standard deviation. Drag one value far out.

Number of values, n
Mean
Median
Lower quartile, Q₁
Upper quartile, Q₃
IQR
Standard deviation, σ

Drag a dot.

  1. Drag the largest value far to the right. Which read-outs change a lot? Which hardly change? Why?
  2. When does the box plot show a cross? Check with the fences: what must a value be to count as an outlier?
  3. Drag a value from one side of the median to the other. What happens to the median? What happens to the quartiles?
  4. Which two measures would you quote for data with an outlier? Which two for clean, bell-shaped data?

Worked examples

Problems like the ones in class. Pick one, try it, then open the working.
Drawing a histogram

The waiting times, in minutes, of 40 patients at a clinic are grouped in the table. Draw a histogram of the data.

Time (min)0–44–88–1212–1616–20Frequency6141172
Working
  1. Axes

    Horizontal axis: time, from 0 to 20 in steps of 4. Vertical axis: frequency, from 0 to 14.

    The classes are all 4 minutes wide, so mark the class boundaries on the horizontal axis.

  2. Bars

    Heights: 6, 14, 11, 7, 2

    When every class has the same width, the height of a bar is the frequency. The bars touch.

  3. 02468101214048121620Time (min)Frequency
    Draw and check

    Check: 6 + 14 + 11 + 7 + 2 = 40

    The heights add to the 40 patients. Label both axes.

Video walkthrough coming
Estimating from a histogram

The histogram shows the speeds of the cars passing a camera. Estimate the number of cars faster than 54 km/h, and the percentage this is of all the cars.

05101520253035304050607080Speed (km/h)Frequency
Working
  1. Total

    8 + 22 + 35 + 25 + 10 = 100

    Heights are frequencies (equal widths), so the total is the sum of the heights.

  2. The part bar

    54 to 60 is 6 of the 10 units: \(\frac{6}{10}\times 35 = 21\)

    Assume the speeds in the class are spread evenly. Take the same fraction of the bar.

  3. Add the whole bars

    21 + 25 + 10 = 56

    The 60–70 and 70–80 bars are completely above 54.

  4. Percentage

    \(\frac{56}{100}\times 100 = 56\%\)

    About 56 cars, or 56%. Both are estimates.

Video walkthrough coming
Table and mean from a histogram

The histogram shows the heights of 50 seedlings. (a) Write the data as a grouped frequency table. (b) Estimate the mean height.

05101520101520253035Height (cm)Frequency
Working
  1. Height (cm)10–1515–2020–2525–3030–35Frequency41119124
    Read the bars

    Frequencies 4, 11, 19, 12, 4 (total 50)

    Equal widths: each height is a frequency.

  2. Midpoints

    12.5, 17.5, 22.5, 27.5, 32.5

    Midpoint = (lower boundary + upper boundary) ÷ 2. It stands for every value in the class.

  3. Mean

    From the calculator: midpoints in one list, frequencies in the other, one-variable statistics with the frequency list: \(\bar x = 22.6\)

    By hand: \(\sum fx = 1130\), and \(1130\div 50 = 22.6\). This is an estimate because we used midpoints.

Video walkthrough coming
Building a cumulative frequency graph

The table shows how long 80 callers waited for an answer at a call centre. (a) Complete a cumulative frequency table. (b) Draw the cumulative frequency graph.

Time (min)0–1010–2020–3030–4040–5050–6060–70Frequency3920201693
Working
  1. Running totals

    3, 3 + 9 = 12, 12 + 20 = 32, 32 + 20 = 52, 52 + 16 = 68, 68 + 9 = 77, 77 + 3 = 80

    Add each frequency to the total so far. The last total must be 80, the number of callers.

  2. Time ≤010203040506070Cumulative frequency03123252687780
    Upper boundaries

    Plot (0, 0), (10, 3), (20, 12), (30, 32), (40, 52), (50, 68), (60, 77), (70, 80)

    The cumulative frequency is the number of values up to the upper boundary, so plot against the upper boundary. Start at the lowest boundary with 0.

  3. 510152025303540455055606570612182430364248546066727884Time (min)Cumulative frequency
    Join the points

    Join the points in order

    In an exam, draw a smooth curve through the points. Here they are joined by straight lines so that every reading is exact. The graph rises to 80.

Video walkthrough coming
Reading a cumulative frequency graph

The graph shows the times of 100 cyclists on a hill climb. Estimate (a) the median, (b) the range, (c) the interquartile range, (d) the 90th percentile, (e) the number of cyclists who took less than 40 minutes, (f) the percentage who took more than 60 minutes.

20253035404550556065707580102030405060708090100Time (min)Cumulative frequency
Working
  1. 20253035404550556065707580102030405060708090100Time (min)Cumulative frequency
    Draw across, then down

    n = 100: go across at 25, 50, 75 and 90, then down to the time axis

    Quartiles are at \(\frac{n}{4}\), \(\frac{n}{2}\) and \(\frac{3n}{4}\). The 90th percentile is at 90% of 100.

  2. Median and quartiles

    Median 45, \(Q_1 = 37\), \(Q_3 = 54\)

    Read from the graph. The median is the time at cumulative frequency 50.

  3. Range and IQR

    Range \(= 80 - 20 = 60\). IQR \(= 54 - 37 = 17\)

    The range uses the ends of the graph. The IQR is the spread of the middle half.

  4. 90th percentile

    90th percentile = 66 minutes

    90% of the cyclists took 66 minutes or less.

  5. A count and a percentage

    Up from 40, across: 31 cyclists. Up from 60, across: 84, so \(100 - 84 = 16\) cyclists, which is 16%

    Going up from a time gives a cumulative frequency, the number up to that time. 'More than' needs the total minus that number.

Video walkthrough coming
From a graph to a box plot

The graph shows the time 48 students in class A spent gaming last night. (a) Estimate the median and the quartiles. (b) Draw a box plot. (c) For class B the five-number summary is 4, 18, 30, 45, 60. Compare the two classes.

51015202530354045505560612182430364248Time (min)Cumulative frequency
Working
  1. Quartile positions

    \(\frac{n}{4} = 12\), \(\frac{n}{2} = 24\), \(\frac{3n}{4} = 36\)

    Go across at each of these cumulative frequencies, then down.

  2. Read the times

    \(Q_1 = 13\), median \(= 19\), \(Q_3 = 32\)

    Take the smallest and largest values from the ends of the graph: 0 and 60.

  3. Five-number summary

    0, 13, 19, 32, 60

    These five numbers draw the box plot.

  4. Class AClass B0102030405060Time (min)
    Box plots

    Class A: box from 13 to 32, line at 19, whiskers to 0 and 60

    Draw class B on the same scale so that the two can be compared.

  5. Compare

    Medians: A 19 min, B 30 min. IQRs: A \(32 - 13 = 19\), B \(45 - 18 = 27\)

    Class B games for longer (higher median) and its times are more spread out (larger IQR).

Video walkthrough coming
Quartiles and an outlier

The numbers of visitors to a museum on 13 days were: 27, 21, 52, 15, 30, 19, 24, 28, 12, 18, 25, 22, 31. Find the median and quartiles, test for outliers, and draw a box plot.

Working
  1. Order the data

    12, 15, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31, 52

    13 values, so the median is the 7th value: 24.

  2. Quartiles

    From the calculator: \(Q_1 = 18.5\), median \(= 24\), \(Q_3 = 29\)

    With an odd number of values the median is left out of both halves.

  3. IQR and fences

    IQR \(= 29 - 18.5 = 10.5\). \(1.5\times 10.5 = 15.75\). Lower fence \(18.5 - 15.75 = 2.75\). Upper fence \(29 + 15.75 = 44.75\)

    An outlier is a value below the lower fence or above the upper fence.

  4. Outliers

    52 > 44.75, so 52 is an outlier. Nothing is below 2.75

    The whisker stops at the largest value that is not an outlier: 31.

  5. ×10152025303540455055Visitors
    Box plot

    Box from 18.5 to 29, line at 24, whiskers to 12 and 31, a cross at 52

    Mark the outlier with a cross, not a whisker.

Video walkthrough coming