Range, IQR and Standard Deviation: Quick Revision | StemPy Lab
Statistics & Data Science
Range, IQR and Standard Deviation: Quick Revision
A brief note on Spread: the range, quartiles and the IQR, box plots, the variance and the standard deviation, which measure to use, and what adding or multiplying does to the spread. With a worked example, practice, a program and questions.
A brief note on Range, IQR and Standard Deviation. An average says where the data is; the spread says how far apart the values are. Try each question at the end before you open its answer.
Three measures of spread
Measure
How to find it
Good to know
Range
largest − smallest
one extreme value makes it huge
IQR
Q3−Q1
the width of the middle half; outliers hardly move it
Standard deviation
square root of the mean of the squared distances from the mean
uses every value; same units as the data
Quartiles. Sort the data. Q1 is the median of the lower half, Q3 of the upper half. With an odd count, leave the median out of both halves.
Box plot. The smallest value, Q1, the median, Q3 and the largest value. The box is the middle half.
Pairs. The mean goes with the standard deviation; the median with the IQR.
When every value changes
Add a number to every value: the averages move, the spread does not.
Multiply every value by k: the averages and the spread are all multiplied by k.
A worked example
Nine students need 11,13,14,14,16,17,19,22 and 41 minutes to reach school.
Range.41−11=30 minutes.
Quartiles. The median, 16, is left out. The lower half 11,13,14,14 gives Q1=13.5; the upper half 17,19,22,41 gives Q3=20.5.
IQR.20.5−13.5=7 minutes, much smaller than the range, because one student needs 41 minutes.
Which to report. With that outlier, give the median, 16 minutes, with the IQR, 7 minutes.
Practice with new numbers
A program to try
The program works out the worked example, and the standard deviation too.
Mistakes to avoid
Forgetting to sort before finding the quartiles.
Adding the distances from the mean. They always make 0; square them first.
Stopping at the variance. The standard deviation is its square root.
Thinking that adding to every value changes the spread. It only moves the data.
Check yourself
What is the range of 8,3,15,6 and 11?
A box plot has the five numbers 4,9,13,20,31. What is the IQR?
Some marks have a standard deviation of 7. Every mark is multiplied by 3, and then 5 is added. What is the new standard deviation?
Two shops sell the same mean number of loaves a day. Shop A's daily sales have a standard deviation of 4 loaves and shop B's 15 loaves. Which shop can plan its baking more easily?