Compare Two Data Sets
Two classes, two machines, before and after: put the two groups side by side. Which one is higher on average, which one is more spread out, and how much do they overlap?
Comparing Groups
Two groups can have the same average and still be very different: in one, everyone scores close to the mean; in the other, the scores run from very low to very high. So compare both the centre (mean or median) and the spread (standard deviation or IQR).
Box plots side by side show this at a glance: the line in each box is the median, the box holds the middle half of the values, and the whiskers reach to the most extreme values that are not outliers. Boxes that hardly overlap point to a real difference; to test it properly you need a statistical test, such as a t-test.
Side-by-Side Box Plots
nSide by Side
| Statistic | A | B |
|---|
Worked Techniques
Two machines can fill bottles with the same average amount, while one of them is far less consistent. The standard deviation shows which.
If one group has a few extreme values, compare the medians: one outlier can pull a mean a long way, but hardly moves the median.
To compare the spread of groups with very different sizes — elephants and mice, say — divide the standard deviation by the mean.
Sources & Verification
- D. C. Montgomery & G. C. Runger, Applied Statistics and Probability for Engineers, 6th ed., Wiley, 2013 — Ch. 6 (Descriptive Statistics).