Comparing Two Sets of Data
Comparing two sets of data by the mean and standard deviation, or by the median and interquartile range, in sentences that name the average and then the spread; and choosing which pair to use.
What You Should Already Know
- From Secondary 1 and 2: a diagram is chosen for the data and the purpose, with a reason; a back-to-back stem-and-leaf diagram compares two sets row by row, and two sets can be compared by their medians.
- From lesson 3.4: two box-and-whisker plots on one scale compare the average (the medians) and the spread (the interquartile ranges). For the car and bus times, the bus median was 18 minutes against 22 by car, and the bus interquartile range 4 minutes against 10: on average the bus pupils took less time, and their times were more consistent.
- From lessons 3.5 and 3.6: the standard deviation measures spread about the mean, using every value.
The Average and the Spread
Two sets of data can differ in two separate ways: one set may generally have larger values (its average is higher), and one set may be more spread out (its spread is larger). One number cannot say both, so a comparison needs two statements.
Comparing two sets of data
1. The average. Compare the means (or the medians): say which set generally has the larger values, with both numbers.
2. The spread. Compare the standard deviations (or the interquartile ranges): the set with the smaller one is the more consistent; its values are closer together.
Use the mean with the standard deviation, and the median with the interquartile range. Compare like with like: a mean with a mean, never a mean with a median.
Write each comparison as a sentence about the data in their setting ("on average Sunblessed crates have fewer blemished oranges"), not only about the numbers.
Two separate questions
The standard deviation (or interquartile range) says nothing about which set has larger values, and the mean (or median) says nothing about which set is more consistent. A set with a smaller standard deviation may have the larger mean or the smaller one.
Comparing with the Mean and Standard Deviation
Example 1: Two suppliers of oranges
A greengrocer buys oranges from two wholesalers. She counts the blemished oranges in 5 crates from each, chosen at random. Sunblessed: 4, 16, 14, 8, 8. Valencia Star: 9, 12, 11, 10, 13. (a) Find the mean and the standard deviation of each. (b) Compare the two wholesalers. (c) Which wholesaler might she prefer, and why?
Solution
(a) Valencia Star: , so .
| Total: |
|---|
Sunblessed, by calculator: , , , , σx (check:
(b) Average: Sunblessed's mean, 10, is lower than Valencia Star's, 11.
Spread: Valencia Star's standard deviation, 1.41, is much smaller than Sunblessed's, 4.38.
(c) Valencia Star has slightly more blemished oranges on average, but its crates are predictable: each has about 11. A Sunblessed crate may have 4 or 16. A greengrocer who wants to know what she is buying may prefer Valencia Star, although its mean is a little higher.
(b) On average Sunblessed crates have fewer blemished oranges (mean 10 against 11). Valencia Star is more consistent: its standard deviation (1.41) is much smaller than Sunblessed's (4.38), so its number of blemished oranges per crate varies less. (c) Valencia Star, for predictable crates, if a slightly higher average is acceptable.
Example 2: From the mean and standard deviation alone
Over one season, Daniel's times for the 100 m had mean 12.4 s and standard deviation 0.15 s, and Farid's had mean 12.2 s and standard deviation 0.45 s. (a) Compare their times. (b) The school needs a runner who can be relied on to finish within 12.7 s. Which runner should it choose?
Solution
(a) Average: Farid's mean, 12.2 s, is less than Daniel's, 12.4 s, so Farid is generally faster (a shorter time is better).
Spread: Daniel's standard deviation, 0.15 s, is a third of Farid's, 0.45 s, so Daniel's times are more consistent.
(b) The standard deviation is a typical distance from the mean (lesson 3.5). Daniel's times are typically within about 0.15 s of 12.4 s. The limit, 12.7 s, is 0.3 s above his mean, twice that typical distance, so he will seldom be slower than 12.7 s.
Farid's times are typically about 0.45 s from 12.2 s. The limit is only 0.5 s above his mean, about one typical distance, so on a bad day he may well be slower than 12.7 s, although he is faster on average.
(a) Farid is faster on average (12.2 s against 12.4 s); Daniel is more consistent (standard deviation 0.15 s against 0.45 s). (b) Daniel: his times stay close to 12.4 s, well inside 12.7 s; Farid's vary too much to be relied on.
Example 3: From grouped frequency tables
A shop tested 50 batteries of brand P and 50 of brand Q. The table shows how long, hours, each lasted. Estimate the mean and the standard deviation for each brand, and compare the brands.
| Time, hours | Brand P |
|---|---|
| Total |
| Time, hours | Brand Q |
|---|---|
| Total |
Solution
Mid-values 22.5, 27.5, 32.5, 37.5, 42.5. With the calculator's frequency column (lesson 3.6):
| Time, hours | (P) | |
|---|---|---|
| Total |
Brand P: , , ; hours, hours.
| Time, hours | (Q) | |
|---|---|---|
| Total |
Brand Q: , ; hours, hours.
Average: the means, 33.6 and 33.2 hours, are almost the same; brand P lasts very slightly longer on average.
Spread: brand P's standard deviation, 4.83 hours, is smaller than brand Q's, 6.63 hours. Brand P is more consistent: fewer of its batteries die early or last unusually long.
Means about 33.6 hours (P) and 33.2 hours (Q): about the same on average. Standard deviations about 4.83 and 6.63 hours: brand P's lifetimes are more consistent (estimates from grouped data).
Comparing with the Median and Interquartile Range
When the data are shown as box-and-whisker plots or cumulative frequency curves, the median and the interquartile range can be read, but the mean and the standard deviation cannot. Compare them in the same two steps: the medians for the average, the interquartile ranges for the spread.
Example 4: From two box-and-whisker plots
The box-and-whisker plots show the marks of class 4C and class 4D in the same examination. Compare the marks of the two classes.
Solution
Class 4C: median 58, interquartile range marks (range ).
Class 4D: median 55, interquartile range marks (range ).
Average: class 4C's median, 58, is higher than class 4D's, 55.
Spread: class 4C's interquartile range, 18, is much smaller than class 4D's, 31, and so is its range.
Class 4D has both the best mark (95) and the worst (20): its marks are spread much more widely.
On average class 4C did slightly better (median 58 against 55 marks). Class 4C's marks were more consistent (interquartile range 18 against 31 marks); class 4D's were far more spread out.
Example 5: From two cumulative frequency curves
The cumulative frequency curves show the marks of the 40 pupils of class 4E and the 40 pupils of class 4F in a test. (a) Estimate each median and interquartile range. (b) Compare the two classes.
Solution
(a) For 40 pupils, read across from 10 (), 20 (the median) and 30 ().
Class 4E: median 60 (the curve passes through the point (60, 20)), , , interquartile range marks.
Class 4F: median , , , interquartile range marks.
(b) Average: class 4E's median, 60 marks, is much higher than class 4F's, about 46. Its curve lies to the right of class 4F's: below any mark there are fewer pupils of class 4E than of class 4F.
Spread: class 4E's interquartile range, about 25 marks, is a little smaller than class 4F's, about 29: class 4E's marks are slightly more consistent. The difference is small, as readings from a curve are only estimates.
(a) Class 4E: median 60, interquartile range about 25 marks; class 4F: median about 46, interquartile range about 29 marks. (b) On average class 4E did much better (median 60 against about 46); class 4E's marks were slightly less spread out (interquartile range about 25 against 29).
Which Pair to Use
Mean and standard deviation, or median and interquartile range?
The mean and the standard deviation use every value. Use them when the data have no very large or very small value, and when the values or a frequency table are given.
The median and the interquartile range are hardly affected by one very large or very small value. Use them when the data have such a value, and when the data are given as a box-and-whisker plot or a cumulative frequency curve.
Say which pair you used, and why.
Example 6: One very large value
Nine pupils of class 4X and nine of class 4Y ran a 3 km cross-country course. Their times, in minutes, were: 4X: 12, 13, 13, 14, 15, 15, 16, 17, 60; 4Y: 11, 12, 14, 15, 16, 17, 18, 19, 20. One pupil of 4X twisted an ankle and walked most of the way. (a) Find the mean and the standard deviation of each class. (b) Find the median and the interquartile range of each class. (c) Which pair gives the fairer comparison of how the two classes ran? Compare them.
Solution
(a) By calculator. 4X: minutes, minutes. 4Y: minutes, minutes.
(b) Each list has 9 values in order: the median is the 5th value; leave it out, and each half has 4 values.
4X: median 15, interquartile range minutes. 4Y: median 16, interquartile range minutes.
(c) The one time of 60 minutes pulls 4X's mean up by several minutes and makes its standard deviation five times 4Y's, although the other eight 4X pupils ran close together. The median and the interquartile range are hardly affected by it, so they give the fairer comparison.
Average: 4X's median, 15 minutes, is less than 4Y's, 16 minutes: 4X generally ran a little faster.
Spread: 4X's interquartile range, 3.5 minutes, is smaller than 4Y's, 5.5 minutes: 4X's times were more consistent.
(a) 4X: mean 19.4 minutes, minutes; 4Y: mean 15.8 minutes, minutes. (b) 4X: median 15, interquartile range 3.5 minutes; 4Y: median 16, interquartile range 5.5 minutes. (c) The median and interquartile range, because of the one very large time: 4X ran slightly faster on average and more consistently. The mean and standard deviation would have said the opposite on both counts.
Common Mistakes
- Using the standard deviation to say which set is larger on average. In Example 1, Valencia Star's smaller standard deviation does not mean fewer blemished oranges: its mean is higher.
- Making only one comparison. Compare the average and the spread, each in its own sentence.
- Giving the numbers without a conclusion ("the means are 10 and 11"). Say what they mean for the data in their setting.
- Comparing a mean with a median, or a standard deviation with an interquartile range. Compare like with like.
- Forgetting what "better" means in the setting: for times and for blemishes, the smaller mean is better.
- Using the mean and standard deviation when one value is very large or very small. Use the median and interquartile range.
Practice Questions
Try each question first, then open the solution to check your working. In every comparison, write one sentence about the average and one about the spread. Readings from a curve may differ from ours by about half a small square; that is fine.
Question 1
Two machines fill bags of rice labelled 5 kg. For machine M the masses have mean 5.02 kg and standard deviation 0.03 kg; for machine N, mean 5.00 kg and standard deviation 0.12 kg. Compare the two machines. Which would you rather use, and why?
ShowHide solution
Average: machine M's mean, 5.02 kg, is slightly more than machine N's, 5.00 kg.
Spread: M's standard deviation, 0.03 kg, is a quarter of N's, 0.12 kg: M fills more consistently.
N's masses are centred on 5.00 kg and spread widely, so many of its bags will be under 5 kg, some by 0.1 kg or more. M's bags stay close to 5.02 kg, just over the label.
M fills slightly more on average (5.02 kg against 5.00 kg) and is far more consistent (0.03 kg against 0.12 kg). Machine M: its bags are reliably just over 5 kg.
Question 2
Two golfers recorded their scores for five rounds. Aaron: 72, 75, 71, 78, 74. Bala: 70, 82, 68, 79, 76. (In golf a lower score is better.) (a) Find the mean and the standard deviation of each. (b) Compare the two golfers.
ShowHide solution
(a) Aaron: ; deviations , 1, , 4, 0; squares sum 30;
Bala: ; deviations , 7, , 4, 1; squares sum 140;
(b) Average: Aaron's mean, 74, is lower than Bala's, 75, so Aaron generally scored slightly better.
Spread: Aaron's standard deviation, 2.45, is less than half of Bala's, 5.29: Aaron is more consistent.
(a) Aaron: mean 74, ; Bala: mean 75, (b) Aaron scored slightly better on average and was more consistent.
Question 3
The box-and-whisker plots show the daily numbers of customers at two hawker stalls over a month. Compare the numbers of customers at the two stalls.
ShowHide solution
Stall K: median 125, interquartile range . Stall L: median 150, interquartile range .
Average: stall L's median, 150 customers, is higher than stall K's, 125.
Spread: stall K's interquartile range, 30, is smaller than stall L's, 45: stall K's numbers are more consistent from day to day.
On average stall L has more customers (median 150 against 125 a day); stall K's numbers are more consistent (interquartile range 30 against 45).
Question 4
Two netball teams recorded their goals per match. Team R: mean 18, standard deviation 2.5. Team S: mean 15, standard deviation 6.0. Hui Min says, "Team S scores more goals, because its standard deviation is larger." Explain her mistake, and write a correct comparison.
ShowHide solution
The standard deviation measures spread, not size. Team S's larger standard deviation says only that its goals vary more from match to match. Which team scores more is shown by the means: 18 against 15.
She read the spread as the average. On average team R scores more goals (mean 18 against 15); team R is also more consistent (standard deviation 2.5 against 6.0).
Question 5
The tables show the number of books, , that each of 30 pupils of class 4P and 30 of class 4Q read in the holidays. Find the mean and the standard deviation for each class, and compare the classes.
| Books, | Class 4P |
|---|---|
| Total |
| Books, | Class 4Q |
|---|---|
| Total |
ShowHide solution
4P: , . ;
| (4P) | |||
|---|---|---|---|
| Total |
4Q: , . ;
| (4Q) | |||
|---|---|---|---|
| Total |
Average: 4P's mean, 2.3 books, is a little higher than 4Q's, 2.1.
Spread: 4P's standard deviation, 1.32, is smaller than 4Q's, 1.66: 4P's numbers are more consistent. In 4Q many pupils read 0 or 1 book and many read 4 or 5.
4P: mean 2.3, ; 4Q: mean 2.1, . On average 4P read slightly more books, and its numbers were more consistent.
Question 6
The monthly salaries, in dollars, of the 7 staff of each of two small firms are: firm F: 2600, 2800, 2800, 3000, 3100, 3300, 15 000; firm G: 2900, 3000, 3200, 3300, 3400, 3500, 3700. Which pair of statistics should be used to compare the salaries of the two firms? Use it to compare them.
ShowHide solution
Firm F has one very large salary, $15 000, which would pull its mean far up and make its standard deviation large. Use the median and the interquartile range.
Firm F: 7 values, so the median is the 4th, $3000; leave it out: lower half 2600, 2800, 2800, $2800; upper half 3100, 3300, 15 000, $3300. Interquartile range $500.
Firm G: median $3300; lower half 2900, 3000, 3200, $3000; upper half 3400, 3500, 3700, $3500. Interquartile range $500.
Average: firm G's median, $3300, is higher than firm F's, $3000.
Spread: both interquartile ranges are $500: the middle halves of the salaries are equally spread.
(Firm F's mean is about $4660, more than six of its seven salaries: it describes nobody.)
The median and interquartile range, because of firm F's one very large salary. A typical salary is higher at firm G (median $3300 against $3000); the spread of the middle half is the same ($500 each).
Question 7
The curves show the times, in minutes, that 40 pupils of school P and 40 of school Q spent on their phones before school one morning. Compare the two schools, using the median and the interquartile range.
ShowHide solution
For 40 pupils, read across from 20 for the medians, and from 10 and 30 for the quartiles.
School P: median , , , interquartile range minutes. School Q: median , , , interquartile range minutes.
Average: school Q's median, about 32 minutes, is higher than school P's, about 24: school Q's pupils generally spent longer on their phones.
Spread: the interquartile ranges, about 15 and 16 minutes, are almost the same: the times are about equally consistent in the two schools.
On average school Q's pupils spent longer on their phones (median about 32 minutes against 24). The spreads are about the same (interquartile ranges about 15 and 16 minutes).
Question 8
For each situation, say whether you would compare the mean and standard deviation or the median and interquartile range, and why. (a) The masses of apples from two orchards, given as two lists with no unusual values. (b) The house prices in two estates, one of which has a single mansion. (c) The times of two groups of runners, given only as two cumulative frequency curves.
ShowHide solution
(a) The mean and standard deviation: they use every value, and no value is unusual.
(b) The median and interquartile range: the one mansion would pull its estate's mean up and make its standard deviation large.
(c) The median and interquartile range: they can be read from the curves; the mean and standard deviation cannot.
(a) Mean and standard deviation (b) median and interquartile range (c) median and interquartile range, for the reasons given.
Question 9
Waiting times at clinic C have mean 18 minutes and standard deviation 4 minutes; at clinic D, mean 18 minutes and standard deviation 11 minutes. Siti wrote: "The waiting times at the two clinics are the same." Is her conclusion complete? Write a better one.
ShowHide solution
The means are equal, so the waiting times are the same on average. But the standard deviations differ: clinic D's waiting times are far more spread out. A patient at clinic D may wait much less than 18 minutes, or much more.
No. On average the waits are the same (mean 18 minutes each), but clinic C's are more consistent (standard deviation 4 minutes against 11).
Key Points
- Compare two sets of data in two statements: the average (mean or median), then the spread (standard deviation or interquartile range).
- The smaller standard deviation or interquartile range belongs to the more consistent set.
- A standard deviation never says which set is larger on average; a mean never says which set is more consistent.
- Pair the mean with the standard deviation, and the median with the interquartile range; compare like with like.
- With one very large or very small value, or with data given as a curve or box plot, use the median and interquartile range.
- Write each comparison about the data in their setting, with both numbers, and say what "better" means there.