Mean, median and mode

Analytika TeamLast reviewed 6 min read

A measure of central tendency is a single number that represents a typical value in your data. There are three common ones, and they can give very different answers on the same data. Choosing the right one is a judgement about your variable’s type and shape.

The mean

Add up all the values and divide by how many there are. For values x₁ … xₙ, the mean is x̄ = (x₁ + x₂ + … + xₙ) / n.

The mean uses every value, which makes it efficient, and it’s the basis of most tests (t-tests and ANOVA compare means). The cost is sensitivity: every value pulls on it, including mistakes and outliers.

The median

Sort the values and take the middle one. With an even number of values, average the two in the middle. Half the values are below the median and half are above.

The median ignores how far out the extreme values are, only which side of the middle they’re on. That makes it the better summary for skewed data such as incomes, house prices, hospital stays and reaction times. It also suits ordinal data, where values can be ranked but not averaged.

The mode

The value that appears most often. It’s the only measure that works for categorical data: the modal blood type, the most common answer. A distribution can have two modes (bimodal), which often means two different groups are mixed together. In the mtcars data, the modal number of cylinders is 8 (14 of 32 cars). For continuous measurements, where few values repeat exactly, the mode is rarely useful.

Worked example: how one value moves the mean

Seven people work at a small company. Their salaries, in thousands, are 32, 35, 36, 38, 41, 44 and 180. The 180 belongs to the owner.

All 7 staffWithout the owner
Mean406 / 7 = 58.0226 / 6 ≈ 37.7
Median38 (the 4th of 7 values)(36 + 38) / 2 = 37

With the owner included, the mean says a typical salary is 58,000, more than anyone except the owner earns. The median, 38,000, describes the typical employee far better, and hardly changes when the owner is removed.

You can see the same pattern in real data. Horsepower in the mtcars dataset has a mean of 146.7 but a median of 123, because a few very powerful cars pull the mean up.

Which one should you report?

DataBest measurePair it with
Categorical (nominal)ModeCounts and percentages
Ordinal (rankings, single Likert items)MedianIQR or range, plus frequencies
Continuous, roughly symmetricMeanStandard deviation
Continuous, skewed or with outliersMedianInterquartile range

Mean, median and skewness

In a symmetric distribution, the mean and median are about equal (and in a normal distribution they equal the mode too). In a right-skewed distribution the mean is usually above the median, and in a left-skewed one it’s usually below. A large gap between the two is a quick warning sign for skew, worth checking with a histogram before you choose a test.

Common mistakes

  • Reporting the mean of skewed data alone, such as “average income” without the median.
  • Averaging category codes. A “mean region of 2.4” means nothing.
  • Deleting outliers to tidy up the mean without a reason. Investigate them instead. If they’re genuine values, use the median or a method that handles them.

For a full summary table that includes these measures, see descriptive statistics, or paste your data into our free descriptive statistics calculator.

More in Descriptive statistics

Try it with the free tools

Run this on your own data

Upload a dataset and ask your question in plain English. Analytika checks the assumptions, picks the test, runs it, and writes the results up in APA format.

Try it free