Lably
Skip to content

Median

Middle quantile of a data set or probability distribution

  • 21 min read
  • 12 chapters
  • 6 labs on Lably
A very basic diagram, with no complexities, of how to find the median.
Blythwood · CC BY-SA 4.0

Learn it on Lably

Finite set of numbers

The median of a finite list of numbers is the middle number when the numbers are arranged in order from smallest to greatest.

If the data set has an odd number of observations, the middle one is selected (after arranging in ascending order). For example, the following list of seven numbers,

1, 3, 3, 6, 7, 8, 9

has the median of 6, which is the fourth value.

If the data set has an even number of observations, there is no distinct middle value and the median is usually defined to be the arithmetic mean of the two middle values. For example, this data set of 8 numbers

1, 2, 3, 4, 5, 6, 8, 9

has a median value of 4.5, that is (4+5)/2. (In more technical terms, this interprets the median as the fully trimmed mid-range).

In general, with this convention, the median can be defined as follows: For a data set x of n elements, ordered from smallest to greatest,

if n is odd, med⁡(x)=x(n+1)/2 if n is even, med⁡(x)=x(n/2)+x((n/2)+1)2

Sign in to keep reading

11 more chapters are free with a Lably account.

More in Statistics and probability