Skip to content
Glacius
StatisticsConcept reference

Sample medians

The median is the central ordered observation, or the average of the two central observations under the even-size convention used here.

On this page 7 sections
  1. Overview
  2. A median is a middle value of ordered data
  3. A position tells you which observation to read
  4. Only the central positions matter
  5. Key takeaway
  6. Sources & further reading
  7. Concept connections

01A median is a middle value of ordered data#

A median is a middle value of ordered data. Sort from smallest to largest, keeping repeated observations. With an odd count, select the single middle observation.

With an even count, this lesson averages the two middle observations. In 1,3,8,101,3,8,10, those are 33 and 88, giving 5.55.5.

The sorted values are 1,3,8,10 at positions 1,2,3,4. Positions 2 and 3 are highlighted and labelled 3 and 8. Their average is 5.5, the median under the stated even-size convention. Spacing encodes order, not numerical distance.The sorted values are 1,3,8,10 at positions 1,2,3,4. Positions 2 and 3 are highlighted and labelled 3 and 8. Their average is 5.5, the median under the stated even-size convention. Spacing encodes order, not numerical distance.
Figure 1The sorted values are 1,3,8,10 at positions 1,2,3,4. Positions 2 and 3 are highlighted and labelled 3 and 8. Their average is 5.5, the median under the stated even-size convention. Spacing encodes order, not numerical distance.
Link to this figure ↗Download SVGDownload PNG
Check your reasoning

Sample: 9, 2, 5. Median? If even, average the middle two.

Show answer and explanation
5

Sorted: 2, 5, 9. Median 5.

02A position tells you which observation to read#

A position tells you which observation to read. It is not itself the median. In 2,7,202,7,20, the middle position is second; the median is 77.

Counts preserve repeated observations. If 11 occurs three times and 99 once, the ordered list is 1,1,1,91,1,1,9. The middle two are both 11, so the median is 11.

Check your reasoning

Exact counts: 2 occurs 2 times; 8 occurs 4 times. Median? Average the middle two if even.

Show answer and explanation
8

Central values 8 and 8; median 8.

03Only the central positions matter#

Only the central positions matter. Averaging the smallest and largest values gives the midpoint of the range, which can differ from the median.

Check your reasoning

Sample: 1, 3, 4, 10. “Average extremes: 5.5.” Median? Average the middle two.

  1. A5.5
  2. B3.5
  3. C3
Show answer and explanation
3.5

(3+4)/2=3.5.

Key takeaway

Sort all observations and locate the center. For an even count, average the two middle values.

  • Locate the central observation or pair.

Sources & further reading

  1. [1]

Reference this concept

Link to this page, a section, or an individual figure.

Glacius. “Sample medians.” Math behind ML. /learn/s-median