Comparing Data Sets
Two datasets are compared by their centres, such as the mean and median, and their spreads, such as the range. This NSW Year 9 Advanced maths subtopic compares datasets and uses the comparison to make decisions (NESA outcome MA5‑DAT‑C‑01).
You will compare sets with the same mean but different spreads, read paired dot plots and back-to-back stem-and-leaf plots, and compare class results from frequency tables. You will choose a reliable bus company and a bottle-filling machine, decide which team is more consistent, find the combined mean of two classes of different sizes, and compare two fertilisers. It is part of Year 9 Advanced Investigating Data.
Every question with a fully worked solution.
- Comparing Data Sets - Video - Comparing Data Sets Using Plots Watch
Theory
To compare two data sets, look at three things: the centre (mean or median), the spread (range) and the shape. This Year 9 Advanced maths page shows how to compare them in words and numbers, and how to use the comparison to make a decision.
A measure of centre gives a typical value: the mean (total \(\div\) number of scores) or the median (the middle score in order).
A measure of spread says how far the scores are scattered. The range is largest \(-\) smallest. A smaller spread means the data are more consistent.
The shape is symmetrical or skewed, with one peak or two, and may include outliers. When the mean and median of one set differ a lot, the set is skewed or has an outlier.
A full comparison mentions centre, spread and shape, and compares like with like: two means, or two medians, never one of each.
Two sets can be shown side by side in parallel dot plots, a back-to-back stem-and-leaf plot, or a two-row frequency table. Paired data (two readings on the same day) can also be compared pair by pair.
Here \(n_1, n_2\) are the group sizes and \(\bar{x}_1, \bar{x}_2\) their means. Only when \(n_1 = n_2\) is it the plain average of the two means.
| Compare | Use | A full sentence names |
|---|---|---|
| centre | mean or median (the same one for both sets) | which set is higher, and by how much |
| spread | range | which set is more consistent |
| shape | the graph, or mean vs median | skew, peaks, outliers |
How to compare two data sets
- Organise each set: list it in order, or read it from the display (left leaves outwards in a back-to-back plot).
- Centre: find the mean or median of each, the same measure for both. Use the median if either set is skewed or has an outlier.
- Spread: find each range. The smaller range is the more consistent set.
- Shape: describe each set; compare its mean and median.
- Write the comparison in context, with numbers: 'B's median is \(4\) higher, but A's range is \(10\) smaller.'
Using a comparison to decide
- Read what matters in the question: a reliable result, a high average, or the best chance of a top result.
- Reliable or never below a limit: favour the smaller spread, and check the lowest values.
- Best chance of a high value: count how many scores in each set pass the target; a bigger spread can help.
- Unknown value: use mean \(\times n\) \(=\) total, or the range, to find it first.
(i) Seven days each, so the median is the \(4\)th value.
| \(\bar{x}_A\) | \(=\) | \(\dfrac{350}{7} = \mathbf{50}\) |
| \(\text{median}_A\) | \(=\) | \(\mathbf{48}\) |
| \(\text{range}_A\) | \(=\) | \(66 - 42 = \mathbf{24}\) |
| \(\bar{x}_B\) | \(=\) | \(\dfrac{350}{7} = \mathbf{50}\) |
| \(\text{median}_B\) | \(=\) | \(\mathbf{52}\) |
| \(\text{range}_B\) | \(=\) | \(64 - 30 = \mathbf{34}\) |
(ii) Centre: the means are equal, but B's median is \(4\) higher, so on a typical day B sold a few more meals. Spread: A's range is \(10\) smaller, so A is more consistent. Shape: A has one high day, \(66\), which lifts its mean above its median (positive skew); B's two low days pull its mean below its median (negative skew).
| Errors | \(0\) | \(1\) | \(2\) | \(3\) | \(4\) |
|---|---|---|---|---|---|
| Group \(X\) | \(2\) | \(5\) | \(8\) | \(4\) | \(1\) |
| Group \(Y\) | \(6\) | \(3\) | \(2\) | \(3\) | \(6\) |
(i) Find the mean and median for each group.
(ii) Both ranges are \(4\). Which group is more consistent?
(i) Multiply errors by frequency, then divide by \(20\).
| \(\bar{x}_X\) | \(=\) | \(\dfrac{0 + 5 + 16 + 12 + 4}{20} = \dfrac{37}{20} = \mathbf{1.85}\) |
| \(\bar{x}_Y\) | \(=\) | \(\dfrac{0 + 3 + 4 + 9 + 24}{20} = \dfrac{40}{20} = \mathbf{2}\) |
Medians: the \(10\)th and \(11\)th values. Running totals for \(X\): \(2, 7, 15\); for \(Y\): \(6, 9, 11\). In both groups the \(10\)th and \(11\)th values are \(2\).
| \(\text{median}_X\) | \(=\) | \(\text{median}_Y = \mathbf{2}\) |
(ii) Group \(X\). Its scores bunch in the middle: \(17\) of the \(20\) made \(1\) to \(3\) errors. Group \(Y\) piles up at both ends (\(12\) students made \(0\) or \(4\)), so its results vary much more. The equal ranges hide this; look at the whole distribution.
(i) A class of \(18\) students has a mean test mark of \(64\). Another class of \(12\) has a mean of \(74\). Find the mean mark of all \(30\) students.
(ii) Set \(P\) is \(5, 8, 9, 12, x\) and set \(Q\) is \(4, 7, 10, 10, 14\). The two sets have the same mean. Find \(x\).
(i) The classes are different sizes, so do not average \(64\) and \(74\). Rebuild each total.
| \(18 \times 64\) | \(=\) | \(1152\) |
| \(12 \times 74\) | \(=\) | \(888\) |
| \(\bar{x}\) | \(=\) | \(\dfrac{1152 + 888}{30} = \dfrac{2040}{30} = \mathbf{68}\) |
The answer is closer to \(64\) than \(74\) because the larger class counts for more.
(ii) The mean of \(Q\) is \(\dfrac{45}{5} = 9\), so \(P\) must also total \(5 \times 9 = 45\).
| \(5 + 8 + 9 + 12 + x\) | \(=\) | \(45\) |
| \(34 + x\) | \(=\) | \(45\) |
| \(x\) | \(=\) | \(\mathbf{11}\) |
| \(\bar{x}_A\) | \(=\) | \(\dfrac{189}{9} = \mathbf{21}\) |
| \(\text{median}_A\) | \(=\) | \(\mathbf{21}\) |
| \(\text{range}_A\) | \(=\) | \(23 - 19 = \mathbf{4}\) |
| \(\bar{x}_B\) | \(=\) | \(\dfrac{189}{9} = \mathbf{21}\) |
| \(\text{median}_B\) | \(=\) | \(\mathbf{22}\) |
| \(\text{range}_B\) | \(=\) | \(28 - 12 = \mathbf{16}\) |
(ii) Brand A. Every A battery lasted at least \(19\) hours, but \(3\) of the \(9\) B batteries did not. The small range makes A reliable.
(iii) Brand B. \(4\) of its \(9\) batteries lasted more than \(23\) hours; none of brand A's did. The wide spread gives B both the worst and the best results.
Common pitfalls
Frequently asked questions
What three things do you compare between two data sets?
The centre (mean or median), the spread (range) and the shape (symmetrical or skewed, peaks and outliers).
How do you tell which data set is more consistent?
The one with the smaller spread. With the range, the smaller range means the scores are closer together and more consistent.
How do you find the mean of two groups combined?
Multiply each group's mean by its size to get the totals, add the totals, and divide by the total number of people.
Should I compare means or medians?
Either, as long as you use the same one for both sets. If a set is skewed or has an outlier, the median is the better measure of a typical value.
Can two data sets have the same mean but be very different?
Yes. They can have very different spreads or shapes. For example \(1, 2, 3\) and \(-8, 2, 12\) both have a mean of \(2\).