Mean, Median & Mode

Drag data points on a number line and see how outliers pull the mean but not the median

Beginner

Dataset

One value of 47 lifts the mean to 15, above seven of the eight values. The median barely notices.

Tap tool

Dot plot(tap empty space to add a point, drag a point to move it, double-tap to remove it)

mean 15median 10.5mode 1005101520253035404550

Balance point(each value is an equal weight on a weightless beam)

Σ(x − 15) = 0 → balanced

Histogram(bins of width 5, each includes its left edge)

25105101520253035404550

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)

  1. 18
  2. 29
  3. 310
  4. 410
  5. 511
  6. 612
  7. 713
  8. 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

Add the values and divide by how many there are. Put equal weights at each value on a beam and the mean is where it balances.

Median: the middle value

Sort the data and take the middle one, or the average of the two middle ones. Half the values are at or below it, half at or above.

Mode: the most common value

The value that appears most often. A dataset can have one mode, several, or none when every value is equally common.

Spread: how far values scatter

Two datasets can share a mean and look nothing alike. The range and standard deviation measure how spread out the values are.

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

DatasetnMeanMedianModeWhat to notice
Symmetric11101010Mean = median = mode
Right-skewed136.0853Mode < median < mean
With outlier81510.510One value of 47 lifts the mean
Bimodal1410105 and 15Center falls where there is no data
Salaries ($k)1156.364040One high earner lifts the mean

Which measure should you use?

MeasureBest forWeakness
MeanSymmetric data without outliers; when totals matterPulled toward outliers and long tails
MedianSkewed data such as incomes and house pricesIgnores how far out the extreme values are
ModeCategories (most common shoe size or answer)May not exist or may not be unique

How to use this visualizer

  1. 1
    Pick a dataset. The dot plot stacks equal values, and the red, blue and green lines mark the mean, median and mode(s).
  2. 2
    Drag any dot along the number line. Watch the mean slide with it while the median only moves when the dot crosses the middle.
  3. 3
    Tap empty space to add a value. Double-tap a dot, or switch the tap tool to Remove, to delete one.
  4. 4
    Load With outlier and drag the 47 back toward the others. The mean drops from 15 toward the median while the median stays put.
  5. 5
    In 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.
  6. 6
    Read 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

Find the mean, median and mode of 4, 7, 7, 9, 13. Then replace the 13 with 63 and find them again. Which measures changed?
Show 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

Five numbers have a mean of 12. Four of them are 8, 10, 14 and 15. Find the fifth number, the median, and the sample standard deviation s.
Show 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.