Describing a data set
Descriptive statistics summarise data in a few numbers. Two questions matter: where is the centre, and how spread out are the values?
Measures of centre
- Mean = sum of the values ÷ how many there are. It uses every value, so it is pulled by extreme values.
- Median = the middle value when sorted (the average of the two middle values if the count is even). It is resistant to outliers.
- Mode = the most frequent value.
In a right-skewed distribution (a long tail of large values) the mean is pulled above the median. In a left-skewed one the mean is below the median. In a symmetric one they are about equal.
Measures of spread
- Range = maximum − minimum. Simple but based only on two values.
- Quartiles split sorted data into quarters. IQR = Q3 − Q1 is the spread of the middle half and is resistant to outliers.
- Standard deviation (SD) measures a typical distance of values from the mean. Variance is the SD squared.
For a sample, the variance is s² = Σ(x − x̄)² / (n − 1). The n − 1 (rather than n) corrects for the fact that a sample's values lie closer to their own mean than to the true population mean, so dividing by n would underestimate the spread.
Worked example
Data (8 values): 2, 4, 4, 4, 5, 5, 7, 9.
- Mean = (2 + 4 + 4 + 4 + 5 + 5 + 7 + 9) / 8 = 40 / 8 = 5.
- Median: the sorted list's middle two values are 4 and 5, so the median is 4.5.
- Mode = 4 (it appears three times).
- Range = 9 − 2 = 7.
- Deviations from the mean: −3, −1, −1, −1, 0, 0, 2, 4. Squared: 9, 1, 1, 1, 0, 0, 4, 16, which sum to 32.
- Sample variance = 32 / 7 ≈ 4.57, so the sample SD ≈ 2.14. (If these 8 values were an entire population, the variance would be 32 / 8 = 4 and the SD exactly 2.)
Now see how an outlier affects the results. Replace 9 with 40. The mean becomes (31 + 40) / 8 = 8.875, a big jump, while the median stays 4.5. This is why income data, with a few very high earners, is usually summarised with the median.
Choosing summaries
- Roughly symmetric data without outliers: mean and SD.
- Skewed data or outliers: median and IQR.
- Categories: mode or percentages.
Common mistakes
- Reporting the mean of skewed data without comment.
- Forgetting to sort before finding the median.
- Dividing by n instead of n − 1 when working with a sample.