Skip to the page
Home Campus
Start free

The Median

The median, the middle value of data in order: from a list, a dot diagram, a frequency table, a histogram and a stem-and-leaf diagram, a missing value, and why an extreme value hardly moves it.

What You Should Already Know

  • The mean (lesson 12.7) is the sum of the values divided by the number of values.
  • A dot diagram, a stem-and-leaf diagram and an ungrouped histogram (lessons 12.1 to 12.3) show the values already in order, from the smallest to the largest.

The Middle Value

The mean uses the size of every value. The median uses only their order: it is the value in the middle when the data are lined up from the smallest to the largest. Half of the values lie at or below it, and half at or above it.

The median

Arrange the nn values in order, from the smallest to the largest. The median is at position n+12\dfrac{n + 1}{2}.

If nn is odd, the median is the middle value.

If nn is even, n+12\dfrac{n + 1}{2} ends in .5 (such as 4.5), and the median is the mean of the two middle values (the 4th and 5th).

n+12\dfrac{n + 1}{2} is the position of the median, not the median.

Example 1: An odd number of values

Seven pupils scored these marks in a Science quiz: 68, 75, 82, 91, 70, 88, 79. Find the median mark.

Solution

In order: 68, 70, 75, 79, 82, 88, 91.

n=7n = 7, so the median is at position 7+12=4\dfrac{7 + 1}{2} = 4: the 4th value, 79.

On a dot diagram, 3 marks lie below 79 and 3 above it:

Dot diagram of 7 marks: 68, 70, 75, 79, 82, 88, 91, with 79 picked out; the line has a tick at every mark from 66 to 92 and is numbered at every second one6668707274767880828486889092Mark

The median mark is 79.

Example 2: An even number of values

The daily rainfall, in mm, in a town on 8 days of December was 12, 8, 19, 30, 14, 21, 9, 5. Find the median rainfall.

Solution

In order: 5, 8, 9, 12, 14, 19, 21, 30.

n=8n = 8, so the position is 8+12=4.5\dfrac{8 + 1}{2} = 4.5: the median is halfway between the 4th and 5th values, 12 and 14.

Median =12+142=13= \dfrac{12 + 14}{2} = 13.

No day had 13 mm of rain: the median of an even number of values need not be one of them.

The median rainfall is 13 mm.

Example 3: Repeated values

Six school bags cost $32, $15, $20, $15, $25 and $12. Find the median price.

Solution

In order: 12, 15, 15, 20, 25, 32. The price $15 occurs twice, and both are kept in the list.

n=6n = 6: the position is 6+12=3.5\dfrac{6 + 1}{2} = 3.5, between the 3rd and 4th values, 15 and 20.

Median =15+202=17.5.= \dfrac{15 + 20}{2} = 17.5\text{.}

The median price is $17.50.

The Median from a Dot Diagram, a Frequency Table or a Histogram

These show the values in order already, with their frequencies. There is no need to write every value out: count along, keeping a running total of the frequencies, until you reach the position of the median.

Example 4: The median from a dot diagram

The dot diagram shows how many times each of a group of people went to the supermarket in one week. Find the median number of visits.

Dot diagram of supermarket visits: 1 visit 1 dot, 2 visits 3 dots, 3 visits 4 dots, 4 visits 1 dot, 5 visits no dots, 6 visits 1 dot0123456Number of visits

Solution

Count the dots: 1+3+4+1+0+1=101 + 3 + 4 + 1 + 0 + 1 = 10 people. The position is 10+12=5.5\dfrac{10 + 1}{2} = 5.5: the median is the mean of the 5th and 6th values.

Counting from the left: 1 visit is the 1st value; 2 visits are the 2nd to 4th; 3 visits are the 5th to 8th.

The 5th and 6th values are both 3, so the median =3+32=3= \dfrac{3 + 3}{2} = 3.

The median is 3 visits.

Example 5: The median from a frequency table

A survey asked 30 households how many mobile phones they have. Find the median number of phones.

