Statistics guide · 6 min read

Mean, Median, Mode, and Standard Deviation Explained

Mean, median, and mode describe the center of a data set, and standard deviation describes how spread out it is. Together they are the first tools in any statistics class. This guide defines each one and works through real numbers step by step.

Mean, Median, and Mode Defined

  • Mean: the average. Add all values and divide by how many there are.
xˉ=∑xin\bar{x} = \frac{\sum x_i}{n}
  • Median: the middle value after you sort the data. With an even number of values, average the two middle ones.
  • Mode: the value that appears most often. A data set can have one mode, more than one mode, or no mode.

Quick median example with an odd count: for 3, 7, 1, 9, 5, sort to get 1, 3, 5, 7, 9. The median is 5.

Worked Example: Quiz Scores

Eight students scored these points on a 10-point quiz:

2, 4, 4, 4, 5, 5, 7, 92, \ 4, \ 4, \ 4, \ 5, \ 5, \ 7, \ 9

Mean

  1. Add the values: 2+4+4+4+5+5+7+9=402 + 4 + 4 + 4 + 5 + 5 + 7 + 9 = 40.
  2. Divide by the count: 40÷8=540 \div 8 = 5.

Median

  1. The data is already sorted. There are 8 values, so the middle two are the 4th and 5th values: 4 and 5.
  2. Average them: (4+5)÷2=4.5(4 + 5) \div 2 = 4.5.

Mode

4 appears three times, more than any other value, so the mode is 4.

Standard Deviation Step by Step

Standard deviation measures the typical distance of values from the mean. A small value means the data is bunched together. A large value means it is spread out.

Using the same quiz scores (mean = 5), treat the eight students as the whole population:

  1. Subtract the mean from each value: −3,−1,−1,−1,0,0,2,4-3, -1, -1, -1, 0, 0, 2, 4.
  2. Square each difference: 9,1,1,1,0,0,4,169, 1, 1, 1, 0, 0, 4, 16.
  3. Add the squares: 9+1+1+1+0+0+4+16=329 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32.
  4. Divide by NN to get the variance: 32÷8=432 \div 8 = 4.
  5. Take the square root: σ=4=2\sigma = \sqrt{4} = 2.

The population standard deviation is 2 points. Most scores fall within about 2 points of the mean of 5.

Population vs Sample Standard Deviation

The only difference is what you divide by in step 4.

σ=∑(xi−μ)2Ns=∑(xi−xˉ)2n−1\sigma = \sqrt{\frac{\sum (x_i - \mu)^2}{N}} \qquad s = \sqrt{\frac{\sum (x_i - \bar{x})^2}{n - 1}}
  • Use population (σ\sigma, divide by NN) when your data includes every member of the group you care about.
  • Use sample (ss, divide by n−1n - 1) when your data is a sample used to estimate a bigger group. This is the more common case.

Dividing by n−1n - 1 makes the sample standard deviation slightly larger, which corrects for the fact that a sample usually underestimates the spread.

Quiz scores as a sample: 32÷7≈4.57132 \div 7 \approx 4.571, so s=4.571≈2.14s = \sqrt{4.571} \approx 2.14.

Another example: Find both for 10, 12, 14.

  1. Mean: 36÷3=1236 \div 3 = 12.
  2. Differences: −2,0,2-2, 0, 2. Squares: 4,0,44, 0, 4. Sum: 88.
  3. Population: σ=8÷3=2.667≈1.63\sigma = \sqrt{8 \div 3} = \sqrt{2.667} \approx 1.63.
  4. Sample: s=8÷2=4=2s = \sqrt{8 \div 2} = \sqrt{4} = 2.

When to Use the Median Instead of the Mean

The mean gets pulled toward extreme values (outliers). The median does not, so it is the better measure of center for skewed data.

Example: Six people's yearly incomes, in thousands of dollars: 30, 32, 35, 38, 40, 250.

  1. Mean: (30+32+35+38+40+250)÷6=425÷6≈70.83(30 + 32 + 35 + 38 + 40 + 250) \div 6 = 425 \div 6 \approx 70.83.
  2. Median: the middle two values are 35 and 38, so (35+38)÷2=36.5(35 + 38) \div 2 = 36.5.

Five of the six people earn 40 or less, yet the mean is almost 71. The median of 36.5 describes a typical person much better. That is why reports on home prices and incomes usually use the median.

Use the mean for roughly symmetric data without outliers. Use the median for skewed data or data with outliers. Use the mode for categories, like the most popular shoe size.

Common mistakes

  • Finding the median without sorting the data first.
  • Forgetting to average the two middle values when the data set has an even number of values.
  • Dividing by n when the problem gives a sample, which calls for n - 1.
  • Stopping at the variance and forgetting to take the square root to get the standard deviation.

Try one yourself

Find the mean, median, mode, and sample standard deviation of: 6, 2, 8, 4, 10, 6

Work it out, then check every step with the VeilGPT statistics solver.

Check it with VeilGPT

Questions about this topic

Can a data set have more than one mode?

Yes. A data set with two modes is called bimodal. If every value appears the same number of times, there is no mode.

What is the difference between variance and standard deviation?

Variance is the average squared distance from the mean, and standard deviation is its square root. Standard deviation is easier to interpret because it uses the same units as the data.

Can standard deviation be negative?

No. It is a square root of a sum of squares, so it is always zero or positive. It equals zero only when every value is the same.

More study guides