Measures of Center: Mean and Median
Calculate the mean, median and mode, see why outliers and skew pull the mean but not the median, and use weighted means such as a GPA.
Welcome back!
Step 1 of 13Learn
The average that misleads
A small company has 10 employees. Nine of them earn $50,000 a year. The founder pays herself $2,050,000. A recruiting ad says: "Average salary at our company: $250,000!"
Is that true? The mean is the total payroll divided by 10:
(9 × 50,000 + 2,050,000) / 10 = (450,000 + 2,050,000) / 10 = $250,000
The arithmetic is correct, but nine out of ten people earn a fifth of that. The median, the middle salary, is $50,000, a much better description of a typical employee.
Both numbers are "averages" in everyday speech, which is exactly why you should always ask which one is being reported. In statistics:
- The mean (x̄ for a sample, μ for a population) is the sum of the values divided by how many there are: x̄ = Σx / n. The symbol Σ (sigma) means "add them all up."
- The median is the middle value when the data are sorted.
The mean uses every value's size, so a single extreme value can drag it far from the bulk of the data. The median only cares about order, so the founder's salary could be $2 million or $200 million and the median would stay at $50,000.
Step 2 of 13Practice · Chart
One founder, two very different "averages"
Which summary bar matches what a typical employee actually earns?
Tap the bar that answers the question, then press Check.
Step 3 of 13Practice · Work it out
Five students slept 12, 15, 9, 20 and 14 hours over a weekend. What is the mean number of hours?
Step 4 of 13Learn
Median and mode
To find the median:
- Sort the values from smallest to largest. (Skipping this step is the most common mistake.)
- If the number of values n is odd, the median is the middle one, in position (n + 1)/2.
- If n is even, the median is the mean of the two middle values.
Odd example. 4, 9, 2, 7, 5 sorts to 2, 4, 5, 7, 9. With n = 5, the middle is position 3: the median is 5.
Even example. 6, 1, 8, 3 sorts to 1, 3, 6, 8. The two middle values are 3 and 6, so the median is (3 + 6)/2 = 4.5. The median doesn't have to be one of the data values.
The mode is the most frequent value. A data set can have no mode, one mode or several. The mode is the only measure of center that works for categorical data: "the most common blood type is O+." For quantitative data it's less useful, because with precise measurements (like 3.27 seconds) values rarely repeat exactly.
Rule of thumb: about half the values sit at or below the median and half at or above. That makes the median the 50th percentile, a link you'll use with boxplots and the normal distribution.
Step 5 of 13Practice · Work it out
Find the median of these six values: 7, 3, 10, 15, 8, 12.
Step 6 of 13Learn
Mean vs. median, and the shape of the data
The relationship between the mean and the median tells you about the shape of a distribution.
- Symmetric: mean ≈ median.
- Skewed right: the long right tail pulls the mean up, so mean > median. Incomes are the classic case: the mean household income in the US is well above the median.
- Skewed left: the long left tail pulls the mean down, so mean < median.
Think of the mean as the balance point of the distribution. If you put the histogram on a seesaw, the mean is where it balances. A few values far out in a tail have a lot of leverage, so the balance point slides toward them.
A statistic that is not strongly affected by extreme values is called resistant. The median is resistant; the mean is not.
Which should you report?
- For roughly symmetric data without outliers, report the mean. It uses all the information and works well with later tools like standard deviation and confidence intervals.
- For skewed data or data with outliers, report the median, often alongside the mean. That's why news reports quote median home prices and median household income.
Neither is "right" in general. The question is which number honestly describes a typical value for this particular distribution.
Step 7 of 13Try the calculator
How one outlier moves the mean
Start with a group whose values average m. Add one extra value and see how far the mean moves. The median of a large group would barely change.
- New mean with the outlier
- 250,000
- Shift in the mean
- 200,000
- New mean as a multiple of the old mean
- 5
Step 8 of 13Practice · Choose one
A real-estate site wants a single number for the typical home price in a city where most homes sell for $250,000–$450,000 but a few mansions sell for over $10 million. Which should it report?
Step 9 of 13Learn
Weighted means
Sometimes values don't count equally. Your GPA is the classic example: a 4-credit course affects it more than a 1-credit course.
A weighted mean multiplies each value by its weight, adds the products, and divides by the total weight:
weighted mean = Σ(w × x) / Σw
Example. A student earns an A (4.0) in a 3-credit class and a C (2.0) in a 1-credit lab.
- Unweighted: (4.0 + 2.0)/2 = 3.0
- Weighted: (3 × 4.0 + 1 × 2.0)/(3 + 1) = 14/4 = 3.5
The A counts three times as much, so the GPA is closer to 4.0.
Weighted means appear everywhere: course grades (homework 20%, exams 50%, project 30%), stock indexes, and combining survey results from groups of different sizes. If one school's 400 students average 80 and another's 100 students average 70, the combined average is (400 × 80 + 100 × 70)/500 = 78, not 75. Averaging the two averages ignores the group sizes, a mistake that shows up constantly in news stories and spreadsheets.
A related idea is the trimmed mean: drop a small percentage of the highest and lowest values, then average the rest. Judges' scores in some sports work this way, which limits the effect of one unusually harsh or generous judge.
Step 10 of 13Practice · Chart
A course grade is a weighted mean
Each component score is multiplied by its weight. A 10-point gain on the final moves your grade 4 points; the same gain on the project moves it only 1.5.
Improving which component by 10 points would raise the final grade the most?
Tap the slice that answers the question, then press Check.
| Item | Weight |
|---|---|
| Final exam | 40% |
| Midterm | 25% |
| Homework | 20% |
| Project | 15% |
Step 11 of 13Practice · Work it out
A student earns an A (4.0) in a 3-credit course, a B (3.0) in a 4-credit course and a C (2.0) in a 2-credit course. What is the GPA, to two decimal places?
Step 12 of 13Note
Step 13 of 13Practice · True or false
In a distribution that is strongly skewed to the right, the median is usually greater than the mean.
Lesson complete!