# Median

The term “median” refers to the middle number of the set. It means that half of the numbers from the set have values greater than the median, and half of the numbers have values less than the median.

## Median explained

When we deal with statistical data, it needs to be structured somehow. Demographic and economic indicators, such as salary and life expectancy, grades, scores and much more, are just an array of random numbers.The median is a variable that stands in the center and divides a set of numbers into two equal halves.

To calculate the median, we need to arrange the data in ascending or descending order. If there is an odd number of variables in a row, then the median of the row is the number that stands in the middle. For an even number of variables in a row, the median is half the sum of two numbers that stand in the middle of the row, ordered in ascending order.

It’s easy to calculate the arithmetic mean, unlike the median, but it has a serious drawback: if one variable differs a lot from the others, then it distorts the final result. That’s why sometimes it’s more accurate to calculate the median.

## Example

To calculate the median for a row with an odd number of variables, one has to find the number that stands strictly in the middle of the row. But first of all, the variables should be ordered in ascending order.

For instance, in a set of numbers {113, 78, 11, 95, 34, 67, 101, 356, 44, 76, 47}, the right order for calculating is {11, 34, 44, 47, 67, 76, 78, 95, 101, 113, 356}. The median is the variable that stands in the middle of the row - 76.

To find out the median for a row with an even number of variables, one should add two numbers that stand in the middle of the row and divide them by two.

For instance, in a set of numbers {23, 76, 34, 115, 5, 58, 88, 39, 17, 25, 7, 55, 49, 52}, the right order for calculating is {5, 7, 17, 23, 25, 34, 39, 49, 52, 55, 58, 76, 88, 115}. The number of variables in this row is 14 and it is an even number. Consequently, the median would be half the sum of two numbers that stand in the middle of this row. That is {(39 + 49) : 2 = 44}.