Classify data, organise it in a frequency table, and find the arithmetic mean, median, mode and harmonic mean of ungrouped data, with or without frequencies.
Statistics is the science of collecting, organising, summarising and interpreting data so that sound decisions can be made. A full data set is often too large to read, so we summarise it with a few numbers: a typical value (an average, also called a measure of central tendency) and a measure of how spread out the values are (Lesson 4).
Raw data such as $3, 5, 3, 4, 5, 3$ are tallied into a frequency table. The frequency $f$ of a value $x$ is the number of times $x$ occurs, and $n = \sum f$ is the total.
| $x$ | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| $f$ | 4 | 7 | 10 | 6 | 3 |
The arithmetic mean (the "average" of everyday speech) is the sum of the values divided by their number: $$\bar{x} = \frac{\sum x}{n}, \qquad \text{and for a frequency table} \qquad \bar{x} = \frac{\sum fx}{\sum f}.$$ Two facts are used constantly: $\sum x = n\bar{x}$ (the total can be recovered from the mean) and $\sum (x - \bar{x}) = 0$ (the values balance about the mean). The mean uses every value, so a very large or very small value pulls it.
Combined mean. If a group of $n_1$ values has mean $\bar{x}_1$ and another group of $n_2$ values has mean $\bar{x}_2$, the whole set has mean $$\bar{x} = \frac{n_1 \bar{x}_1 + n_2 \bar{x}_2}{n_1 + n_2}.$$ Never average the two means directly unless $n_1 = n_2$.
Example: Find the mean, median and mode of $7, 3, 9, 4, 3, 8, 3, 6$. Here $n = 8$ and $\sum x = 43$, so $\bar{x} = \dfrac{43}{8} = 5.375$. In order the data are $3, 3, 3, 4, 6, 7, 8, 9$; as $n$ is even the median is the average of the 4th and 5th values, $\dfrac{4 + 6}{2} = 5$. The value $3$ occurs most often, so the mode is $3$.
Arrange the data in order. The median is the middle value: the $\dfrac{n+1}{2}$th value when $n$ is odd, and the mean of the $\dfrac{n}{2}$th and $\left(\dfrac{n}{2}+1\right)$th values when $n$ is even. It is not affected by extreme values. For a frequency table, find the position in the cumulative frequency.
The mode is the most frequent value. In a frequency table it is the $x$ with the largest $f$. There may be two modes (bimodal) or none if every value occurs equally often.
Example: For the table above ($x = 1, \dots, 5$ with $f = 4, 7, 10, 6, 3$), $n = 30$. $\sum fx = 4 + 14 + 30 + 24 + 15 = 87$, so $\bar{x} = \dfrac{87}{30} = 2.9$. The cumulative frequencies are $4, 11, 21, 27, 30$; the 15th and 16th values both lie in the third group, so the median is $3$. The largest frequency is $10$, so the mode is $3$.
The harmonic mean of $x_1, \dots, x_n$ (all non-zero) is $$H = \frac{n}{\dfrac{1}{x_1} + \dfrac{1}{x_2} + \cdots + \dfrac{1}{x_n}} = \frac{n}{\sum \frac{1}{x}}, \qquad \text{with frequencies} \qquad H = \frac{\sum f}{\sum \frac{f}{x}}.$$ It is the correct average for rates when the same quantity is shared equally: if you cover equal distances at speeds $x_1$ and $x_2$, the average speed for the whole journey is their harmonic mean, not their arithmetic mean (the slower leg takes more time).
Example: A cyclist rides the first $12\text{ km}$ at $40\text{ km h}^{-1}$ and the return $12\text{ km}$ at $60\text{ km h}^{-1}$. The average speed is the harmonic mean $H = \dfrac{2}{\frac{1}{40} + \frac{1}{60}} = \dfrac{2}{\frac{5}{120}} = 48\text{ km h}^{-1}$. Check: time $= \dfrac{12}{40} + \dfrac{12}{60} = 0.5\text{ h}$ for $24\text{ km}$, and $\dfrac{24}{0.5} = 48$.
Exam tip: Paper II Statistics questions are short, so lose no marks to arithmetic. Write the formula, substitute, then compute. When a question gives the mean and $n$, use $\sum x = n\bar{x}$ to find a missing, corrected or added value; and for "mean of two groups" always use the weighted (combined) mean. The harmonic mean appears whenever the data are speeds or rates over equal distances.