Mean, Median & Mode
Drag data points on a number line and see how outliers pull the mean but not the median
Dataset
One value of 47 lifts the mean to 15, above seven of the eight values. The median barely notices.
Dot plot(tap empty space to add a point, drag a point to move it, double-tap to remove it)
Balance point(each value is an equal weight on a weightless beam)
Histogram(bins of width 5, each includes its left edge)
Center
- Mean x̄
- 15
- Median
- 10.5
- Mode
- 10(×2)
Spread
- Range
- 39(47 − 8)
- Population SD σ
- 12.19(÷ n)
- Sample SD s
- 13.03(÷ n − 1)
Working
- n
- 8(max 40)
- Σx
- 120
- x̄ = Σx / n
- 120 / 8 = 15
Mean > median: the data lean right (a long right tail or a high outlier).
Sorted data(n = 8 is even, so the median is the average of values 4 and 5: (10 + 11) / 2 = 10.5)
- 18
- 29
- 310
- 410
- 511
- 612
- 713
- 847
Three ways to describe the center
When people say "the average" they usually mean the mean, but it is only one of three common measures of center. The median is the middle of the sorted data and the mode is the most frequent value. On a symmetric dataset all three agree. On a skewed one they separate, and the order they fall in tells you which way the data lean.
The mean uses every value's size, so a single extreme value moves it. The median only cares about order: make the largest value a million times bigger and the median does not move. That is why the median is called resistant to outliers, and why reports on incomes and house prices quote medians.
The mean has a physical meaning. Put an equal weight at every data value on a weightless beam. The beam balances on a fulcrum placed at the mean, because the deviations x − x̄ always add up to zero. Move the fulcrum to the median on a skewed dataset and the beam tips toward the long tail.
Mean: the balance point
Median: the middle value
Mode: the most common value
Spread: how far values scatter
Key formulas
Mean
x̄ = (x₁ + x₂ + … + xₙ) / n = Σx / n
- x̄
- sample mean (μ for a whole population)
- n
- number of values
Median (sort the data first)
n odd: value in position (n + 1) / 2; n even: mean of the values in positions n / 2 and n / 2 + 1
Balance property
Σ(x − x̄) = 0
Spread
range = max − min, σ = √(Σ(x − x̄)² / n), s = √(Σ(x − x̄)² / (n − 1))
- σ
- population standard deviation (divide by n)
- s
- sample standard deviation (divide by n − 1)
Datasets in the visualizer
| Dataset | n | Mean | Median | Mode | What to notice |
|---|---|---|---|---|---|
| Symmetric | 11 | 10 | 10 | 10 | Mean = median = mode |
| Right-skewed | 13 | 6.08 | 5 | 3 | Mode < median < mean |
| With outlier | 8 | 15 | 10.5 | 10 | One value of 47 lifts the mean |
| Bimodal | 14 | 10 | 10 | 5 and 15 | Center falls where there is no data |
| Salaries ($k) | 11 | 56.36 | 40 | 40 | One high earner lifts the mean |
Which measure should you use?
| Measure | Best for | Weakness |
|---|---|---|
| Mean | Symmetric data without outliers; when totals matter | Pulled toward outliers and long tails |
| Median | Skewed data such as incomes and house prices | Ignores how far out the extreme values are |
| Mode | Categories (most common shoe size or answer) | May not exist or may not be unique |
How to use this visualizer
- 1Pick a dataset. The dot plot stacks equal values, and the red, blue and green lines mark the mean, median and mode(s).
- 2Drag any dot along the number line. Watch the mean slide with it while the median only moves when the dot crosses the middle.
- 3Tap empty space to add a value. Double-tap a dot, or switch the tap tool to Remove, to delete one.
- 4Load With outlier and drag the 47 back toward the others. The mean drops from 15 toward the median while the median stays put.
- 5In the balance panel, switch the fulcrum between the mean and the median. At the mean the beam is always level; at the median it tips toward the long tail.
- 6Read the sorted list below the charts: the highlighted cell (or pair of cells) is where the median comes from.
Common mix-up
The median is the middle of the sorted data, not the middle of the range. For 1, 2, 3, 4, 100 the median is 3, while the midpoint of the range, (1 + 100) / 2 = 50.5, is nowhere near the data. Likewise, "most people earn the average salary" is false whenever salaries are right-skewed: most earn less than the mean.Practice problems
Problem 1: One value changes
Show solutionHide solution
Sum = 4 + 7 + 7 + 9 + 13 = 40, n = 5
Mean = 40 / 5 = 8; median = 3rd value = 7; mode = 7
With 63: sum = 4 + 7 + 7 + 9 + 63 = 90
Mean = 90 / 5 = 18; median = 7; mode = 7
Only the mean changed (8 → 18). The median and mode are unaffected by how extreme the largest value is.
Problem 2: The missing value
Show solutionHide solution
Total = 5 × 12 = 60; known sum = 8 + 10 + 14 + 15 = 47
Fifth number = 60 − 47 = 13
Sorted: 8, 10, 13, 14, 15, so median = 13
Deviations from 12: −4, −2, 1, 2, 3 (they add to 0)
Squares: 16 + 4 + 1 + 4 + 9 = 34
s = √(34 / 4) = √8.5 ≈ 2.92
Fifth value 13, median 13, s ≈ 2.92 (σ = √(34/5) ≈ 2.61 if these five are the whole population)
Related visualizations
Discussion
Questions, ideas or a different approach? Join the conversation.