Calqura
All tools
MathBy · 6 min read

Mean, Median, Mode, and Standard Deviation Explained With One Example

Work through mean, median, mode, variance, and standard deviation on a single data set, and learn when to use population versus sample formulas.

Five statistics cover most of what you need to describe a list of numbers. Rather than define each in the abstract, let us calculate all of them on one small data set and read what each one says.

The data

Eight values: 2, 4, 4, 4, 5, 5, 7, 9.

Mean

Add everything and divide by the count: 2 + 4 + 4 + 4 + 5 + 5 + 7 + 9 = 40, and 40 ÷ 8 = 5. The mean uses every value, which makes it sensitive to extremes.

Median

Sort the values (they already are) and find the middle. With eight values there are two middle ones, the 4th and 5th: 4 and 5. Their average is 4.5. With an odd count you would simply take the middle value.

Mode

The most frequent value is 4, which appears three times. The mode is 4. It is the only average that works for non-numeric data, like the most common shoe size.

Variance and standard deviation

These measure spread. First find each value's distance from the mean (5) and square it:

  • 2 → (−3)² = 9
  • 4, 4, 4 → (−1)² = 1 each, so 3
  • 5, 5 → 0
  • 7 → 2² = 4
  • 9 → 4² = 16

The sum of squares is 9 + 3 + 0 + 4 + 16 = 32.

  • Population variance = 32 ÷ 8 = 4, so the population standard deviation is √4 = 2.

  • Sample variance = 32 ÷ 7 = 4.571, so the sample standard deviation is √4.571 ≈ 2.138.

You can check all of these on your own list with the

descriptive statistics calculator

, which reports both versions.

Population or sample?

If your eight values are every value you care about, say the scores of an entire class, use the population formula. If they are a sample drawn to represent a larger group, such as eight customers out of thousands, use the sample formula. Dividing by n − 1 corrects for the fact that a sample tends to understate the spread of the whole group.

Reading the results together

The mean (5) is a little higher than the median (4.5) and the mode (4). That small gap tells you the data leans slightly right: the 7 and 9 pull the average up. A standard deviation of 2 says a typical value sits about two units from the mean.

Change the 9 to 90 and the mean jumps to 15, while the median stays at 4.5. That is why reports of income or house prices use the median: a few huge values would otherwise distort the picture. When you are not sure which average to quote, show the mean and the median side by side, and let the difference between them tell the story.

Common questions

What is the difference between mean, median, and mode?▾

The mean is the average, the median is the middle value when sorted, and the mode is the most frequent value.

When is the median better than the mean?▾

When the data has outliers or is skewed, such as incomes or house prices. A few extreme values drag the mean but barely move the median.

What is the difference between population and sample standard deviation?▾

Population SD divides the squared deviations by n and is used when you have every value. Sample SD divides by n − 1 and is used when your data is a sample of a larger group.

Can a data set have more than one mode?▾

Yes. Two or more values can tie for most frequent, and if every value appears once there is no mode.

What does a standard deviation tell you?▾

How spread out the values are around the mean, in the same units as the data. A small SD means values cluster tightly; a large one means they are scattered.

More posts