Statistics formula
Median Formula
The median is the value in the middle of a sorted list: half of the values lie at or below it and half at or above it. It is the usual way to summarise pay, because a few very high figures barely move it.
Formula
median = middle value of the sorted list (or the mean of the two middle values when the count is even)
- median
- the value that splits the sorted list into two halves of equal size
- sorted list
- all the values arranged from lowest to highest, with repeated values kept
- n
- the number of values in the list
- middle position
- (n + 1) ÷ 2 when n is odd; positions n ÷ 2 and n ÷ 2 + 1 when n is even
What it means
Finding a median is a matter of position, not arithmetic. Put the values in order and count in from both ends until you meet in the middle. With an odd number of values there is one middle item and it is the median. With an even number there are two, and the median is halfway between them: add the pair and divide by two.
Because only the middle of the list matters, the size of the extreme values is irrelevant. Suppose seven adverts for the same role quote salaries and the highest is 60,000. Change that figure to 160,000 and the median does not move at all, while the mean jumps by more than 14,000. This is why pay is so often reported as a median: earnings tend to have a long tail of high figures, and the mean is pulled towards the tail.
Read the median as a halfway mark. If the median advertised salary for a role is 45,000, half the adverts you found pay that or less and half pay that or more. An offer at the median is in the middle of your sample. It says nothing about how far the top and bottom extend, so look at the lowest and highest values too, and remember that a handful of adverts is a sample of what you found, not of the whole market.
Comparing the median with the mean is informative in its own right. When the two are close, the values are spread fairly evenly around the middle. When the mean is well above the median, a few high values are stretching the top, and the median is the better guide to what an employer in the middle of the set is paying.
Other forms
- Position of the median, odd count
- middle position = (n + 1) ÷ 2
- Median, even count
- median = (value at position n ÷ 2 + value at position n ÷ 2 + 1) ÷ 2
- Range of the list
- range = highest value − lowest value
Worked example
Eight adverts for a marketing executive role quote 52,000, 47,000, 61,000, 49,500, 95,000, 54,500, 50,000 and 58,000.
- Sort: 47,000, 49,500, 50,000, 52,000, 54,500, 58,000, 61,000, 95,000
- Count: n = 8, an even number, so the middle positions are 8 ÷ 2 = 4 and 4 + 1 = 5
- Middle pair: 52,000 (4th) and 54,500 (5th)
- Median: (52,000 + 54,500) ÷ 2 = 106,500 ÷ 2 = 53,250
- For comparison, the mean: 467,000 ÷ 8 = 58,375
- Gap between them: 58,375 − 53,250 = 5,125
Result: The median advertised salary is 53,250, which is 5,125 below the mean of 58,375, because the single 95,000 advert pulls the mean up and leaves the median where it is.
Where it is used
You are about to state a salary expectation and have noted the pay in eleven current adverts for roles like yours. Most sit between 38,000 and 44,000, but two are for head-of-department posts above 70,000. The mean of the eleven would suggest a figure that nine of the employers are not paying. Sorting the list and taking the sixth value gives a median of 41,500, a number you can defend as the middle of what is on offer for comparable work. You might then ask for somewhat more, with reasons, as the salary negotiation guide sets out.
Common mistakes
- Taking the middle item of the list as written, without sorting it first, which gives an arbitrary value.
- With an even count, picking one of the two middle values instead of the point halfway between them.
- Deleting repeated values before counting: if three adverts quote 40,000, all three stay in the list.
- Treating the median as the most common value, which is the mode, or as the midpoint between the lowest and highest, which is the mid-range.
- Multiplying a median by the number of items to get a total, when only the mean can be scaled back up in that way.
Questions and answers
What is the difference between the median and the mean?
The mean shares the total equally, so every value affects it. The median only marks the middle position, so extreme values do not. For evenly spread data they are close; for pay data, which often has a few high figures, the median is usually lower.
Can the median be a number that is not in the list?
Yes, when the count is even and the two middle values differ. The median of 30, 34, 40 and 50 is 37, halfway between 34 and 40, although no item equals 37. With an odd count the median is always one of the values.
Why do salary reports use the median?
Earnings tend to be lopsided: most people are bunched in a band and a small number earn far more. Those few raise the mean above what most people receive. The median is not affected, so it gives a fairer picture of the middle earner.
How many values do I need for a meaningful median?
A median can be found for any list, but with fewer than about seven or eight values it can shift a lot when one more figure is added. Collect as many comparable adverts as you reasonably can, and note the count when you quote the result.