Math + You = 1

Courses Math Facts Statistics

The Median: Methods and Examples

The median is the central element of an ordered data set. It separates the whole into two equal parts, the lower half and the upper half.

What is a median?

  • When the dataset has a odd number elements, the median is easy to determine: it is the element in the middle. For example, in the set {1,3,5,6,7}, the median is 5.
  • In the case of a dataset with a even number elements, there are two medians: the lower median and the upper median. The lower median is the middle element of the subset of numbers below the median, while the upper median is the middle element of the subset of numbers above the median. For example, in the set {1,2,3,4,5,6}, the lower and upper medians are 3 and 4. Any value between 3 and 4 is suitable as a median value. We then have a convention: we take the arithmetic mean between these two elements: the median is therefore:
\dfrac{3+4}{2} = 3,5

The median can be used to determine the central tendency of a data set. Indeed, it makes it possible to minimize the effects of extreme values ​​(very high or very low elements) on the calculation of the average.

How to calculate a median?

To calculate the median of a set of data, it is necessary to order them in ascending or descending order. Then, the rules described above are applied.

In a clustered data distribution

Given the distribution of data grouped into the following classes, how to calculate the median?


We are here in the even case: We are looking for the 20th and 21st data. It's 3 in both cases. We will therefore calculate their arithmetic mean. So we find that the median is 2.

In the case where we have an odd number of values, we seek the data in the middle, that is to say that if we have n values, we take the data number (n+1)/2.

Other examples

Example 1

Take the series made up of 10 values:


We start by ordering it:


We have an even number of values, so we take the average between the 5th and the 6th value:

\dfrac{20+21}{2} = 20,5

Example 2

Take the following series already ordered: 1;1;1;1;1;2;2;3;100

The median is 1 because it is the 5th term of a series of 9 terms.

Leave comments