Number of phonesNumber of households
1144
2277
3399
4466
5533
6611
Total3030

Solution

n=30n = 30, so the position is 30+12=15.5\dfrac{30 + 1}{2} = 15.5: the median is the mean of the 15th and 16th values.

Keep a running total of the frequencies: 4, then 4+7=114 + 7 = 11, then 11+9=2011 + 9 = 20.

PhonesPositions
11st to 4th
25th to 11th
312th to 20th

The 15th and 16th values are among the 12th to 20th, so both are 3. There is no need to go further.

Median =3= 3.

The median is 3 phones.

Example 6: The median from a histogram

The histogram shows the number of eggs laid in one week by each of 25 hens on a farm in Lim Chu Kang. Find the median number of eggs.

Histogram of eggs laid in a week by 25 hens: 2 eggs frequency 2, 3 eggs frequency 4, 4 eggs frequency 7, 5 eggs frequency 6, 6 eggs frequency 4, 7 eggs frequency 2012345678234567Number of eggs laidFrequency

Solution

Read the frequencies from the bars: 2, 4, 7, 6, 4, 2, which add up to 25.

n=25n = 25 is odd, so the median is the value at position 25+12=13\dfrac{25 + 1}{2} = 13.

Running totals: 2 eggs takes positions 1 to 2; 3 eggs, 3 to 6; 4 eggs, 7 to 13.

The 13th value is 4 eggs.

The median number of eggs is 4.

The Median from a Stem-and-Leaf Diagram

The leaves of a stem-and-leaf diagram are in order, so the diagram is the data already arranged. Count the leaves row by row from the top (the smallest value) until you reach the position of the median, and read that value with the key.

Example 7: An odd number of leaves

The stem-and-leaf diagram shows the masses of the 17 pupils in a PE group. Find the median mass.

Stem-and-leaf diagram of 17 masses: 3 | 8; 4 | 1 2 4 5 5 7 8; 5 | 0 1 3 3 5 8; 6 | 0 2 7; key 3 | 8 means 38 kgStemLeaves384124557850133586027Key: 3 | 8 means 38 kg

Solution

n=17n = 17, so the median is the 9th value, at position 17+12=9\dfrac{17 + 1}{2} = 9.

Stem 3 holds 1 leaf (the 1st value). Stem 4 holds 7 leaves (the 2nd to 8th). So the 9th value is the first leaf on stem 5: 5 | 0, which is 50 kg.

The same diagram with the 9th value, 50 kg, picked outStemLeaves384124557850133586027Key: 3 | 8 means 38 kg

The median mass is 50 kg.

Example 8: Comparing two medians

The back-to-back stem-and-leaf diagram shows the times, in seconds, that 12 boys and 12 girls took to swim 50 m. (a) Find the median time of each group. (b) Which group was faster, taken as a whole?

Back-to-back stem-and-leaf diagram. Boys on the left: 38, 41, 43, 45, 46, 48, 50, 52, 53, 55, 57, 61. Girls on the right: 42, 44, 47, 49, 51, 53, 54, 56, 58, 59, 62, 65BoysStemGirls3842479135685134689023576251Key for Boys: 8 | 3 means 38 sKey for Girls: 4 | 2 means 42 s

Solution

(a) Each group has n=12n = 12, so the median is at position 12+12=6.5\dfrac{12 + 1}{2} = 6.5: the mean of the 6th and 7th values.

Boys (on the left, read outwards from the stem): stem 3 has 1 leaf (38); stem 4 has 5 leaves (41, 43, 45, 46, 48), the 2nd to 6th. The 6th value is 48 and the 7th is the first on stem 5, 50. Median =48+502=49= \dfrac{48 + 50}{2} = 49 s.

Girls: stem 4 has 4 leaves (42, 44, 47, 49), the 1st to 4th; stem 5 has 51, 53, 54, …, the 5th, 6th, 7th. Median =53+542=53.5= \dfrac{53 + 54}{2} = 53.5 s.

