Menu
Sign up Sign in

AI HL · 13.3

Statistics

13.3.4

Quartiles, box plots and outliers

13.3.4

Quartiles, box plots and outliers

Target: I can find the mean (to 2 decimal places), the median, the IQR and the population standard deviation of a list, by hand, on the calculator or on a spreadsheet. (+6 more)

By the end of this section

Key points

Centre and spread

  • The mean is the total divided by the number of values. The median is the middle value of the ordered list, or the mean of the middle two when n is even.
  • An extreme value pulls the mean towards it and hardly moves the median. When there is an outlier, the median is usually the better measure of the centre.
  • The range is max − min. The interquartile range, IQR = Q3 − Q1, is the spread of the middle half of the data and ignores extreme values.
  • Population standard deviation: \(\sigma=\sqrt{\dfrac{\sum (x-\bar{x})^2}{n}}\). On the calculator read \(\sigma x\), not \(sx\). On a spreadsheet use STDEV.P.

Quartiles and the five-number summary

  • The five-number summary is min, Q1, median, Q3, max, in that order.
  • The class calculator (TI-Nspire) takes the median of each half. When n is odd the middle value is left out of both halves. Write "from the calculator" next to the quartiles.
  • Each quarter of the data lies between two neighbouring numbers of the summary: Q1 has 25% of the values below it, Q3 has 75%.
  • Order the list before you look for any quartile by hand.
  • From a frequency table, add a cumulative frequency row. The median and quartiles are the values at positions \(\frac{n}{2}\), \(\frac{n}{4}\) and \(\frac{3n}{4}\). On the calculator, put the values in one list and the frequencies in the other.

Outliers: the 1.5 × IQR rule

  • A value is an outlier if it is below \(Q_1-1.5\times IQR\) or above \(Q_3+1.5\times IQR\). These two numbers are the fences.
  • Find the IQR first, then 1.5 × IQR, then each fence. A value exactly on a fence is not an outlier.
  • Check the smallest and the largest values against both fences.
  • In a context, name the outlier and give a possible reason. Do not delete a value just because it is an outlier.

Box plots

  • Draw on a scale. The box runs from Q1 to Q3 with a line at the median. Whiskers run to the smallest and largest values that are not outliers. Mark each outlier with a cross.
  • Compare two box plots with the median (centre) and the IQR (spread), in the words of the question.
  • Skew: if the median is nearer Q1 and the upper whisker is much longer, the data are skewed to the right (positive skew) and the mean is above the median. A long lower whisker is the mirror case.
  • The scale on the axis must include every outlier.

On the calculator

Quartiles from the calculator

  • Enter the data in a list, then use one-variable statistics.
  • Read n, min, Q1, median, Q3 and max from the results.
  • The calculator finds the median of each half and leaves the middle value out when n is odd.
  • Then work out the IQR and the fences by hand and show the working.

Screenshot and video to come

Mean and standard deviation

  • From the same one-variable statistics, read the mean and \(\sigma x\), the population standard deviation.
  • Do not use \(sx\), the sample standard deviation.
  • On a spreadsheet: =AVERAGE(range) and =STDEV.P(range).

Screenshot and video to come

Worked examples

Problems like the ones in class. Pick one, try it, then open the working.
Mean, median and an extreme value

Seven students record the minutes they spent on homework on Monday: 35, 40, 25, 45, 30, 40, 150. (a) Find the mean, to 2 decimal places. (b) Find the median. (c) Which is the better measure of the centre? Give a reason.

Working
  1. Add

    35 + 40 + 25 + 45 + 30 + 40 + 150 = 365

    Add every value.

  2. Mean

    365 ÷ 7 = 52.14

    Divide by the number of values. Two decimal places.

  3. Order, then median

    25, 30, 35, 40, 40, 45, 150: median = 40

    Put the values in order. With 7 values the median is the 4th.

  4. Compare

    mean 52.14 and median 40

    The 150 pulls the mean above all but one of the values. Six of the seven students spent 45 minutes or less, so the median describes a typical student better.

Video walkthrough coming
Five-number summary and IQR

A café counts the customers who come in each hour for 11 hours: 14, 22, 17, 31, 19, 25, 28, 16, 21, 24, 20. (a) Find the five-number summary. (b) Find the interquartile range.

Working
  1. Order the list

    14, 16, 17, 19, 20, 21, 22, 24, 25, 28, 31

    Quartiles need an ordered list.

  2. Quartiles

    From the calculator: min 14, Q1 17, median 21, Q3 25, max 31

    n = 11 is odd. The calculator leaves the middle value out, then takes the median of each half.

  3. Five-number summary

    14, 17, 21, 25, 31

    Write min, Q1, median, Q3, max in that order.

  4. IQR

    IQR = Q3 − Q1 = 25 − 17 = 8

    The spread of the middle half of the data.

