SECTION 04 / 7

Numerical median, mode and choosing a center

3 min read
On this page 7 headings

The median is the middle after sorting. The mode is the most frequent value. They answer different questions from the mean, and an unusual value affects them differently.

For odd n, choose the middle observation; for even n, average the two numerical middle values.
For odd n, choose the middle observation; for even n, average the two numerical middle values.

Odd number of observations

Sort 2,12,5,7,6,7,3 to get 2,3,5,6,7,7,12. With n = 7, the middle position is (7+1)/2 = 4. The 4th value is 6, so the median is 6. The position 4 is not the median value.

Even number of observations

Sort 2,105,5,7,6,3 to get 2,3,5,6,7,105. With n = 6, middle positions are 3 and 4. Their values are 5 and 6, so the median is (5+6)/2 = 5.5. This averaging is for numerical values; it is not a rule for averaging category codes.

The mode counts repetitions

For 2,12,5,7,6,7,3, the mode is 7 because it appears twice. Changing 12 to 105 leaves mode 7. Removing one 7 leaves all values distinct; the lecture convention calls this no mode. If two repeated values tie at the highest frequency, give both modes.

Compare mean and median when an outlier changes

Sorted valuesMeanMedianMode
2,3,5,6,7,7,12667
2,3,5,6,7,7,105≈ 19.28667
2,3,5,6,7,7,1172167

The median resists an extreme change because it depends on middle positions. “Resistant” does not mean it can never change. The mean includes the size of every value, so outliers can pull it toward a tail.

One complete ten-mark example

The marks sort to 35,38,47,58,61,66,68,68,70,79. Mean = 59. Median = (61+66)/2 = 63.5. Mode = 68. All three are correct summaries, but they describe different aspects of the same data.

Adding or multiplying a constant

Adding 5 to every mark adds 5 to the mean, median and each mode: they become 64,68.5,73. Multiplying every mark by 0.4 gives 23.6,25.4,27.2. Nonzero scaling preserves repetition counts; if you multiply everything by zero, all observations collapse to zero.

The median also transforms correctly for negative multipliers, although the sorted order reverses. For a mode, a nonzero transformation carries each modal value to its transformed value. A dataset with no repeated values still has no mode under the lecture convention.

Choose a summary for the question

SituationUseful center
Numerical data with an extreme high incomeMedian often describes a typical person better.
Need the total per observation, such as average costMean uses all amounts.
Want the most common shoe sizeMode answers the practical question.
Nominal board namesMode; no numerical mean or median.

Try it yourself

For 3,8,8,9,20, find mean, median and mode.

Show explained answer

Mean = 48/5 = 9.6. Median = 8 (3rd value). Mode = 8 (twice).

Try it yourself

For 1,2,2,4,4,9, find median and modes.

Show explained answer

Median = (2+4)/2 = 3. Modes = 2 and 4, each appearing twice.

Try it yourself

A median is 10. Each value becomes 5 − 2x. What is the new median?

Show explained answer

5 − 2×10 = −15. Sort order reverses, but the transformed median follows the same linear rule.

Source: Lecture 3.3. Extra examples and diagrams are teaching material prepared for these notes.

YOUR STUDY PROGRESS

Finished this section? Save your progress.

Back to top ↑