NUMBAT OER - Open Educational Resources

3. Median of a set of observations

In discussing the mean, we indicated that this statistic is appropriate where a the observations in a sample of scalar data are distributed normally, but not if the distribution is skewed. A quantity termed the 'median' provides a better measure of the average value under such conditions.

The median is simply the 'middle' value in a data series. If the n observations in the series x1 ... xn are ordered from the smallest to largest values, the median is the value of the mid-point of the ordered series if n is an odd number, or the mean of the two values either side of the mid-point if n is an even number. Using the skewed data set as an example:

Observation 1 2 3 4 5 6 7 8 9 10
Value 1.37 1.45 1.23 1.67 3.19 1.39 1.41 1.27 2.10 4.24
Ordered series 1.23 1.27 1.37 1.39 1.41 1.45 1.67 2.10 3.19 4.24

In this case, n = 10 is an even number, so that the median is the mean of values 5 and 6 (highlighted), which gives a value of 1.43. Compare this with the mean of 1.93, which lies closest to value 8 in the ordered series.

If you calculate the median of a normal distribution, it is very close to the value of the mean (and should be identical for a large sample from a truly normal distribution). For the first data set, considered in the calculation of the mean, the median value is 1.71 whilst the mean was 1.73.