Range & IQR
What are the range and interquartile range (IQR)?
- The three averages (mean, median and mode) measure what is called central tendency
- they all give an indication of what is typical about the data
- what lies roughly in the middle
- The range and interquartile range (IQR) measure how spread out the data is
- These can only be applied to numerical data
- Fortunately both are easy to work out!
How do I work out the range?
- The range is the difference between the highest data value and the lowest data value
- It measures how spread out the data is
- You can remember this as "Hi - Lo"
- There is one possible problem with the range
- as it considers the highest and lowest values in the data set it could be influenced by anomalies (outliers) in the data
- these may not be a true representation of how spread the rest of the data may be
How do I find the quartiles?
- The median splits the data set into two parts, lying half way along the data
- As their name suggests, quartiles split the data set into four parts
- The lower quartile (LQ) lies a quarter of the way along the data (when in order)
- The upper quartile (UQ) lies three quarters of the way along the data
- You may come across the median being referred to as the second quartile
- As their name suggests, quartiles split the data set into four parts
- To find the quartiles first use the median to divide the data set into lower and upper halves
- Make sure the data is put into numerical order first
- If there are an even number of data values, then the first half of those values are the lower half, and the second half are the upper half
- In this case, all the numbers in the data set are included in one or the other of the two halves
- If there are an odd number of data values, then all the values below the median are the lower half and all the values above the median are the upper half
- In this case, the median itself is not included as a part of either half
- The lower quartile is the median of the lower half of the data set, and the upper quartile is the median of the upper half of the data set
- Find the quartiles in the same way you would find the median for any other data set
- just restrict your attention to the lower or upper half of the data accordingly
- Find the quartiles in the same way you would find the median for any other data set
- Sometimes you may also see the quartiles given in formula form
- For n data values:
- the lower quartile is the value
- the upper quartile is the value
- Using these can save finding the median and splitting the data into two halves
- For n data values:
How do I work out the interquartile range (IQR)?
- This is the difference between the upper quartile (UQ) and the lower quartile (LQ)
- So you need to find the quartiles first before you can calculate the interquartile range
- The interquartile range is IQR = UQ - LQ
- The interquartile range considers the middle 50% of the data so is not affected by extreme values in the data
- The range of a data set, on the other hand, can be affected by extremely large or small values
Examiner Tip
- Remember with the range that you have to do a calculation (even if it is an easy subtraction)
- it is not enough to write something like the range is 14 to 22
- the same applies to the interquartile range
Worked example
Find the range and interquartile range for the following data.
3.4 | 4.2 | 2.8 | 3.6 | 9.2 | 3.1 | 2.9 | 3.4 | 3.2 |
3.5 | 3.7 | 3.6 | 3.2 | 3.1 | 2.9 | 4.1 | 3.6 | 3.8 |
3.4 | 3.2 | 4.0 | 3.7 | 3.6 | 2.8 | 3.9 | 3.1 | 3.0 |
The values need to be in order - work carefully to ensure you do not miss any out.
2.8 | 2.9 | 2.9 | 3.0 | 3.1 | 3.1 | 3.2 | ||
3.2 | 3.2 | 3.4 | 3.4 | 3.5 | 3.6 | 3.6 | 3.6 | |
3.6 | 3.7 | 3.8 | 3.9 | 4.0 | 4.1 | 4.2 |
Working out the range is now very easy.
Range = Hi - Lo = 9.2 - 2.8 = 6.4
To find the interquartile range, we first need to find the median and split the data into two halves.
There are 27 data values, so the median is the 14th value (3.4).
The lower half of the data set is
2.8, 2.8, 2.9, 2.9, 3.0, 3.1, 3.1, 3.1, 3.2, 3.2, 3.2, 3.4, 3.4 (all the values below the median)
There are 13 values, so the lower quartile is the 7th value (3.1).
Remember, the LQ is the median of the lower half of the data set!
LQ = 3.1
The upper half of the data set is
3.5, 3.6, 3.6, 3.6, 3.6, 3.7, 3.7, 3.8, 3.9, 4.0, 4.1, 4.2, 9.2 (all the values above the median)
There are 13 values, so the upper quartile is the 7th value (3.7). (The 7th of these values.)
Remember, the UQ is the median of the upper half of the data set!
UQ = 3.7
Now subtract the LQ from the UQ to find the IQR.
IQR = UQ - LQ = 3.7 - 3.1 = 0.6
The range is 6.4
The interquartile range is 0.6
Alternatively, use the formulae to locate the LQ and UQ.
The LQ is the value; LQ = 3.1
The UQ is the value; UQ = 3.7
Give a reason why, in this case, the interquartile range may be a better measure of how spread out the data is than the range.
The IQR would be a better measure of spread for these data as the highest value (9.2) is very far away from the rest of the numbers - it could be an outlier