Statistics Basics: Mean, Median, Mode, Range, Variance and Standard Deviation

Mean, median, mode, range, variance, and standard deviation explained with worked examples on small data sets, plus how to tell population from sample.

The mean is every value added up and divided by the count. The median is the middle value once the data is sorted. The mode is the value that appears most often. Range, variance, and standard deviation each measure how spread out the numbers are, and one small data set can show all of them clearly.

Key Takeaways

  • The mean of [4,8,6,5,3] is 5.2, and the median of the same set is 5.
  • The sample variance of [2,4,4,4,5,5,7,9] is 4.5714, so its standard deviation is 2.138.
  • Two sets can share a mean: [4,5,6] and [1,5,9] both average 5, but their standard deviations are 1 and 4.
  • The calculator defaults to the sample standard deviation, so for [2,4,6,8,10] it returns 3.1623.

The mean

The mean is the arithmetic average. Add up every value, then divide by how many values there are. It is the summary most people mean when they say “average”.

Worked example 1: the mean of [4,8,6,5,3]. The sum is 4 + 8 + 6 + 5 + 3 = 26, and there are 5 values, so the mean is 26 ÷ 5 = 5.2. On the calculator, mean([4,8,6,5,3]) → = 5.2. The statistics calculator takes that same comma-separated list and shows the working.

The median

The median is the value in the middle after sorting the data. Sort first. With an odd count, the median is the middle number. With an even count, average the two middle numbers.

Worked example 2: the median of [1,3,3,6,7,8,9]. The set is already sorted, and with 7 values the middle slot is the 4th, which holds 6. Three values sit below it and three above. median([1,3,3,6,7,8,9]) → = 6. For an even count, say [1,3,4,5,7,10], the median is the average of the two middle values, (4 + 5) ÷ 2 = 4.5.

The mode

The mode is the value that appears most often. A set can have one mode, several modes, or none at all when every value is unique.

Worked example 3: the mode of [1,3,3,6,7,8,9]. The value 3 shows up twice and every other value once, so the mode is 3. In [2,2,3,5,5] the values 2 and 5 both appear twice, so that set has two modes. mode([1,3,3,6,7,8,9]) → = 3.

The range

The range is the difference between the largest and smallest values. It is the simplest measure of spread, and it uses only two numbers from the whole set.

Worked example 4: the range of [4,8,6,5,3]. The largest value is 8 and the smallest is 3, so the range is 8 − 3 = 5. On the calculator, type it directly: max([4,8,6,5,3]) - min([4,8,6,5,3]) → = 5.

Variance and standard deviation

Variance and standard deviation measure how far the values typically sit from the mean. The recipe is the same for both: take each value’s distance from the mean, square it, and average those squares. Squaring removes the negative signs so the distances cannot cancel out, and it gives extra weight to the values that are farthest from the mean.

Worked example 5: variance and standard deviation of [2,4,4,4,5,5,7,9]. The mean is 5. The distances from the mean are -3, -1, -1, -1, 0, 0, 2, 4, and their squares are 9, 1, 1, 1, 0, 0, 4, 16, which sum to 32. With 8 values treated as a sample, divide by n − 1 = 7: 32 ÷ 7 = 4.5714. That is the variance. The standard deviation is its square root, about 2.138. On the calculator, variance([2,4,4,4,5,5,7,9]) → = 4.5714 and std([2,4,4,4,5,5,7,9]) → = 2.138.

What the standard deviation tells you

A small standard deviation means the values hug the mean. A large one means they scatter. The sets [4,5,6] and [1,5,9] both have a mean of 5, but the first sits tightly around it (std 1) while the second spans the whole range (std 4). For data shaped roughly like a bell curve, about 68% of values fall within one standard deviation of the mean, a property known as the 68-95-99.7 rule. That 68% is a proportion, and the percentage calculator converts the same kind of ratio into a percent when you want one.

Population versus sample

The two formulas differ in what they divide by. A population is every member of the group under study, and its variance and standard deviation divide by n. A sample is the subset you actually measured, and it divides by n − 1 instead. That small change compensates for samples spreading a little less than the whole population on average. For [2,4,4,4,5,5,7,9] it matters: the population variance is 4 and the population standard deviation is 2, while the sample versions are 4.5714 and 2.138. Real data is almost always a sample, which is why the calculator’s variance and std use the n − 1 version by default.

Choosing a summary

The mean works well for symmetric data. The median resists outliers: one extreme value pulls the mean but leaves the median untouched. The mode works for categories and repeated values. When a summary has to be stated as a proportion, the percentages guide covers converting parts to percents, which is the same favorable ÷ total × 100 arithmetic used through most of statistics.

Frequently asked questions

Which measure should I use, the mean or the median?

Prefer the median when a few extreme values would distort the mean. House prices in a city are the classic case: a handful of luxury sales pushes the mean up while the median stays anchored near the typical house. Use the mean when the data is symmetric and the values are all similar in size.

Do I divide by n or n − 1 for variance and standard deviation?

Divide by n when the list is the entire population. Divide by n − 1 when it is a sample of a larger population, which is the far more common situation. The calculator’s default matches the sample version, as in std([2,4,6,8,10]) → 3.1623.

What does a standard deviation of 2.138 mean?

It is the typical distance of a value from the mean, measured in the same units as the data. For the set [2,4,4,4,5,5,7,9], values sit about 2.1 units away from the mean of 5 on average.

Can a data set have more than one mode?

Yes. When several values tie for the most frequent, the set has that many modes. [2,2,3,5,5] is bimodal, with modes 2 and 5.