National 5 Maths
Statistics: Data Sets

 Our generous sponsors 

Course content

  • Comparing two data sets using these statistics:
    • a measure of average: mean or median
    • a measure of spread: interquartile range or standard deviation

Textbook page references

What is a data set?

A data set is just a group of numbers. Examples of data sets:

  • the goals scored by a team in each game through a league season
  • the number of pets each pupil in your Maths class has
  • the heights of a group of plants four weeks after their seeds were sown.

N5 Maths revision course

National5.com self-study course 
Save £10 with discount code 'Maths.scot'

Average and spread

Average is a number that gives us an idea of what value is in the middle of a data set: about halfway between the maximum and minimum. The two measures of average used at National 5 are mean and median.

Spread, or dispersion, is a number that gives us an idea of how spread out (varied) or close together (consistent) the data items are. The two measures of spread used in Nat 5 Maths are interquartile range and standard deviation.

Mean

Mean \((\overline x)\) is the sum of the data items \((\Sigma x)\) divided by how many data items there are \( (n) \).

$$ \overline x = \frac{\Sigma x}{n} $$

\(\Sigma\) (sigma) is the Greek capital S. It just means "add up all the..." so \(\Sigma x\) is the sum of all the \(x\)-values.

Example:  The mean of 9, 4, 11 and 6 is

\( \overline x =\large \frac{\Sigma x}{n} \normalsize = \large \frac{9+4+11+6}{4} \normalsize = \large \frac{30}{4} \normalsize =7.5 \)

Median

Median is the middle number in an ordered list.

Example: 15 19 12 10 16.

Put them in order: 10 12 15 16 19.
This example is easy because \(n\) is odd.
The median is 15 because it has two data items on either side.

Example:  34 26 41 29.

Put them in order: 26 29 34 41.
\(n\) is even so we need to calculate the median. It's the mean of 29 and 34.
Median = \( \large \frac{29+34}{2} \normalsize \) = 31.5

Quartiles

Example:  3 5 6 9 12 15 20.

The median is 9. It splits the data set in half:
3 5 6 9 12 15 20.

Each "half" contains three data items.

We can do the same again in each half:

  • 3 5 6 in the lower half
  • 12 15 20 in the upper half.

We have now "quartered" the data set. The values that separate each quarter are called quartiles.

  • The lower quartile \(Q_1\) = 5
  • The median \(Q_2\) = 9
  • The upper quartile \(Q_3\) = 15

Sidenote: This data set has 7 data items, so they aren't really "halves" and "quarters", but it's useful to call them that so that we can understand how to find the quartiles. I'll drop the quote marks now!

Example:  1 2 4 5 6 7 7 8 9.

The median is 6, but this time there are four data items in each half. So:

  • Lower quartile \(Q_1\) = \(\frac{2+4}{2}\) = 3
  • Median \(Q_2\) = 6
  • Upper quartile \(Q_3\) = \(\frac{7+8}{2}\) = 7.5

Example:  1 3 4 7 9 10.

Here the median needs to be calculated, but the lower and upper quartiles are easy because they are just the middle numbers in groups of three.

  • Lower quartile \(Q_1\) = 3
  • Median \(Q_2\) = \(\frac{4+7}{2}\) = 5.5
  • Upper quartile \(Q_3\) = 9

Example:  1 1 4 5 8 8 10 11.

This is the worst type. All three quartiles need to be calculated.

  • Lower quartile \(\frac{1+4}{2}\) = 2.5
  • Median \(Q_2\) = \(\frac{5+8}{2}\) = 6.5
  • Upper quartile \(Q_3\) = \(\frac{8+10}{2}\) = 9

Interquartile range

Interquartile range (IQR) is a measure of spread, defined as \( Q_3-Q_1 \).

Semi-interquartile range (SIQR) is another measure of spread, defined as half of the IQR:

$$ SIQR = \frac{Q_3-Q_1}{2} $$

SIQR was part of the National 5 Maths course until 2021, so it appears in some past papers. The course now only includes IQR.

Example:  20 24 26 27 30 31.

\(Q_1=24\) and \(Q_3=30\).
So \( IQR = 30-24 = 6 \).

Standard deviation

Standard deviation (\(s\)) is probably the best measure of spread, but it is trickier to calculate.

Two different ways of calculating \(s\) are given on the N5 formula list:

$$ \begin{eqnarray} s &=& \sqrt{\frac{\Sigma{\left( x-\overline x \right)^2 }}{n-1}} \\[6pt] s &=& \sqrt{\frac{\Sigma{x^2}-\frac{\left(\Sigma x \right)^2}{n}}{n-1}} \end{eqnarray} $$

If the standard deviation was zero, all the data items would be the same. The bigger the SD is, the more varied (spread out) the data items are.

Here are two examples of how to calculate standard deviation, using each of the formulae:

