- Foundation
- About 15 min
- 5 practice questions
Mean and median from frequency tables, and spreadsheets
Find the mean and median of data given in a frequency table without listing every value, and use a spreadsheet's cells, ranges, SUM and AVERAGE to total and average large tables.
If something looks wrong, please tell us.
By the end of this lesson you can
- Calculate the mean of data in a frequency table, weighting each value by its frequency.
- Find the median from a frequency table using running totals.
- Name spreadsheet cells and ranges, and write SUM and AVERAGE formulas.
When many people give the same answer, data is often shown in a frequency table: each value with the number of times it occurs. A frequency table saves writing, but you must remember that each value counts as many times as its frequency.
The mean from a frequency table
30 students were asked how many books they read in the summer holidays (made-up data for practice).
| Books read | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| Number of students (frequency) | 3 | 12 | 8 | 4 | 2 | 1 |
| Value × frequency | 3 | 24 | 24 | 16 | 10 | 6 |
A common mistake is to average just the values: (1 + 2 + 3 + 4 + 5 + 6) ÷ 6 = 3.5. That treats every value as if it occurred once. Instead:
Sum of all the values = 3 + 24 + 24 + 16 + 10 + 6 = 83.
Number of values = 3 + 12 + 8 + 4 + 2 + 1 = 30.
Mean = 83 ÷ 30 ≈ 2.77 books. This is much less than 3.5 because so many students read only 2 books.
Mean from a frequency table = (sum of value × frequency) ÷ (sum of frequencies).
The median from a frequency table
With 30 values, the median is the mean of the 15th and 16th values in order. We do not need to write out all 30; add the frequencies from the smallest value (a running total) until we pass those positions.
Median from a frequency table
- Find the middle position(s) For n values: the ((n + 1) ÷ 2)th, or the (n ÷ 2)th and next when n is even.
- Keep a running total of frequencies Start from the smallest value.
- Read off the value at each middle position
- Average the two values if n is even
Worked example 1: median books
Running totals: value 1 covers positions 1-3; value 2 covers positions 4-15 (3 + 12 = 15); value 3 covers positions 16-23 (15 + 8 = 23).
The 15th value is 2 and the 16th value is 3, so the median = (2 + 3) ÷ 2 = 2.5 books.
Worked example 2: shoe sizes
Shoe sizes of 25 people: size 5 (3 people), size 6 (7), size 7 (8), size 8 (5), size 9 (2).
Mean = (5×3 + 6×7 + 7×8 + 8×5 + 9×2) ÷ 25 = (15 + 42 + 56 + 40 + 18) ÷ 25 = 171 ÷ 25 = 6.84.
Median: 25 values, so the 13th. Running totals: 3, 10, 18, …; positions 11-18 are size 7, so the median is size 7. For a shop ordering shoes, the median (or the most common size, also 7) is more useful than 6.84, which is not a real size.
Spreadsheets
For a big table, such as the marks of a whole class in six subjects, totals and averages take a long time by hand. A spreadsheet is a computer program that works like a digital notebook of rows and columns of boxes called cells. Columns are labelled A, B, C, … and rows 1, 2, 3, …, so each cell has a name such as C4 (column C, row 4). A range of cells is written Start:End, for example B2:B5 for four cells in column B, or B3:D3 for three cells in row 3. A cell can hold text, a number or a formula beginning with =.
| Row | A | B | C | D | E |
|---|---|---|---|---|---|
| 1 | Name | Hindi | Maths | Science | Total |
| 2 | Anil | 32 | 45 | 38 | =SUM(B2:D2) gives 115 |
| 3 | Bhavna | 41 | 36 | 44 | =SUM(B3:D3) gives 121 |
| 4 | Charu | 28 | 40 | 35 | =SUM(B4:D4) gives 103 |
| 5 | Deepak | 37 | 49 | 41 | =SUM(B5:D5) gives 127 |
| 6 | Average | =AVERAGE(B2:B5) gives 34.5 | =AVERAGE(C2:C5) gives 42.5 | =AVERAGE(D2:D5) gives 39.5 |
Check one by hand: the Maths average is (45 + 36 + 40 + 49) ÷ 4 = 170 ÷ 4 = 42.5. ✓ The great advantage is that if a mark is corrected, every total and average that uses it updates by itself. Any spreadsheet program can do this; if computers are shared, work in groups.
Key takeaways: in a frequency table, multiply each value by its frequency before adding, and divide by the total frequency. Find the median from running totals of the frequencies. In a spreadsheet, cells are named by column and row, ranges are written Start:End, and =SUM(range) and =AVERAGE(range) do the arithmetic.
Check your understanding
-
1. The values 2, 3 and 4 occur with frequencies 5, 3 and 2. What is the mean?
- 3
- 2.7
- 9
- 2.5
Show answer
Answer: B. Sum = 2×5 + 3×3 + 4×2 = 10 + 9 + 8 = 27. Number of values = 5 + 3 + 2 = 10. Mean = 27 ÷ 10 = 2.7. Averaging just 2, 3 and 4 would wrongly give 3.
-
2. The values 1, 2, 3, 4 occur with frequencies 4, 6, 7, 3. What is the median?
- 2
- 3
- 2.5
- 2.75
Show answer
Answer: C. There are 20 values, so the median is the mean of the 10th and 11th. Running totals: 4, 10, 17, 20. The 10th value is 2 and the 11th is 3, so the median is (2 + 3) ÷ 2 = 2.5.
-
3. Which spreadsheet formula finds the average of the marks in cells B2 to B30?
- =AVERAGE(B2:B30)
- =SUM(B2:B30)
- =AVERAGE(B2+B30)
- =B2:B30/2
Show answer
Answer: A. =AVERAGE(B2:B30) averages every cell in the range B2 to B30. =SUM gives the total, and =AVERAGE(B2+B30) uses only two cells.
-
4. Family sizes 3, 4, 5 and 6 occur with frequencies 2, 5, 2 and 1. What is the mean family size?
- 4.5
- 10.5
- 4
- 4.2
Show answer
Answer: D. Sum = 3×2 + 4×5 + 5×2 + 6×1 = 6 + 20 + 10 + 6 = 42. Number of families = 10. Mean = 42 ÷ 10 = 4.2. Averaging the four sizes alone would wrongly give 4.5.
-
5. Which cells does the formula =SUM(B3:G3) add?
- Only B3 and G3
- The six cells from B3 to G3 in row 3
- Column B from row 3 to row 7
- Every cell in columns B to G
Show answer
Answer: B. The range B3:G3 starts at B3 and ends at G3, all in row 3: B3, C3, D3, E3, F3 and G3. The formula adds these six cells.
Sign in to keep track of the lessons you finish.