Mean from a Frequency Table
A survey asks 30 households how many cars they own. Nobody wants to write the number
2 down twelve separate times, so the results arrive as a
frequency table: "5 households have
1 car, 12 have 2
cars, 13 have 3 cars".
Now find the mean number of cars. Tempting shortcut: average the values
1, 2, 3 to get 2 — but that's wrong.
It pretends one household owns each amount, when really 13 of them own
three cars. The many three-car homes should pull the mean upward. The fix is to
weight each value by how often it happens.
The method: build an f \times x column
When data comes as a frequency table, each value is listed once with how often it occurs. The mean
is still "total ÷ how many", but a value that occurs ten times must be counted ten times over. So
multiply each value by its frequency:
\text{mean} = \frac{\sum (\text{value} \times \text{frequency})}{\sum \text{frequency}} = \frac{\sum f x}{\sum f}
Add an f \times x column, total it to get
\sum f x, total the frequencies to get \sum f,
and divide. Here is a small worked table where value 1 occurs
4 times, 2 occurs 6
times and 3 occurs 10 times:
| Value (x) | Frequency (f) | f \times x |
| 1 | 4 | 4 |
| 2 | 6 | 12 |
| 3 | 10 | 30 |
| Total | 20 | 46 |
Here \sum f = 4 + 6 + 10 = 20 (20 items in all) and
\sum f x = (1\times 4) + (2\times 6) + (3\times 10) = 46. So the mean is
46 \div 20 = 2.3.
Worked example 1 — goals per match
A football team's goals in their last 20 matches:
| Goals (x) | Matches (f) | f \times x |
| 0 | 6 | 0 |
| 1 | 7 | 7 |
| 2 | 4 | 8 |
| 3 | 3 | 9 |
| Total | 20 | 24 |
\sum f = 6 + 7 + 4 + 3 = 20 matches, and
\sum f x = 0 + 7 + 8 + 9 = 24 goals. The mean is
24 \div 20 = 1.2 goals per match.
Notice the row 0 \times 6 = 0 still counts: those six no-score matches
drag the mean down, which is exactly right. And 1.2 is not a whole
number — no single match ever ends in 1.2 goals. That's fine: an
average describes the set, not any one match. It just says the team scores a
little over one goal in a typical game.
Worked example 2 — working backwards from the totals
The frequency table is a two-way street. Suppose you're told a group of pupils sat a spelling test
and the mean score was 7, with \sum f = 25
pupils. What was the total of all their marks?
Rearrange \text{mean} = \dfrac{\sum f x}{\sum f} to get
\sum f x = \text{mean} \times \sum f = 7 \times 25 = 175. So the whole
class scored 175 marks between them. Being able to flip between "mean",
"total" and "how many" is a genuinely useful skill — it's how you'd check whether one missing
pupil's mark still fits.
Worked example 3 — back to the car survey
Let's finish the survey we opened with: 5 households with
1 car, 12 with 2,
and 13 with 3.
| Cars (x) | Households (f) | f \times x |
| 1 | 5 | 5 |
| 2 | 12 | 24 |
| 3 | 13 | 39 |
| Total | 30 | 68 |
\sum f = 5 + 12 + 13 = 30 households (matching the survey size), and
\sum f x = 5 + 24 + 39 = 68 cars in total. The mean is
68 \div 30 = 2.27 cars per household (to 2 d.p.).
Sanity check: the mean sits between the smallest value 1 and the largest
3, and leans toward 3 because most households
own three cars. If your answer ever lands outside the range of the values, you've divided
by the wrong thing — almost always the row-count trap below.
Two slips cause almost every wrong answer here:
-
Divide by \sum f, not by the number of rows. If
30 households were surveyed, you divide by 30
— the total number of data items — not by the 5 rows of the
table. The rows are just the different values; the frequencies tell you how many items there
really are.
-
Multiply first, then add. The mean is
\dfrac{\sum (f \times x)}{\sum f}, so each value must be multiplied by
its frequency before anything is totalled. Adding the values on their own — or adding
f and x instead of multiplying them — throws
the weighting away and gives nonsense.
The f \times x idea is exactly a weighted average, and
once you spot it you see it everywhere:
-
Your course grade. If the exam is worth 70\% and
coursework 30\%, your final mark weights each score by its
importance — same sum, just with percentages as the "frequencies".
-
A cricketer's batting average and a shop's star rating are both
\sum f x \div \sum f in disguise: a rating of "mostly 5 stars with a
few 1s" is those star values weighted by how many people gave each.
The very same method handles grouped data too — you just use the midpoint of each
class as the value x to get an
estimated mean.