Statistics Guide
Mean, Median, Variance, and Standard Deviation Explained
How common descriptive statistics summarize location and spread, why outliers matter, and why sample and population formulas are not interchangeable.
Location and spread answer different questions
The mean and median describe where data are centered. Variance and standard deviation describe how dispersed the values are around a center. The range uses only the minimum and maximum, while quantile-based summaries such as the interquartile range focus on the middle portion of the data.
| Measure | Question it answers | Key property |
|---|---|---|
| Mean | What is the arithmetic average? | Uses every value and can move substantially when extreme values change. |
| Median | What is the middle ordered value? | Depends on order and is less affected by a single extreme value than the mean. |
| Variance | How large are squared deviations from the mean? | Expressed in squared units. |
| Standard deviation | What is the square root of variance? | Returns dispersion to the original measurement units. |
| Range | How far apart are the minimum and maximum? | Uses only the two extremes. |
Worked example: a compact dataset
Use the ordered dataset 2, 4, 4, 4, 5, 5, 7, 9.
Median: with eight values, average the fourth and fifth ordered values: (4 + 5) ÷ 2 = 4.5
Range: 9 − 2 = 7
The mean and median are close here, but they are not identical. That distinction becomes much more visible when the distribution contains an extreme value.
Population variance and standard deviation
For a population of N observed values with mean μ, population variance averages the squared deviations from that mean:
Population standard deviation = √variance
For the dataset above, the deviations from 5 are −3, −1, −1, −1, 0, 0, 2, and 4. Their squared deviations sum to 32. Dividing by 8 gives a population variance of 4, and the population standard deviation is 2.
The squaring step prevents positive and negative deviations from canceling. It also gives more influence to values farther from the mean. The tradeoff is that variance is measured in squared units, which is why standard deviation is often easier to interpret in the context of the original measurement.
Sample variance uses a different divisor
When the observed data are treated as a sample and the goal is to estimate population variability, the common sample-variance formula uses n − 1 in the denominator rather than n.
Sample standard deviation = √sample variance
Using the same eight values, the squared deviations still sum to 32, but the divisor is 7. The sample variance is approximately 4.571, and the sample standard deviation is approximately 2.138. A statistics calculator should therefore make clear whether it is reporting population or sample values.
What an outlier does
Replace the final value 9 with 25. The new dataset is 2, 4, 4, 4, 5, 5, 7, 25.
| Measure | Original data | With 25 replacing 9 |
|---|---|---|
| Mean | 5 | 7 |
| Median | 4.5 | 4.5 |
| Range | 7 | 23 |
| Population variance | 4 | 48 |
| Population standard deviation | 2 | ≈ 6.93 |
The median stays at 4.5 because the two middle ordered values are unchanged. The mean increases from 5 to 7, while variance and standard deviation increase sharply because the extreme value contributes a large squared deviation. This is why the choice of summary should reflect the shape and purpose of the data rather than habit.
Median and interquartile summaries can be more robust
NIST’s Engineering Statistics Handbook distinguishes measures of location and measures of scale and discusses robust alternatives for data affected by heavy tails or outliers. In practical analysis, the median and interquartile range can provide a useful complement to the mean and standard deviation when extreme observations would otherwise dominate the summary.
That does not make the median automatically better. If every observation is meaningful and the arithmetic average is the quantity of interest, the mean may be exactly the right measure. Robustness is a property to consider, not a universal rule for choosing a statistic.
Common mistakes
- Using sample and population formulas interchangeably. The denominator changes, so the result changes.
- Reporting variance as if it used the original units. Variance is in squared units; standard deviation returns to the original units.
- Using only the range to describe spread. Range ignores every value except the minimum and maximum.
- Assuming mean and median must be similar. Skewed data and outliers can separate them substantially.
- Interpreting descriptive statistics as causal evidence. A mean or standard deviation summarizes the values supplied; it does not explain why they occurred.
- Rounding too early. Intermediate rounding can change the final variance or standard deviation.
Use the related tool
Statistics Calculator
Calculate common descriptive statistics from a numeric dataset and compare the results with the definitions in this guide.
Open tool →
Authoritative references
- NIST Engineering Statistics Handbook: Measures of Location
- NIST Engineering Statistics Handbook: Measures of Scale