(b) A shorter time is faster. The boys' median, 49 s, is less than the girls', 53.5 s.

(a) Boys 49 s, girls 53.5 s. (b) The boys: their median time is 4.5 s shorter.

Using the Median

Example 9: A missing value

The heights, in cm, of six seedlings, from the shortest to the tallest, are 11, 14, xx, 20, 23, 27. The median height is 18 cm. Find xx.

Solution

n=6n = 6: the median is the mean of the 3rd and 4th values, xx and 20.

x+202=18\dfrac{x + 20}{2} = 18, so x+20=36x + 20 = 36 and x=16x = 16.

Check: 16 lies between 14 and 20, so the values are still in order.

x=16x = 16

Example 10: An extreme value

Five pupils took 5, 8, 10, 12 and 15 minutes to finish a task. (a) Find the mean and the median. (b) The last pupil's time was really 100 minutes, not 15. Find the mean and the median again.

Solution

(a) Mean =(5+8+10+12+15)÷5=50÷5=10= (5 + 8 + 10 + 12 + 15) \div 5 = 50 \div 5 = 10 minutes. Median == the 3rd value =10= 10 minutes.

(b) Mean =(5+8+10+12+100)÷5=135÷5=27= (5 + 8 + 10 + 12 + 100) \div 5 = 135 \div 5 = 27 minutes. The values in order are 5, 8, 10, 12, 100, so the median is still the 3rd value, 10 minutes.

TimesMeanMedian
5, 8, 10, 12, 151010
5, 8, 10, 12, 1002710

The mean uses the size of every value, so one very large value pulls it up, past four of the five times. The median depends only on the order, and the 100 is still the largest value, so the median does not move.

(a) Mean 10 minutes, median 10 minutes. (b) Mean 27 minutes, median still 10 minutes.

How far an extreme value moves the median

Making the largest value larger (or the smallest smaller) does not change the median at all. Adding or removing one value moves the median no further than the next value in the list (sometimes only halfway towards it), and sometimes not at all. So the median is hardly affected by an extreme value; the mean can be pulled a long way.

Common Mistakes

  • Taking the middle of the list as it is written, before putting it in order. For 9, 3, 12, 5, 7 the middle number written is 12, but in order (3, 5, 7, 9, 12) the median is 7.
  • Giving the position as the median: for 8 values, 4.5 is where the median is, not what it is.
  • With an even number of values, taking only one of the two middle values.
  • From a frequency table, taking the middle row, or the middle frequency, instead of counting the frequencies to the middle position.
  • Leaving out a repeated value when listing the data in order.
  • Reading the left side of a back-to-back stem-and-leaf diagram the wrong way: its leaves get larger going outwards from the stem.

Practice Questions

Try each question first, then open the solution to check your working.

Question 1

Find the median of 20, 16, 9, 3, 18, 11, 15.

ShowHide solution

In order: 3, 9, 11, 15, 16, 18, 20.

n=7n = 7: the median is the 4th value, 7+12=4\dfrac{7 + 1}{2} = 4.

The median is 15.

Question 2

The ages, in years, of eight cousins are 14, 17, 12, 15, 17, 13, 16, 12. Find their median age.

ShowHide solution

In order: 12, 12, 13, 14, 15, 16, 17, 17.

n=8n = 8: the position is 4.5, between the 4th and 5th values, 14 and 15.

Median =14+152=14.5.= \dfrac{14 + 15}{2} = 14.5\text{.}

The median age is 14.5 years.

Question 3

The dot diagram shows how many hours each of 15 pupils watched television on a Saturday. Find the median number of hours.

Dot diagram of hours of television: 0 hours 2 dots, 1 hour 3 dots, 2 hours 4 dots, 3 hours 3 dots, 4 hours 2 dots, 5 hours no dots, 6 hours 1 dot0123456Hours of television
ShowHide solution

n=15n = 15: the median is the 8th value.

Running totals: 0 hours, positions 1 to 2; 1 hour, 3 to 5; 2 hours, 6 to 9. The 8th value is 2.

