Lesson 7 of 8 · 20 min

Range, interquartile range and standard deviation

Measure how spread out a data set is with the range, the quartiles and interquartile range, and the sample standard deviation found with technology.

What you will be able to do

  • Calculate the range of a data set.
  • Find the quartiles Q1Q_1 and Q3Q_3 and the interquartile range, for odd and even nn.
  • Use a calculator to find the sample standard deviation sxs_x, and interpret it.

Two bus routes are each late by 4 minutes on average, and both have a median of 4 minutes late. Would you rely on them equally? Compare their dot plots.

Interactive

Same centre, different spread

Both routes have a mean and median of 4 minutes late. Which route would you rather catch to an exam?

Route A is almost always 2 to 6 minutes late. Route B is all over the place: sometimes on time, sometimes 8 minutes late. The centres match but the spread doesn't. A measure of spread says how far the data is scattered, and you'll use three of them.

Definition

Range

The range is the largest value minus the smallest:

range=maximum−minimum\text{range} = \text{maximum} - \text{minimum}

For Route A it is 6−2=46 - 2 = 4 minutes. For Route B it is 8−0=88 - 0 = 8 minutes.

The range is quick, but it depends on only the two most extreme values, so one unusual day changes it completely. The next two measures use more of the data.

Quartiles split the ordered data into four parts with equal numbers of values. The lower quartile Q1Q_1 has a quarter of the data below it, the median is in the middle, and the upper quartile Q3Q_3 has a quarter of the data above it. The interquartile range, IQR=Q3−Q1\text{IQR} = Q_3 - Q_1, is the spread of the middle half of the data, so extreme values can't distort it.

Finding the quartiles and the IQR

  1. Order the data and find the median

    The median is at position n+12\frac{n+1}{2}.

  2. Split the data into halves

    The lower half is the values below the median and the upper half is the values above it. If nn is odd, leave the median itself out of both halves.

  3. Find the quartiles

    Q1Q_1 is the median of the lower half. Q3Q_3 is the median of the upper half.

  4. Subtract

    IQR=Q3−Q1\text{IQR} = Q_3 - Q_1.

Ten trains were late by these numbers of minutes: 0, 1, 1, 2, 3, 4, 4, 6, 8, 11. With n=10n = 10, the median is at position 5.5, so it is 3+42=3.5\frac{3 + 4}{2} = 3.5 minutes. The halves are the first five and the last five values:

0, 1, 1, 2, 3⏟lower half4, 4, 6, 8, 11⏟upper half\underbrace{0,\ 1,\ \mathbf{1},\ 2,\ 3}_{\text{lower half}} \qquad \underbrace{4,\ 4,\ \mathbf{6},\ 8,\ 11}_{\text{upper half}}

So Q1=1Q_1 = 1, Q3=6Q_3 = 6 and IQR=6−1=5\text{IQR} = 6 - 1 = 5 minutes: the middle half of the trains were between 1 and 6 minutes late.

Find the interquartile range of the data 1, 3, 4, 6, 7, 9, 12.

Worked example

Find the quartiles and IQR when n is odd

  • Simple familiar
  • Technology free

The distances, in kilometres, that 13 members of a running club ran last week were:

25, 18, 40, 12, 30, 21, 52, 28, 15, 35, 20, 32, 24

Find the median, the quartiles, the range and the interquartile range.

5 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Order the data and find the median.

  2. Split into lower and upper halves, leaving out the median when nn is odd.

  3. Q1Q_1 and Q3Q_3 are the medians of the halves, and IQR=Q3−Q1\text{IQR} = Q_3 - Q_1.

Watch out for

  • Including the median in both halves, which gives Q1=20Q_1 = 20 and Q3=32Q_3 = 32.

  • Forgetting to order the data first.

Common mistake

Quartile traps

  • Keeping the median in both halves when nn is odd. Leave it out.
  • Unordered data. Order first, every time.
  • Stopping at the quartiles. If the question asks for the IQR, subtract: Q3−Q1Q_3 - Q_1.
  • Positions for values. Q1Q_1 is a data value (or the mean of two), not a position.

