Same Median, Different Variability

A worked explanation of same median, different variability, including the key limitation and a checkable example.

Two datasets can share a median value of 5 while one dataset has zero spread and the other has a variance of 10. That difference in consistency is what the median alone hides. The median tells you the middle value, but it says nothing about whether the other values are clustered tightly around it or scattered far away. Variance is the measure that reveals this contrast. The question is not theoretical: it affects how you interpret income data, test scores, or manufacturing tolerances where two groups report the same midpoint but behave completely differently.

Same Median, Different Variability Example: Two Datasets, One Middle Value

Take dataset A: {5, 5, 5, 5, 5}. The median is 5. The mean is also 5. Every value equals the median. There is no variability at all. The variance is 0 because every deviation from the mean is zero.

Now take dataset B: {1, 3, 5, 7, 9}. The median is still 5. The mean is also 5. But the values range from 1 to 9. The spread is obvious: three of the five values sit two or more units away from the center. Using only the median, these two datasets look identical. Using variance, they are opposites. Dataset B has a variance of 10. That single number captures the scatter the median cannot express.

Calculation Steps

For dataset B, compute the sample variance. The mean is 5. Subtract the mean from each value: 1 − 5 = −4, 3 − 5 = −2, 5 − 5 = 0, 7 − 5 = 2, 9 − 5 = 4. Square each result: 16, 4, 0, 4, 16. Sum the squares: 16 + 4 + 0 + 4 + 16 = 40. Divide by n − 1, which is 4, because you are working with a sample. The variance is 10. The standard deviation is the square root of 10, about 3.16. That is in the same units as the original data, so it is easier to interpret: the typical deviation from the mean is about 3.16 units.

For dataset A, every deviation is zero, so the variance is zero. No calculation beyond that is needed. Use a variance calculator to confirm these numbers if you are working through them by hand. The contrast is instant: median 5 for both, but variance 0 versus 10.

Why the Method Works

The median is a measure of central tendency. It splits ordered data into two equal halves. It is robust to extreme values: a single outlier will not shift the median. That robustness is useful for skewed data like household income, where the U.S. Census Bureau reports the median because the mean would be pulled upward by a small number of very high earners. But robustness comes at a cost. The median tells you where the center lies, not how tightly the data clusters around it.

Variance measures the average squared deviation from the mean. It uses every value in the dataset. That makes it sensitive to spread, including the effect of outliers. When you need to know whether a dataset is consistent, variance is the metric. The median alone cannot answer that question. The two measures work together: the median for the location, variance for the spread.

Failure Case: The Outlier That Tricks the Median

Consider dataset C: {5, 5, 5, 5, 100}. The median is still 5. The median suggests the dataset is as consistent as dataset A. But the variance tells a different story. The mean shifts to 24. The deviations from the mean are −19, −19, −19, −19, and 76. The squared deviations are 361, 361, 361, 361, and 5776. Sum them: 7220. Divide by 4. The variance is 1805. A single extreme value inflates the variance dramatically while the median remains unchanged.

This is the failure case for relying on the median alone. If you are evaluating product quality and two production lines both report a median dimension of 5 mm, you cannot conclude they are equally consistent. One line might produce every part exactly at 5 mm. The other might produce parts ranging from 1 mm to 9 mm, or parts that are mostly 5 mm with an occasional 100 mm outlier. The median will not distinguish these scenarios. Variance, or its square root the standard deviation, will.

Who the Median With Variance Suits and Who Should Skip It

Use the median paired with variance when you need to compare both location and spread from a single dataset that is roughly symmetric and free of extreme outliers. Students working through introductory statistics problems benefit from this combination. Data analysts comparing test scores or manufacturing tolerances get a complete picture of center and consistency.

Skip this combination if your data is heavily skewed or contains extreme outliers. For household income or home prices, the U.S. Census Bureau uses the median but reports the IQR or income quintiles, not variance. The variance will be inflated by the top few values and will not represent the spread for most households. For bimodal distributions, plot the data and report both modes. Do not rely on the median and variance alone when the structure of the data demands a visual check first.

Common Questions

Can two datasets have the same median but different means?

Yes. If the datasets are symmetric around the same center, the mean and median can both be equal. But if the data is skewed, the mean shifts toward the tail while the median stays at the middle. Dataset B has mean equal to median because it is symmetric. A dataset like {1, 2, 5, 8, 9} also has median 5 but mean 5, while a skewed dataset like {1, 2, 5, 8, 100} has median 5 but mean 23.2.

What measure of spread should I use with the median?

Use the interquartile range (IQR) because it is also robust to outliers. The IQR is Q3 minus Q1. For dataset B, Q1 is 3 and Q3 is 7, so the IQR is 4. For dataset A, the IQR is 0. The IQR, like the median, ignores extreme values. Variance uses all data and is sensitive to outliers, which is a strength when you need to detect them.

Why does variance use the mean instead of the median?

The variance formula is built on the mean because the sum of squared deviations from the mean is smaller than the sum of squared deviations from any other point. The median minimizes the sum of absolute deviations, not squared deviations. That is why the median is used for robust location and the mean is used in variance calculations.

Does the median of an even-sized dataset change the variability picture?

No. The rule for even-sized datasets (average the two middle values after sorting) produces the same kind of single-number center as an odd-sized dataset. The variability question remains the same: two even-sized datasets can share that averaged median while having very different spreads. For example, {2, 4, 6, 8} has median 5, variance 6.67, while {3, 5, 5, 7} also has median 5 but variance 2.67.

How does the quartile method affect the median and variance?

The median itself is not affected by the choice of quartile method. All common methods define Q2 as the median. But Q1 and Q3 differ, so the IQR changes. Variance is computed from the mean and all data points, so it is unaffected by the quartile method entirely. For the same dataset, different software may report different IQRs but identical medians and variances.

Is variance always the right spread measure for the median?

No. Variance assumes a symmetric distribution and is sensitive to outliers. For skewed data, variance can misrepresent spread because the mean is pulled toward the tail, and the squared deviations from that shifted mean inflate the variance. For income data with right skew, the IQR paired with the median gives a more honest picture of spread for the bulk of the distribution.

What happens when I use the median for bimodal data?

The median may fall in a valley between the two peaks, giving a misleading impression of the center. Variance will also be large because the data splits into two clusters, each far from the mean. Both measures fail to describe bimodal structure. Plot the data first. If you see two distinct modes, report both modes and the range, not just the median and variance.