What you get from a list of numbers
- Count, sum, minimum, maximum and range.
- Mean, median and mode: three different ideas of “typical”.
- Quartiles Q1 and Q3 and the interquartile range (IQR). Here Q1 is the median of the lower half and Q3 the median of the upper half.
- Variance and standard deviation, both sample and population.
Mean, median and mode by hand
When the data has an extreme value the mean is pulled towards it but the median barely moves. That is why house prices and incomes are usually quoted as medians.
Data: 4, 8, 6, 5, 3, 9
- Sum: 35, so the mean is 35/6 ≈ 5.83.
- Sorted: 3, 4, 5, 6, 8, 9. With six values the median is the average of the middle two: (5 + 6)/2 = 5.5.
- No value repeats, so there is no mode.
- Range: 9 − 3 = 6.
Answer: Mean 5.83, median 5.5, range 6
Standard deviation step by step
Data: 2, 4, 4, 4, 5, 5, 7, 9
- Mean: 40/8 = 5.
- Squared deviations from 5: 9, 1, 1, 1, 0, 0, 4, 16. Their sum is 32.
- Population variance: 32/8 = 4, so σ = 2.
- Sample variance: 32/7 ≈ 4.571, so s ≈ 2.138.
Answer: σ = 2 (population), s ≈ 2.138 (sample)
Sample or population?
Use the population formula, dividing by n, when your list is every value you care about, such as the marks of one class. Use the sample formula, dividing by n − 1, when the list is a sample drawn from a bigger group, such as 30 voters out of a city. Dividing by n − 1 corrects the tendency of a sample to understate the spread.
Quartiles can differ between textbooks
There are several accepted methods for quartiles and they give slightly different answers on small data sets. If your course uses a specific method, compare it with the steps shown here before you trust a mismatch.
Frequently asked questions
How should I paste my data?
Separate numbers with commas, spaces or new lines. You can paste a column straight from a spreadsheet.
What if there are two modes?
The data is then bimodal and both values are listed. If every value appears once there is no mode.