Note

Other quartile methods

Spreadsheet functions such as QUARTILE.INC use a different rule and can give slightly different quartiles. Use the median-of-halves method shown here, and write the halves in your working.

The range and the IQR each use just two values. The standard deviation uses every value: it measures how far the data values typically are from the mean. Values packed closely around the mean give a small standard deviation; widely scattered values give a large one. For the buses, sx≈1.2s_x \approx 1.2 minutes for Route A and sx≈3.4s_x \approx 3.4 minutes for Route B.

Definition

Sample standard deviation

The sample standard deviation, sxs_x, is roughly the typical distance of the data values from the mean, in the same units as the data. A larger sxs_x means more spread, and sx=0s_x = 0 only when every value is the same. In General Mathematics you find sxs_x with technology only.

Where the standard deviation comes from

For the data 2, 4, 4, 6, the mean is xˉ=4\bar{x} = 4.

xxx−xˉx - \bar{x}(x−xˉ)2(x - \bar{x})^2
2−2-24
400
400
624
Sum8

Square each distance from the mean (so the negatives don't cancel the positives), add them, divide by n−1n - 1, then take the square root to get back to the units of the data:

sx=∑(x−xˉ)2n−1=83≈1.63s_x = \sqrt{\frac{\sum (x - \bar{x})^2}{n - 1}} = \sqrt{\frac{8}{3}} \approx 1.63

You won't calculate sxs_x this way in an exam, but it shows what the number means: a typical distance from the mean, here about 1.6.

Standard deviation on a scientific calculator

  1. Choose statistics mode

    Select single-variable statistics (often STAT, then 1-VAR).

  2. Enter the data

    Type each value into the xx column. For a frequency table, turn on the frequency column and enter each value with its frequency.

  3. Read the results

    Open the statistics results (often under VAR or 1-Var Stats) and read xˉ\bar{x} and sxs_x.

  4. Check n

    Make sure nn matches the number of data values, so no value was missed or entered twice.

Common mistake

σx or sx?

Your calculator shows two standard deviations: σx\sigma_x (sometimes labelled xσnx\sigma_n), the population standard deviation, and sxs_x (sometimes xσn−1x\sigma_{n-1}), the sample standard deviation. The syllabus uses sxs_x. It is slightly larger than σx\sigma_x (they are equal only when every value is the same and both are 0), which is how you can tell them apart.

Worked example

Find the mean and standard deviation with a calculator

  • Simple familiar
  • Technology active

The times, in seconds, of eight swimmers in a 50 m freestyle heat at a Brisbane swimming carnival were:

28.6, 30.2, 27.4, 29.0, 31.6, 28.1, 30.8, 29.3

Use technology to find the mean and the standard deviation of the times, correct to two decimal places, and interpret the standard deviation.

4 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Enter the data in single-variable statistics mode and check nn.

  2. Read xˉ\bar{x} and sxs_x, not σx\sigma_x.

  3. Round at the end, and interpret in context with units.

Watch out for

  • Reporting σx≈1.32\sigma_x \approx 1.32 instead of sxs_x.

  • Missing a value when entering the data. Always check nn.

Use technology to find the standard deviation sxs_x of the data 12, 15, 11, 18, 14. Give your answer correct to two decimal places.

Round to 2 decimal places.

A data set has a standard deviation of sx=0s_x = 0. What must be true?

Choose one answer

Summary

  • Range == maximum −- minimum. It is quick, but depends only on the two extremes.

  • Q1Q_1 and Q3Q_3 are the medians of the lower and upper halves of the ordered data. Leave the median out of the halves when nn is odd.

  • IQR=Q3−Q1\text{IQR} = Q_3 - Q_1 is the spread of the middle 50% of the data.

  • The sample standard deviation sxs_x is a typical distance from the mean. Find it with technology and read sxs_x, not σx\sigma_x.

  • A larger range, IQR or standard deviation means more spread. All three are in the units of the data.

Finished the lesson?

Try the 3 quick checks above and the lesson completes itself, or mark it complete now.

Lesson 7 of 80% read

Save your progress with a free account