Median

The median is the middle value: at least half the observations are at or below it and at least half at or above it. Ties need not leave exactly half strictly on either side. It is the 0.5 quantile, and its two defining practical properties are the mirror image of the mean’s.

  • Extremes do not move it. Replace the largest value with one ten times larger and the median is unchanged. That robustness is why it describes a typical case better than the mean for skewed data.
  • It does not add. The median of a total is not the sum of the medians of its parts. Anything that has to aggregate — revenue, capacity, headcount — needs means, whatever the medians say.

Both follow from the same fact: the median is a position in an ordering, not a balance point. Positions do not combine arithmetically.

It is what absolute error estimates

The median is the answer to a specific optimization, which is what makes the choice of error measure a modeling decision rather than a reporting one: “a forecast method that minimizes the MAE will lead to forecasts of the median, while minimizing the RMSE will lead to forecasts of the mean.”

So picking MAE because it is easier to explain also picks the median as the target. For a skewed quantity that is a substantive change — see forecast error, MAE, and point forecasts. The generalization to other positions is quantile regression, whose pinball loss at \(p = 0.5\) is one half of absolute error under the usual convention, or absolute error when doubled as in the linked scoring entry; both have the same minimizer.

When to lead with it

Use the median as the headline when the question is “what is typical?” and the distribution is skewed — revenue per customer, session duration, time to resolution, order value. In those cases the mean is pulled by a small number of large values and answers a different question.

Use the mean when the quantity has to add up, or when the tail is the point. And where the tail is the risk, neither is enough — median latency says nothing about the slowest tenth of requests, which is usually what users notice. Report a high percentile alongside; see quantile level and risk forecast.

Two technical cautions. With ties or heavily discretized data the median can be uninformative — if 60% of orders contain exactly one item, the median order size is 1 and stays 1 through a lot of real change. For an iid continuous sample, a distribution-free interval for the population median can be built from order statistics and binomial probabilities. With n=10, the second through ninth order statistics give about 97.85% coverage. Bootstrap is another option; choose the method for sample size, ties, distribution, and desired coverage. See bootstrap confidence intervals, whose worked example is precisely a 90% interval for a median.

References


Discover more from Insightful Data Lab

Subscribe to get the latest posts sent to your email.

Similar Posts

Questions, corrections, or additional insights?

This site uses Akismet to reduce spam. Learn how your comment data is processed.