Find a Maths tutor

Do you need a National 5 Maths tutor?
Click here to find a tutor in your area. 

×

Example 1 (1st formula)

Midday temperatures in °C were recorded in Glasgow over the period from 1st to 9th March, inclusive:

6  8  11  12  8  5  9  7  6

Calculate the standard deviation of these temperatures, correct to 2 significant figures.

Example 2 (2nd formula)

Midday temperatures in °C were recorded in Edinburgh over the period from 1st to 9th March, inclusive:

7  6  10  10  9  6  8  7  7

Calculate the standard deviation of these temperatures, correct to 2 significant figures.

Example 3 (exam-style question)

Using the answers to the previous examples, make two valid comments comparing the temperatures at midday in Glasgow and Edinburgh over the period from 1st to 9th March, inclusive.

Recommended student book

Zeta Maths: National 5 Maths Textbook 
 Best price, direct from the publisher

Example 4 (non-calculator)

SQA National 5 Maths 2015 P1 Q5

The standard deviation of 1, 2, 2, 2, 8 is equal to \(\sqrt{a}.\) Find the value of \(a.\)

Example 5 (calculator)

SQA National 5 Maths 2021 P2 Q6

A company operates a bus route from the city centre to the airport. The number of passengers on six of its buses on a Monday was

32 27 34 29 31 33

(a) Calculate the mean and standard deviation of the number of passengers.

(b) The mean number of passengers the following Saturday was 28 and the standard deviation was 3.2. Make two valid comments comparing the number of passengers on each bus on Monday and Saturday.

Recommended revision guides

How to Pass National 5 Maths 
BrightRED N5 Maths Study Guide 

Example 6 (non-calculator)

SQA National 5 Maths 2023 P1 Q9

A magazine company conducted a survey of the ages of its readers. A sample of ten readers' ages, in years, are shown below.

33 55 38 47 36 41 42 41 35 31

(a) Calculate the median and interquartile range of the ages of readers for this sample.

A newspaper company also conducted a survey of the ages of its readers. The median age of a sample of its readers was 41 years and the interquartile range was 9 years.

(b) Make two valid comments comparing the ages of the readers of the magazine and the ages of the readers of the newspaper.

Example 7 (non-calculator)

SQA National 5 Maths 2024 P1 Q5

The prices, in pounds (£), of the camera on display in a shop are listed below.

155 160 190 210 230 240

(a) Calculate the median and interquartile range of these prices.

On a website, a sample of camera prices have a median of £195 and an interquartile range of £73.

(b) Make two valid comments comparing the prices of the cameras in the shop and on the website.

Need a Nat 5 Maths tutor?

Just use this handy little widget and our partner Bark.com will help you find one.

Maths.scot worksheet

Data sets worksheet
Answer sheet
• See all National 5 Maths worksheets

Past paper questions

All past paper questions by topic
Median and IQR (or SIQR):
2015 Paper 1 Q10 (SIQR)
2017 Paper 1 Q2 (SIQR)
2019 Paper 1 Q5 (SIQR)
2021 Paper 1 Q5 (SIQR)
2023 Paper 1 Q9 (IQR)
2024 Paper 1 Q5 (IQR)
Mean and standard deviation:
2013 Specimen Paper 2 Q8
2014 Paper 2 Q4
2015 Paper 1 Q5 (with surds)
2016 Paper 2 Q6
2017 Paper 1 Q12 (with surds)
2018 Paper 2 Q5
2021 Paper 2 Q6
2022 Paper 2 Q5

Other great resources

Videos - Maths180.com
Video - Mr Graham Maths
Video - DLB Maths
SQA 2014 Paper 2 Q4 solution
Video - Mr Hamilton Online
SQA 2015 Paper 1 Q5 solution
Videos - S Tarbard
1. Standard deviation: 1st formula
2. Standard deviation: 2nd formula
Notes and videos - Mistercorzi
1. Quartiles and averages
2. Standard deviation
PowerPoint - MathsRevision.com
1. Notes - BBC Bitesize
2. Test yourself - BBC Bitesize
Notes - Maths4Scotland
Notes - National5.com
Lesson notes - Maths 777
1. Median, IQR and SIQR
2. Standard deviation
Notes and examples - Maths Mutt
Quartiles notes - Maths is Fun
Practice questions - Maths Hunter
Worksheet - Calderglen HS
Essential Skills worksheet
Standard deviation (Answers)
Worksheet - Starting Points Maths
Word problems
Exercises - Larkhall Academy
Pages 34-44 Ex 1-3
×

Click here to study the standard deviation notes on National5.com.

You may also want to check out their Nat 5 Maths self-study course. We think it's excellent. If you decide to enrol, just use coupon code "Maths.scot" to get £10 discount.


⇦ Nat 5 topic list  ⇧ Top of this page