The median is 2 hours.

Question 4

The table shows the scores of 16 pupils in a quiz marked out of 10. Find the median score.

ScoreNumber of pupils
5522
6633
7755
8844
9922
Total1616
ShowHide solution

n=16n = 16: the position is 8.5, so the median is the mean of the 8th and 9th values.

Running totals: score 5, positions 1 to 2; score 6, 3 to 5; score 7, 6 to 10.

The 8th and 9th values are both 7, so the median is 7.

The median score is 7.

Question 5

The table shows how many times each of 20 pupils bought bubble tea last week. Find the median.

TimesNumber of pupils
0022
1133
2255
3366
4444
Total2020
ShowHide solution

n=20n = 20: the median is the mean of the 10th and 11th values.

Running totals: 0 times, positions 1 to 2; 1 time, 3 to 5; 2 times, 6 to 10; 3 times, 11 to 16.

The 10th value is 2 and the 11th is 3, so the median =2+32=2.5= \dfrac{2 + 3}{2} = 2.5.

The median is 2.5 times.

Question 6

The histogram shows the number of textbooks in the schoolbags of 30 pupils. Find the median number of textbooks.

Histogram of textbooks in schoolbags: 2 books frequency 3, 3 books frequency 5, 4 books frequency 8, 5 books frequency 7, 6 books frequency 4, 7 books frequency 3012345678234567Number of textbooksFrequency
ShowHide solution

The frequencies are 3, 5, 8, 7, 4, 3: n=30n = 30. The median is the mean of the 15th and 16th values.

Running totals: 2 books, positions 1 to 3; 3 books, 4 to 8; 4 books, 9 to 16.

The 15th and 16th values are both 4.

The median is 4 textbooks.

Question 7

The stem-and-leaf diagram shows the marks, out of 50, of 20 pupils in a Mathematics test. Find the median mark.

Stem-and-leaf diagram of 20 marks: 2 | 3 6 7 8 9; 3 | 1 3 3 5 5 5 6 8 8; 4 | 0 1 2 2 4 5; key 2 | 3 means 23 marksStemLeaves23678931335556884012245Key: 2 | 3 means 23 marks
ShowHide solution

n=20n = 20: the median is the mean of the 10th and 11th values.

Stem 2 holds 5 leaves (1st to 5th). Stem 3 holds 31, 33, 33, 35, 35, 35, …, the 6th, 7th, 8th, 9th, 10th, 11th, ….

The 10th and 11th values are both 35, so the median is 35.

The median mark is 35.

Question 8

The stem-and-leaf diagram shows the masses of 13 durians sold at a stall. Find the median mass.

Stem-and-leaf diagram of 13 masses: 1 | 2 4 5 5 8; 2 | 0 1 3 6 7; 3 | 0 2 5; key 1 | 2 means 1.2 kgStemLeaves1245582013673025Key: 1 | 2 means 1.2 kg
ShowHide solution

n=13n = 13: the median is the 7th value, 13+12=7\dfrac{13 + 1}{2} = 7.

Stem 1 holds 5 leaves (1st to 5th). On stem 2 the leaves 0 and 1 are the 6th and 7th values.

The 7th value is 2 | 1, which is 2.1 kg by the key.

The median mass is 2.1 kg.

Question 9

Four pupils read 3, 8, yy and 15 books last term, in order from the fewest. The median is 10 books. (a) Find yy. (b) Find the mean number of books.

ShowHide solution

(a) n=4n = 4: the median is the mean of the 2nd and 3rd values, 8 and yy. 8+y2=10\dfrac{8 + y}{2} = 10, so 8+y=208 + y = 20 and y=12y = 12.

Check: 12 lies between 8 and 15.

(b) Mean =(3+8+12+15)÷4=38÷4=9.5= (3 + 8 + 12 + 15) \div 4 = 38 \div 4 = 9.5 books.

(a) y=12y = 12 (b) 9.5 books

Question 10

Seven pupils took 8, 10, 11, 12, 14, 15 and 16 minutes to walk to school. (a) Find the mean and the median. (b) The pupil who took 16 minutes moves house and now takes 45 minutes. Find the new mean and median. Which one changed?

ShowHide solution

(a) Sum =8+10+11+12+14+15+16=86.= 8 + 10 + 11 + 12 + 14 + 15 + 16 = 86\text{.} Mean =86÷7=12.28…≈12.3= 86 \div 7 = 12.28\ldots \approx 12.3 minutes (to 3 significant figures). Median == the 4th value =12= 12 minutes.

(b) New sum =86−16+45=115.= 86 - 16 + 45 = 115\text{.} Mean =115÷7=16.42…≈16.4= 115 \div 7 = 16.42\ldots \approx 16.4 minutes. The 45 is still the largest value, so the median is still the 4th value, 12 minutes.

(a) Mean 12.3 minutes, median 12 minutes. (b) Mean 16.4 minutes, median 12 minutes: only the mean changed.

Question 11

Find the mistake in each answer and give the right median. (a) Ahmad says the median of 9, 3, 12, 5, 7 is 12, "because it is in the middle". (b) Mei Ling says the median of 6, 9, 11, 13, 18, 20, 21, 25 is 4.5, "because 8+12=4.5\frac{8 + 1}{2} = 4.5".

ShowHide solution

(a) He did not put the values in order. In order: 3, 5, 7, 9, 12; the middle (3rd) value is 7.

(b) 4.5 is the position of the median, not the median. The values are in order, and the median is halfway between the 4th and 5th values: 13+182=15.5\dfrac{13 + 18}{2} = 15.5.

(a) The median is 7. (b) The median is 15.5.

Question 12

The back-to-back stem-and-leaf diagram shows the marks of 11 pupils of Class 2G and 11 pupils of Class 2H in the same test. (a) Find each class's median mark. (b) Which class did better, taken as a whole?

Back-to-back stem-and-leaf diagram. Class 2G on the left: 42, 48, 51, 55, 58, 60, 63, 67, 70, 74, 81. Class 2H on the right: 39, 45, 53, 57, 62, 64, 66, 69, 72, 78, 85Class 2GStemClass 2H3945285371586246903772804851Key for Class 2G: 2 | 4 means 42 marksKey for Class 2H: 3 | 9 means 39 marks
ShowHide solution

(a) Each class has n=11n = 11: the median is the 6th value.

Class 2G (read outwards on the left): stem 4 has 42, 48 (1st, 2nd); stem 5 has 51, 55, 58 (3rd to 5th); the 6th is the first on stem 6, 60.

Class 2H: stem 3 has 39 (1st); stem 4 has 45 (2nd); stem 5 has 53, 57 (3rd, 4th); stem 6 has 62, 64, … (5th, 6th). The 6th is 64.

(b) Class 2H: its median, 64, is higher than Class 2G's, 60.

(a) Class 2G 60, Class 2H 64. (b) Class 2H, whose median mark is 4 marks higher.

Key Points

  • The median is the middle value of the data arranged in order.
  • With nn values, the median is at position n+12\dfrac{n + 1}{2}; that number is the position, not the median.
  • If nn is even, the median is the mean of the two middle values, and it need not be a value of the data.
  • From a dot diagram, a frequency table or a histogram, count along with a running total of the frequencies to the middle position.
  • A stem-and-leaf diagram is already in order: count the leaves from the top, and read the value with the key.
  • Two sets of data can be compared by their medians.
  • An extreme value hardly affects the median, but can pull the mean a long way.

‹ 12.7 The Mean 12.9 The Mode ›

All Secondary 2 (Grade 8) lessons

Home Campus has lessons for Primary 3 to Secondary 2, and practice questions with worked solutions and worksheets for Primary 3 to Secondary 1. Register free to practise and keep track of progress.

This lesson follows the Singapore Secondary 2 syllabus and was checked question by question before it was published. Spotted a mistake? Tell us.