Video walkthrough coming
Comparing the spread of two data sets

The five-number summaries of the delays, in minutes, of two bus routes are shown as box plots. Route A: 1, 4, 7, 10, 15. Route B: 2, 5, 7, 8, 12. (a) Find the IQR of each route. (b) Compare the two routes.

AB0246810121416Delay (min)
Working
  1. Route A

    IQR = 10 − 4 = 6

    Q3 − Q1.

  2. Route B

    IQR = 8 − 5 = 3

    Same rule.

  3. Compare

    Both medians are 7 min. IQR: A 6, B 3.

    The typical delay is the same. Route A's middle half is spread over 6 minutes, route B's over 3, so route B is more consistent.

Video walkthrough coming
Outlier fences from the quartiles

A data set has Q1 = 41 and Q3 = 59. (a) Find the lower and upper fences for outliers. (b) Which of 10, 80 and 90 are outliers?

Working
  1. IQR

    IQR = 59 − 41 = 18

    Fences start from the IQR.

  2. 1.5 × IQR

    1.5 × 18 = 27

    This is the distance beyond each quartile.

  3. Fences

    Lower: 41 − 27 = 14. Upper: 59 + 27 = 86

    A value is an outlier only if it is beyond a fence.

  4. Test the values

    10 < 14: outlier. 80 is between 14 and 86: not. 90 > 86: outlier.

    Compare each value with both fences.

Video walkthrough coming
Quartiles from a frequency table

A survey asks 40 households how many pets they have. (a) Find the median and the lower and upper quartiles. (b) Find the interquartile range. (c) Is a household with 7 pets an outlier?

Pets01234567Frequency611974201
Working
  1. Positions

    \(n=40\): median between the 20th and 21st values, \(Q_1\) between the 10th and 11th, \(Q_3\) between the 30th and 31st

    The table stands for a list of 40 values in order.

  2. Cumulative frequency

    Running totals: 6, 17, 26, 33, 37, 39, 39, 40

    The first value whose total reaches a position is the value at that position.

  3. Quartiles

    From the calculator: \(Q_1=1\), median \(=2\), \(Q_3=3\)

    One-variable statistics with the values in one list and the frequencies in the other gives the same.

  4. Interquartile range

    \(IQR=3-1=2\)

    Q3 minus Q1.

  5. Outlier test

    \(3+1.5\times 2=6\), and \(7>6\)

    7 is above the upper fence, so a household with 7 pets is an outlier.

Video walkthrough coming
Outliers from a list, then a box plot

The times, in minutes, that 12 patients waited at a clinic: 17, 9, 12, 41, 13, 8, 15, 18, 9, 11, 14, 5. (a) Use the 1.5 × IQR rule to find any outliers. (b) Draw a box plot, marking any outliers with a cross.

Working
  1. Quartiles

    From the calculator: min 5, Q1 9, median 12.5, Q3 16, max 41

    n = 12 is even: each half has 6 values.

  2. Fences

    IQR = 7; 1.5 × 7 = 10.5. Lower: −1.5. Upper: 26.5.

    Q1 − 1.5 IQR and Q3 + 1.5 IQR.

  3. Outliers

    41 > 26.5: outlier. No value is below −1.5.

    Check the smallest and the largest values.

  4. Whiskers

    Lower whisker to 5. Upper whisker to 18, the largest value inside the fence.

    A whisker stops at the last value that is not an outlier.

  5. ×Waiting time051015202530354045Waiting time (min)
    Draw it

    Box from 9 to 16, median line at 12.5, cross at 41.

    Scale the axis to include the outlier.

Video walkthrough coming
Standard deviation by hand

Find the population standard deviation of 4, 7, 8, 9, 12. Give your answer to 3 significant figures.

Working
  1. Mean

    mean = 40 ÷ 5 = 8

    Start with the mean.

  2. x478912x − 8−4−1014(x − 8)²1610116
    Deviations

    Subtract the mean from each value, then square.

    Squaring makes every term positive.

  3. Variance

    sum = 34; variance = 34 ÷ 5 = 6.8

    Divide by n, the number of values.

  4. Square root

    σ = √6.8 = 2.61

    The standard deviation is the square root of the variance.

Video walkthrough coming
Mean and SD on a spreadsheet

Ten commuters' journey times in minutes: 24.5, 31.2, 28.7, 26.4, 33.1, 29.8, 27.1, 30.5, 25.9, 32.4. Use a spreadsheet to find the mean and the population standard deviation, each to 2 decimal places.

Working
  1. Enter the data

    Type the 10 times in cells A1 to A10.

    One value per cell.

  2. Mean

    =AVERAGE(A1:A10) gives 28.96

    Round to 2 decimal places.

  3. Standard deviation

    =STDEV.P(A1:A10) gives 2.76

    STDEV.P is the population standard deviation. STDEV.S is the sample one: not this.

Video walkthrough coming