4A

Comparing data sets

Misleading statistics and biased samples, summary statistics, shape and skewness, and comparing two data sets with parallel box plots.

Statistics are everywhere in news and ads, and they are easy to bend. Knowing how data is collected and summarised lets you check a claim yourself. It also lets you compare two groups fairly, for example two classes' test results.

Collecting data and misusing it

A sample is the part of a population you actually survey. It should represent the whole population. A sample is biased if some groups are more likely to be included than others. Asking people at a gym how often they exercise will overestimate how much the whole town exercises.

Graphs can mislead too. Watch for a vertical axis that doesn't start at zero (small differences look huge), uneven scales, and pictures where doubling the height also doubles the width, so the area looks four times as big.

Summary statistics

The mean is the total divided by the number of values. The median is the middle value once the data is in order. The mean is pulled towards extreme values. The median is not, so it is often the better "typical value" for data such as house prices or incomes.

For spread, the range is max − min. The interquartile range is $\text{IQR} = Q_3 - Q_1$, the spread of the middle half of the data. $Q_1$ is the median of the lower half and $Q_3$ is the median of the upper half.

Example 1●●

Find the five-number summary of $13, 7, 2, 25, 9, 6, 12, 8, 10, 5$, and check for outliers.

$2, 5, 6, 7, 8, 9, 10, 12, 13, 25$
Always put the data in order first.
Median $= \dfrac{8 + 9}{2} = 8.5$
There are 10 values, so the median is halfway between the 5th and 6th.
$Q_1 = 6$, $Q_3 = 12$, so $\text{IQR} = 6$
Lower half: 2, 5, 6, 7, 8. Upper half: 9, 10, 12, 13, 25. Take the middle of each.
$25 \gt 21$, so $25$ is an outlier
1.5 × 6 = 9. Anything above 12 + 9 = 21 or below 6 − 9 = −3 is an outlier.

In a box plot, the box runs from $Q_1$ to $Q_3$ with a line at the median. The whiskers reach the smallest and largest values that are not outliers, and outliers are marked with a cross.

Shape

ShapeWhat it looks likeMean vs median
SymmetricBoth sides roughly mirror each otherAbout equal
Positively skewedBunched on the left, long tail to the rightMean bigger
Negatively skewedBunched on the right, long tail to the leftMean smaller
BimodalTwo peaksNeither describes it well

The skew is named after the direction of the tail, not the peak. Incomes are positively skewed: most people earn moderate amounts and a few earn a great deal.

Comparing with parallel box plots

Parallel box plots are drawn on the same scale so two groups can be compared at a glance. Compare three things: centre (median), spread (IQR and range) and shape.

Example 2●●

Two classes sat the same test. Class A: min $40$, $Q_1 = 60$, median $65$, $Q_3 = 70$, max $85$. Class B: min $35$, $Q_1 = 55$, median $72$, $Q_3 = 80$, max $98$. Compare them.

Centre: Class B's median ($72$) is higher than Class A's ($65$).
Compare the medians first.
Spread: Class B is much more spread out.
IQR for A is 70 − 60 = 10; for B it is 80 − 55 = 25.
Class B did better on average, but its results were less consistent than Class A's.
A good comparison says what the numbers mean in context.

Your turn

Is $23$ an outlier in the data $4, 6, 7, 7, 8, 9, 10, 11, 23$?

Show the working

Nine values, so the median is the 5th: $8$. Lower half $4, 6, 7, 7$ gives $Q_1 = 6.5$. Upper half $9, 10, 11, 23$ gives $Q_3 = 10.5$. $\text{IQR} = 4$, so the upper fence is $10.5 + 1.5 \times 4 = 16.5$. Since $23 \gt 16.5$, yes, it is an outlier.

Flashcards
IQR
$Q_3 - Q_1$: the spread of the middle $50\%$.
Outlier rule
Below $Q_1 - 1.5 \times \text{IQR}$ or above $Q_3 + 1.5 \times \text{IQR}$.
Positively skewed
Long tail to the right. The mean is bigger than the median.
Practice
  1. A council wants to know how often residents use public transport. Which sample is most likely to be biased?

  2. Find the median of $3, 7, 8, 12, 15, 20$.

  3. Find the mean of $4, 8, 9, 11, 13$.

  4. For the data $2, 5, 6, 7, 8, 9, 10, 12, 13, 25$, find $Q_1$.

  5. A histogram has most values on the left and a long tail to the right. The data is:

  6. A data set has $Q_1 = 20$ and $Q_3 = 30$. Above what value is a data point an outlier?

  7. Class A: median $65$, IQR $10$. Class B: median $72$, IQR $25$. Which statement is correct?

  8. Find the IQR of $3, 5, 6, 8, 9, 11, 12, 14, 30$.

  9. Challenge: for the data in the previous question, find the upper outlier fence $Q_3 + 1.5 \times \text{IQR}$. (Is $30$ an outlier?)

  10. Challenge: the mean of five numbers is $12$. A sixth number is added and the mean rises to $14$. Find the sixth number.

Formula sheet