Mean, median and mode
The mean is the sum of all values divided by how many there are. The median is the middle value once the data is sorted (the average of the two middle values when the count is even). The mode is the value that appears most often.
Syntax
mean = sum(x) / n| Part | What it is |
|---|---|
sum(x) | the total of all values |
n | the number of values |
Examples
Data: 2, 4, 4, 5, 10
mean = (2 + 4 + 4 + 5 + 10) / 5 = 25 / 5Result: mean = 5
Excel: =AVERAGE(A1:A5)
Data sorted: 2, 4, 4, 5, 10
middle value (3rd of 5)Result: median = 4
Excel: =MEDIAN(A1:A5)
Data sorted: 3, 7, 8, 10 (even count)
median = (7 + 8) / 2Result: median = 7.5
Data: 2, 4, 4, 5, 10
most frequent valueResult: mode = 4
Excel: =MODE.SNGL(A1:A5); =MODE.MULT for several modes
Common mistakes
- Taking the middle value without sorting first gives a wrong median; sort the data, then pick the middle.
- Reporting the mean for skewed data such as incomes or house prices hides the typical value; use the median when a few extreme values pull the mean.
- Saying a data set has no mode when two values tie; it is bimodal and both values are modes.
- Dividing by n - 1 for the mean; n - 1 belongs to the sample variance, the mean always divides by n.
Practice Mean, median and mode
These drills check your answer on live data, free, no account needed.
- Mean of a sampleAn analyst records 7 minutes to resolve a support ticket (minutes): 46, 35, 28, 23, 26, 17, 29. What is the mean? Round to 2 decimal places.
- Median of a sampleHere are 8 minutes to resolve a support ticket (minutes), in the order they were recorded: 46, 35, 28, 23, 26, 17, 29, 36. What is the median? Round to 2 decimal places.
- Mode of a data setA survey records the number of people in each household surveyed: 3, 3, 2, 6, 6, 1, 4, 1, 2, 1, 2, 1, 4, 4. What is the mode? Give a whole number.
Questions
When should I use the median instead of the mean?
Use the median when the data is skewed or has outliers, because one extreme value can move the mean a lot but barely moves the median. Salaries, home prices and response times are typical cases.
Can the mean, median and mode be the same?
Yes. In a perfectly symmetric distribution such as the normal distribution all three are equal. In a right-skewed distribution the mean is usually the largest and the mode the smallest.
What is the mode of a data set where every value appears once?
There is no mode. Excel returns #N/A from MODE.SNGL in that case.
Related
- Weighted averageHow to calculate a weighted average: multiply each value by its weight and divide by the total weight. Grade and price examples plus Excel SUMPRODUCT.
- Range and interquartile rangeThe range is max minus min; the interquartile range is Q3 minus Q1. Worked examples with exact numbers, Excel QUARTILE.INC and why methods differ.
- Skewness and kurtosisSkewness measures asymmetry and kurtosis measures tail weight. How to read the sign, a quick formula from mean and median, and Excel SKEW and KURT.
- OutliersHow to detect outliers with the 1.5 IQR fence rule and the z-score rule, worked examples with exact fences, and what to do with outliers once found.