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.
Find the five-number summary of $13, 7, 2, 25, 9, 6, 12, 8, 10, 5$, and check for outliers.
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
| Shape | What it looks like | Mean vs median |
|---|---|---|
| Symmetric | Both sides roughly mirror each other | About equal |
| Positively skewed | Bunched on the left, long tail to the right | Mean bigger |
| Negatively skewed | Bunched on the right, long tail to the left | Mean smaller |
| Bimodal | Two peaks | Neither 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.
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.
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.
A council wants to know how often residents use public transport. Which sample is most likely to be biased?
People at a train station already use public transport, so they would overestimate how often residents use it.
Find the median of $3, 7, 8, 12, 15, 20$.
Six values, so the median is halfway between the 3rd and 4th: $\dfrac{8 + 12}{2} = 10$.
Find the mean of $4, 8, 9, 11, 13$.
Total $= 45$. Mean $= 45 \div 5 = 9$.
For the data $2, 5, 6, 7, 8, 9, 10, 12, 13, 25$, find $Q_1$.
The lower half is $2, 5, 6, 7, 8$. Its middle value is $6$.
A histogram has most values on the left and a long tail to the right. The data is:
Skew is named after the tail. A tail to the right is positive skew.
A data set has $Q_1 = 20$ and $Q_3 = 30$. Above what value is a data point an outlier?
$\text{IQR} = 10$. Upper fence $= 30 + 1.5 \times 10 = 45$.
Class A: median $65$, IQR $10$. Class B: median $72$, IQR $25$. Which statement is correct?
B's median is higher, so it did better on average. B's IQR is bigger, so its results were more spread out (less consistent).
Find the IQR of $3, 5, 6, 8, 9, 11, 12, 14, 30$.
Nine values: the median is the 5th, $9$. Lower half $3, 5, 6, 8$ gives $Q_1 = 5.5$. Upper half $11, 12, 14, 30$ gives $Q_3 = 13$. $\text{IQR} = 13 - 5.5 = 7.5$.
Challenge: for the data in the previous question, find the upper outlier fence $Q_3 + 1.5 \times \text{IQR}$. (Is $30$ an outlier?)
$13 + 1.5 \times 7.5 = 13 + 11.25 = 24.25$. Since $30 \gt 24.25$, $30$ is an outlier.
Challenge: the mean of five numbers is $12$. A sixth number is added and the mean rises to $14$. Find the sixth number.
Old total $= 5 \times 12 = 60$. New total $= 6 \times 14 = 84$. Sixth number $= 84 - 60 = 24$.
Coaching Centre