AI Glossary / Statistics and probability / Intermediate

Median

Definition

The median is a value that divides an ordered distribution so that at least half the observations or probability lie at or below it and at least half lie at or above it. For a numerical sample with an odd number of observations, the conventional median is the middle ordered value. With an even number, it is usually the arithmetic average of the two middle ordered values.

What it means

The median describes the center by position rather than by averaging all magnitudes. It answers a question such as: where is the halfway point in the ordered set? This makes it useful when a few very large or small observations would strongly affect an arithmetic mean.
The median does not describe the total, the spread, or the worst experience. A median response time of five seconds does not mean every response took about five seconds, nor does it imply that half took strictly less than five when many values are tied.

How it works

Choose the relevant observations and put them in numerical order. If there are n observations and n is odd, select position (n + 1)/2, counting from one. If n is even, the conventional numerical calculation averages positions n/2 and n/2 + 1.
The broader mathematical definition can allow more than one median. For an even empirical sample, every value between the two middle observations minimizes total absolute deviation. The arithmetic midpoint is a common reporting convention that selects one value from that interval.
For ordered categories, a median category may be meaningful, but averaging category codes can invent an unjustified intermediate category. State the rule used when the middle falls between categories. Unordered labels have no natural median because their ordering is arbitrary.
Weighted medians use cumulative weight rather than simple observation count. Weights can represent population representation, frequencies, or a deliberate decision emphasis; they must be defined. Missing values and filtering also change the population whose center is being summarized.
In a population distribution, the median is a fiftieth-percentile concept. Sample quantile software may use different conventions for other percentiles, and weighted or grouped-data medians require additional care. Explain conventions whenever a small difference could affect a decision.

Three practical examples

  • Service reporting: a company reports median resolution time to describe the middle case and adds upper percentiles to show prolonged cases.
  • Housing analysis: an analyst uses a median price to describe the center of completed sales while also reporting location and property mix.
  • Personal tracking: someone uses median daily travel time to understand a usual journey, alongside the frequency and duration of unusually long trips.

Think of it this way

Think of people standing in a line ordered by height. The median identifies the middle height or, by a numerical convention, the midpoint between the two middle heights. Making the tallest person much taller may leave that middle unchanged. The line still contains the tall person, whose height may matter for other questions.

Worked example

Six ordered durations are 1, 2, 3, 4, 20, and 30 minutes. The middle positions are three and four, holding values three and four. The conventional median is (3 + 4)/2 = 3.5 minutes.
Total absolute deviation from three is 2 + 1 + 0 + 1 + 17 + 27 = 48 minutes. From four it is 3 + 2 + 1 + 0 + 16 + 26 = 48 minutes. From 3.5 it is 2.5 + 1.5 + 0.5 + 0.5 + 16.5 + 26.5 = 48 minutes. Thus the midpoint is not the only absolute-deviation minimizer; the whole interval from three to four works.
Now consider two groups: 1, 2, 100 and 3, 4, 5. Their medians are two and four. Averaging those medians gives three. But the combined ordered data are 1, 2, 3, 4, 5, 100, whose conventional median is 3.5. Even equal group sizes do not justify averaging group medians to recover the overall median.

Illustrative case study

Fictional case: Birch Support compares teams using their median handling times. A manager proposes averaging the team medians to report a company figure. An analyst explains that the overall median requires the underlying observations or a suitable representation of their distribution.
The company computes the pooled median directly, reports each team's context, and adds a tail measure for very long cases. It also checks whether changes in case mix explain apparent differences. This fictional example illustrates aggregation and interpretation, not evidence that any team is more efficient.

Common misconceptions and mistakes

Do not describe a median as necessarily an observed value; the conventional even-sample midpoint may never occur. Do not claim exactly half the values are strictly above and below it when ties are present.
Resistance to extreme magnitudes does not make the median immune to contamination, selection bias, or changes in the middle ranks. It can also hide substantial changes in the tails. Identical medians can accompany very different service experiences.
Do not assume the median must always be better than the mean for skewed data. The mean may be the relevant quantity for total resource calculations. A median chosen to summarize a typical case answers a different question from expected aggregate demand.

Business use

Use a median when an ordered midpoint is relevant to the decision. Report sample size, units, inclusion rules, time window, and important population changes. Pair it with spread or additional quantiles when variation matters.
For AI regression, minimizing expected absolute error targets a conditional median under appropriate conditions. This is distinct from squared-error prediction, which targets a conditional mean. A model trained to predict medians should not have its outputs interpreted automatically as expected totals across cases.

People also ask

Is the median the same as the mean?

Not generally; they summarize different features.

Can several population medians exist?

Yes, the defining inequalities can hold over an interval for some distributions.

Can the median change after adding one observation?

Yes; adding data can change the middle ranks and the numerical convention that applies.

Check your understanding

what is the median of 2, 8, and 100?

Answer: eight.

what is the conventional median of 2, 8, 10, and 100?

Answer: nine.

can the overall median be found by averaging subgroup medians?

Answer: not generally, even when the groups have equal sizes.

Related terms

  • Quantile
  • Percentile
  • Robust statistics
  • Order statistic
  • Arithmetic mean
  • Weighted median
  • Absolute loss
  • Robust statistic
  • Interquartile range

Learn next

Next, study quartiles and distributions with ties. Then compare conditional medians with conditional means and examine how pooling data differs from combining summary statistics.

  • Conditional means

More in Statistics and probability

  • Measurement error - Measurement error is the difference between a measured value and an appropriate reference value.
  • Measurement model - A measurement model describes how observations, corrections, and other relevant quantities relate to the quantity being measured.
  • Measures of central tendency (center or central location) - Measures of central tendency, also called measures of center or central location, are summaries intended to represent a typical or central value of a...
  • Median absolute error - Median absolute error is a prediction-error measure obtained by taking the median of the absolute differences between actual values and their corresponding...
  • Median test - The median test, commonly called Mood's median test, is a nonparametric procedure for comparing the population medians of two or more independent groups.
  • Mediation (statistics) - Mediation in statistics concerns an intermediate variable through which an exposure or intervention may affect an outcome.

Sources

Australian Bureau of Statistics, Measures of central tendency: https://www.abs.gov.au/statistics/understanding-statistics/statistical-terms-and-concepts/measures-central-tendency NIST/SEMATECH, Measures of Location: https://www.itl.nist.gov/div898/handbook/eda/section3/eda351.htm Hyndman and Athanasopoulos, Forecasting: Principles and Practice, accuracy: https://otexts.com/fpp3/accuracy.html

Previous: Medial axis transform Next: Median absolute error

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer