Median of raw data and of ungrouped data
Median income is often quoted instead of mean income, because a few very rich people do not pull the median up. The median age of a village tells you half the people are younger than it.
Arrange the data in order. For n odd, the median is the ((n + 1)/2)th value; for n even, the mean of the (n/2)th and (n/2 + 1)th values.
Key facts
MedianThe middle value when the data are arranged in order; half the values lie on each side
n oddMedian = value of the ((n + 1)/2)th observation
n evenMedian = mean of the (n/2)th and (n/2 + 1)th observations
Frequency tableUse cumulative frequencies to find which value holds the required position
Example 1: raw data, odd and even
Problem
(a) Find the median of 23, 17, 31, 26, 19, 28, 35, 21, 30, 24, 27. (b) Find the median of 45, 52, 38, 60, 41, 55, 49, 47.
Working
- (a) In order: 17, 19, 21, 23, 24, 26, 27, 28, 30, 31, 35. n = 11 (odd).
- Median = (11 + 1)/2 = 6th value = 26.
- (b) In order: 38, 41, 45, 47, 49, 52, 55, 60. n = 8 (even).
- Median = mean of the 4th and 5th values = (47 + 49)/2 = 48.
Answer
(a) 26 (b) 48.
Median of a frequency table (ungrouped data)
- 1Arrange the values in increasing order with their frequencies.
- 2Add a cumulative frequency (cf) column: each cf is the running total of the frequencies.
- 3Find N = Σf and decide whether it is odd or even.
- 4Find the position: (N + 1)/2 if N is odd; N/2 and N/2 + 1 if N is even.
- 5Read the value whose cf first reaches or passes that position.
Example 2: N odd
Problem
Find the median: marks x = 4, 5, 6, 7, 8, 9 with f = 3, 5, 8, 10, 6, 3.
Working
- cf: 3, 8, 16, 26, 32, 35. N = 35 (odd).
- Position = (35 + 1)/2 = 18th.
- cf of 6 is 16 and cf of 7 is 26, so observations 17 to 26 are all 7.
- The 18th observation is 7.
Answer
Median = 7.
Example 3: N even
Problem
Find the median: x = 10, 20, 30, 40, 50 with f = 4, 6, 10, 12, 8.
Working
- cf: 4, 10, 20, 32, 40. N = 40 (even).
- Positions: 20th and 21st.
- The 20th observation is 30 (cf of 30 is exactly 20). The 21st is 40.
- Median = (30 + 40)/2 = 35.
Answer
Median = 35.
Order first, then find the middle: odd gives one middle, even gives two to average.