Statistics · Averages & range
1 / 14
Averages from a frequency table
Mean, median, mode and range from a discrete frequency table — why the mean is the sum of the fx column divided by the total FREQUENCY, not by the number of rows, and how to run it backwards to find a missing frequency.
Statistics · Averages & range
Averages from a frequency table
Mean, median, mode and range from a discrete frequency table — why the mean is the sum of the fx column divided by the total FREQUENCY, not by the number of rows, and how to run it backwards to find a missing frequency.
Why it works
A frequency table is not a new kind of data. It is a compressed list. Somebody wrote down twenty numbers, noticed how much repetition there was, and squashed them onto four lines:| Goals scored, | Frequency, |
|---|---|
| 0 | 5 |
| 1 | 8 |
| 2 | 4 |
| 3 | 3 |
— twenty numbers, in order, with nothing lost. Every average you already know is still the same average of that list; the table just lets you compute it without writing the list out.
The mean. The mean of a list is
So you need two numbers, and the table gives you both.
The total of all the values. Five s contribute ; eight s contribute ; four s contribute ; three s contribute . Adding: goals in total. That is exactly what the column is — value how often it happened, one row at a time — and its total is written .
How many values there are. Not four. There were twenty matches, and twenty is the total of the frequency column: , written .
The trap, made concrete. The single most common wreck in this topic is dividing by the number of rows:
Nobody in that table scored more than goals, so no average of the list can be above . The counts how many different values appeared, not how many values there were. Divide the total of numbers by and you get the mean of a list four numbers long — a list nobody collected.
A second version of the same slip is averaging the column on its own: . That treats , , and as equally common. They are not: happened eight times and only three times, so the mean should be dragged down towards — and is. Two sanity checks worth running every time: the mean must lie between the smallest and largest values, and it must sit nearest the values with the biggest frequencies.
The mode. The mode is the value that happens most often. The biggest number in the frequency column is — but is how often, not what. Look across to the value on that row: the mode is goal. The mode always comes from the column; the frequency column only tells you which row to read.
The median. The median is the middle value of the list in order — and the table is already in order, because the rows run from the smallest value to the largest. With values the middle sits at position
i.e. halfway between the th and the th value. Now count down the frequency column, keeping a running total: positions – are the s, positions – are the s. Both the th and the th value land inside that second block, so the median is . Counting down the frequency column is walking along the list — that is the whole reason it works. What it is not is "the middle row": the middle of four rows would suggest , which counts rows rather than values.
The range. Range is largest value smallest value, and values live in the column: goals. The frequency column never enters it — is the spread of the frequencies, which answers a question nobody asked.
Running it backwards. Because the mean is built from and , you can be told the mean and asked for a missing frequency. Call it : it appears in both totals, so becomes a linear equation in . Multiply up, collect the terms, solve — then always substitute back and check the mean really comes out.