Handling Data · Data · Lesson 5
Finding the Median and the Mode
The median is the 'middle' value of a set of data, and the mode is the value that occurs most often. In this lesson you will find the median of data with an odd or even number of values and of a frequency table, find the mode, and decide which of mean, median and mode best describes a set of data.
By the end you will be able to
- ✔Arrange data in order and find the median of an odd or an even number of values.
- ✔Find the median from a frequency table using the position (n + 1) ÷ 2.
- ✔Find the mode and say when a data set has two modes or none.
- ✔Choose and justify the best measure of central tendency for a real situation.
Key words
- Median
- The middle value of a data set arranged in order.
- Mode
- The value that occurs most often in a data set.
- Array
- The data arranged in order from smallest to largest.
- Measure of central tendency
- A single value (mean, median or mode) that describes the centre of a data set.
Curriculum reference
Content standard: B7.4.1.2 Determine the measures of central tendency (mean, median, mode) for a given ungrouped data and use it to solve problems.
Indicator: Calculate the median for a given ungrouped data and use it to solve problems.
Starter
What does a typical house rent?
Five families in a Takoradi compound pay monthly rents of GH₵100, GH₵100, GH₵110, GH₵120 and GH₵10,000 (the last is a big shop). The mean rent is GH₵2,086, which describes nobody! The middle rent, GH₵110, tells the truth about a typical family. That middle value is the median.
1. The median of ungrouped data
The median is the middle value when the data are arranged in order. Half of the values are smaller than or equal to it, and half are larger than or equal to it. Like the median strip that divides a road into two equal halves, the median divides the data into two equal halves.
- 1Arrange the data in order, from the smallest to the largest. This is called an array.
- 2Count how many values there are, .
- 3If is odd, the median is the middle value, in position .
- 4If is even, there are two middle values, in positions and . The median is the mean of those two.
Odd number of values. Find the median of 19, 29, 36, 15 and 20. In order: 15, 19, 20, 29, 36. There are 5 values, so the middle one is the 3rd: the median is 20.
Even number of values. Find the median of 8, 9, 7, 6, 8 and 10. In order: 6, 7, 8, 8, 9, 10. There are 6 values, so the middle two are the 3rd and 4th, both equal to 8. The median is (8 + 8) ÷ 2 = 8. If the middle two were 7 and 9, the median would be (7 + 9) ÷ 2 = 8, a value that is not even in the list.
▶ Always arrange the data in order before looking for the middle. The red boxes show the middle value(s).
2. The median from a frequency table
When data are in a frequency table, they are already in order by value, so we do not need to write all the values. We find the position of the middle value and use the running total (cumulative frequency) of the frequencies to see which score it falls in.
| Score | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| Frequency | 2 | 6 | 4 | 5 | 3 |
| Running total | 2 | 8 | 12 | 17 | 20 |
There are 20 values (an even number), so the median is the mean of the 10th and 11th values. The running total reaches 8 after score 2 and 12 after score 3, so the 9th to 12th values are all 3. The 10th and 11th are both 3, so the median is 3.
Now a table with an odd total. The ages of 39 children at a party are shown below.
| Age (x) | 1 | 3 | 5 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|
| Frequency (f) | 2 | 5 | 6 | 10 | 8 | 5 | 3 |
| Running total | 2 | 7 | 13 | 23 | 31 | 36 | 39 |
With 39 values, the median is at position (39 + 1) ÷ 2 = 20th. The running total passes 13 and reaches 23 at age 6, so the 14th to 23rd values are all 6. The 20th value is 6, so the median age is 6 years.
▶ The tallest bar is age 6 — it is both the mode and the group containing the median.
3. The mode
The mode is the value that occurs most often. It is the only measure that can also be used for non-number data, such as the most popular network or the most common shoe size, which is why shop owners use it to decide what stock to buy.
- Shoe sizes 38, 40, 39, 40, 41, 40, 39: size 40 occurs 3 times, so the mode is 40.
- In a frequency table, the mode is the value with the highest frequency: age 6 has frequency 10, so the mode of the ages is 6.
- A data set can have two modes (bimodal), for example 2, 3, 3, 5, 5, 9 has modes 3 and 5.
- If every value occurs once, there is no mode.
4. Mean, median or mode? Choosing the best
Each measure has a job. The mean uses every value, so it is best when the data are fairly even. The median is not affected by very large or very small values, so it is best when there are extreme values (like the GH₵10,000 shop rent). The mode is best for the most popular choice, and is the only choice for categories.
| Measure | Calculated by | Best used when |
|---|---|---|
| Mean | Sum ÷ number of values | Values are evenly spread; you need a fair-share total |
| Median | Middle of the ordered data | There are extreme values; you want the typical middle |
| Mode | Most frequent value | You want the most popular or most common item |
For the data 2, 3, 3, 4 and 8 (goals scored in five matches): mean = 20 ÷ 5 = 4, median = 3 (the middle value), mode = 3. The big score of 8 pulls the mean up, but the median and mode show that a typical match had 3 goals.
Worked examples
Try each one yourself first, then open the solution and compare every step.
Example 1
Odd number of values
Show the solution
- Step 1Arrange in order: 15, 19, 20, 29, 36.
- Step 2There are 5 values; the middle position is (5 + 1) ÷ 2 = 3rd.
- Step 3The 3rd value is 20.
Answer: 20
Example 2
Even number of values
Show the solution
- Step 1Order: 6, 7, 8, 8, 9, 10.
- Step 2Six values, so the two middle values are the 3rd and 4th: 8 and 8.
- Step 3Median = (8 + 8) ÷ 2 = 8.
Answer: 8
Example 3
Median and mode of prices
Show the solution
- Step 1Order: 10, 12, 14, 15, 15, 18, 20.
- Step 2Seven values, so the median is the 4th: 15.
- Step 315 occurs twice and every other price once, so the mode is 15.
Answer: Median GH₵15, mode GH₵15
Example 4
Median from a frequency table
▶ The 10th and 11th scores are both in the bar for score 3, so the median is 3.
Show the solution
- Step 1Total frequency = 2 + 6 + 4 + 5 + 3 = 20 (even).
- Step 2The middle values are the 10th and 11th.
- Step 3Running totals: 2, 8, 12, 17, 20. The 9th to 12th values are score 3.
- Step 4Both middle values are 3, so the median = (3 + 3) ÷ 2 = 3.
Answer: 3
Example 5
Median age at a party
Show the solution
- Step 1Total = 2 + 5 + 6 + 10 + 8 + 5 + 3 = 39 (odd).
- Step 2Median position = (39 + 1) ÷ 2 = 20th.
- Step 3Running totals: 2, 7, 13, 23, 31, 36, 39. The 14th to 23rd values are age 6.
- Step 4The 20th value is 6.
Answer: 6 years
Summary
- The median is the middle value of data arranged in order.
- Odd number of values: the middle one, in position (n + 1) ÷ 2. Even number: the mean of the two middle values.
- For a frequency table, use running totals to find which value is in the middle position.
- The mode is the value that occurs most often (not its frequency); there may be two modes or none.
- Use the median when extreme values would distort the mean; use the mode for the most popular item.
Practice: 15 questions
5 easy, 5 medium, 5 hard. Each one is marked straight away, with a full worked solution.
You can practise without an account, but sign up free or sign in to save your progress.