In this article
  1. Before you start
  2. Why interviewers ask this
  3. What each one is
  4. Worked example
  5. Trade-offs and edge cases
  6. How to answer it in an interview
  7. Common mistakes
  8. Follow-up questions
  9. Sources

Before you start

This page belongs to the probability and statistics guide, which covers the distributions that decide which summary fits.

Why interviewers ask this

A wrong summary number can mislead a whole decision, and the interviewer wants to see that you check the shape of the data before you summarise it. The question appears in data and machine-learning screens in forms such as "when would you report the median instead of the mean" and "why is average income misleading". Reported in interviews at AI labs and large tech companies, it is often a warm-up that leads into outlier handling, skewed features and metric design.

A weak answer recites the two definitions. A strong answer says which one moves when an extreme value arrives, why, and what you would look at before choosing.

What each one is

Mean
The mean is the sum of a set of numbers divided by how many numbers there are. It uses every value, so each value moves it a little.
Median
The median is the middle value of a set of numbers sorted in order; with an even count it is the average of the two middle values. It depends on rank, not on how large the extreme values are.
Outlier
An outlier is a value that sits far from the rest of the data, such as one very large salary among ordinary ones. It may be a real case or a recording error.
Skew
Skew is the lack of symmetry in a distribution. Data with a long right tail is skewed right, and its mean is usually pulled above its median.

The mean in plain words

The mean is the fair-share number: if every value were replaced by the same amount and the total stayed the same, that amount is the mean. The Python statistics documentation (read 2026-10-24) defines it as the sum of the data divided by the number of data points, and warns that it is strongly affected by outliers and is not necessarily a typical example of the data points.

That makes the mean the right tool when totals matter. If you want to know how much a team spends in a month, the total divided by the number of people is meaningful even when a few people spend far more than the rest. The input is every value, and the output is a single number that balances them.

The median in plain words

The median is the middle person in a line: half the values are below it and half above. Sort the values, then take the middle one, or the average of the middle two when the count is even. The same Python documentation says the median is a robust measure of central location, less affected by the presence of outliers, and gives the even case as the average of the two middle values, so the median of 1, 3, 5, 7 is 4.0.

The input is the order of the values, not their size. Replacing the largest value by one a thousand times larger changes nothing, because it is still the largest. The analogy breaks only when you need a total: the median says nothing about the sum.

Which one moves when an extreme value arrives?

The mean moves in proportion to the extreme value, and the median moves by at most one position in the ordering. When one of n values changes by an amount d, the mean changes by d divided by n, with no ceiling on d, while the median can only step to the neighbouring value.

NIST's handbook (section 1.3.5.1, read 2026-10-24) says extreme values in the tails distort the mean but not the median, because the median is based on ranks, and that for data with extreme values in the tails the median provides a better estimate of location. It also says the mean is an optimal estimator if the data are normal. So the choice depends on the shape of the data, which the Gaussian distribution page describes for the symmetric case.

Knowing it is half the job. Saying it is the other half.

Interview Clozo is an AI interview copilot for real interview rounds: it hears the question and puts a strong answer on your screen, and you say it in your own words. See the features or how it works.

Start Free Trial →

Worked example

Take nine illustrative salaries in thousands: 52, 55, 58, 60, 62, 64, 66, 70 and 75. Their mean is 62.44 and their median is 621. Now one founder's salary of 900 joins, so there are ten values. The mean becomes 146.2, a factor of 2.34 higher, while the median becomes 63, a move of one thousand1. Nine of the ten people, 90 percent, now earn less than the mean.

One extreme salary more than doubles the mean but not the medianGrouped bars in thousands: for nine salaries the mean is 62.4 and the median 62; after adding one salary of 900 the mean is 146.2 and the median 63.Salary (thousand)04080120160Nine salariesPlus one 900SampleMeanMedian62.44146.26263Diagram: Interview Clozo, CC BY 4.0 ·interview.clozo.ai/blog/mean-vs-median.html
One extreme value more than doubles the mean and moves the median by one thousand.CC BY 4.0 — source: What is the difference between mean and median?
Text description of the diagram
  • The mean of the nine ordinary salaries is 62.44 thousand and the median is 62 thousand.
  • After adding one salary of 900 thousand the mean is 146.2 thousand and the median is 63 thousand.
One extreme value lifts the mean by a factor of 2.34 and the median by one thousand, and a right-skewed sample puts its mean about 65 percent above its median.
FactValue
Mean of the nine ordinary salaries62.44 thousand
Median of the nine ordinary salaries62 thousand
Mean after adding one salary of 900 thousand146.2 thousand
Median after adding the same salary63 thousand
Mean with the top and bottom 10 percent removed (trimmed mean)63.75 thousand
Mean and median of 100,000 symmetric draws (normal, mean 50, standard deviation 10)50.05 and 50.02
Mean and median of 100,000 right-skewed draws (lognormal, parameters 0 and 1)1.644 and 0.998
Share of the skewed draws below their own mean68.97 percent

A trimmed mean is a mean computed after discarding a fixed share of the lowest and highest values; here dropping one value from each end of the ten gives 63.75, close to the median1. The two samples at the bottom of the table are simulated with seed 0. For the symmetric sample the mean and median differ by 0.035, under 0.1 percent1. For the skewed sample, theory gives a mean of about 1.6487 and a median of exactly 1, and the simulation matches at 1.644 and 0.9981. Because the mean sits above the median, about 69 percent of the values fall below the mean, so "the average" overstates what a typical case looks like.

Right skew pulls the mean above the medianMean divided by median for two simulated samples of 100,000 draws: 1.00 for a symmetric sample (mean 50.05, median 50.02) and 1.65 for a right-skewed lognormal sample (mean 1.644, median 0.998).Mean divided by median00.511.52SymmetricRight-skewedSample, each scaled to its median11.647Diagram: Interview Clozo, CC BY 4.0 ·interview.clozo.ai/blog/mean-vs-median.html
Symmetric data gives a mean about equal to the median; right-skewed data pulls the mean above it.CC BY 4.0 — source: What is the difference between mean and median?
Text description of the diagram
  • The mean is 1.00 times the median for the symmetric sample.
  • The mean is 1.65 times the median for the right-skewed sample.

Real statistics follow the same logic. The U.S. Census Bureau reports median household income, not mean, as its headline figure: 83,730 US dollars for 2024 in its Income in the United States: 2024 report (published 9 September 2025). Income is right-skewed, and the median is the amount that half of households fall below. The guide on answering salary expectations quotes the same kind of figure, the Bureau of Labor Statistics median pay.

Trade-offs and edge cases

Neither summary is better in general. The mean uses all the data and is the natural choice for symmetric data and for totals, while the median ignores magnitude and is the natural choice for skewed data and for "typical case" questions.

The mean suits symmetric data and totals; the median suits skewed data and typical cases; a trimmed mean sits between them.
DimensionMeanMedianTrimmed mean
Uses every valueYesNo, only the orderMost values
Effect of one extreme valueUnboundedAt most one stepSmall
Best forSymmetric data, totalsSkewed data, typical caseNoisy data with some outliers
Needs sortingNoYesYes

Four edge cases matter. First, an outlier can be an error: check whether 900 is a typo before choosing a summary, because the right fix for an error is to correct it, not to switch to the median. Second, a skewed distribution may call for reporting both, which the NIST handbook suggests when there is no obvious answer for exponential or lognormal data (section 1.3.5.1).

Third, an even count has no single middle value, so the median is an average of two values that may not exist in the data. Fourth, in machine learning, squared error corresponds to the mean and absolute error to the median, so the loss function chooses the summary your model learns; see choosing a loss, which names absolute error for data with outliers, and the classical machine learning guide.

Skew itself is measured: NIST section 1.3.5.11 says symmetric data should have skewness near zero, with positive skewness meaning a long right tail. A gap between mean and median is a quick hint of skew, not a proof: the order can reverse, especially for discrete data (von Hippel, 2005, Journal of Statistics Education, read 2026-10-24).

Plot the data first, then choose the mean or the medianDecision flow: plot a histogram; symmetric data with few outliers suits the mean, as does any question about a total; skewed data or outliers suit the median, reported with the mean beside it.yesskew or outliersPlot a histogramlook at the shapeSymmetric, fewoutliers?Report the meanalso whenever you need atotalReport the medianand the mean beside itDiagram: Interview Clozo, CC BY 4.0 ·interview.clozo.ai/blog/mean-vs-median.html
Plot first: a total or symmetric data calls for the mean; skew or outliers call for the median, with the mean beside it.CC BY 4.0 — source: What is the difference between mean and median?
Text description of the diagram
  • Use the mean when the data are roughly symmetric with few outliers, or when a total is what matters.
  • Use the median, with the mean beside it, when the data are skewed or contain outliers.

How to answer it in an interview

Interviewer asks

What is the difference between the mean and the median, and when would you use each?

A strong answer

The mean is the sum divided by the count, so every value moves it; the median is the middle value after sorting, so only the order matters. That makes the mean sensitive to outliers and the median robust. I would plot the distribution first. If it is roughly symmetric, or I need a total, I use the mean. If it is skewed or has outliers, such as incomes or latencies, I report the median and often the mean alongside it, and I would check whether an outlier is an error before choosing.

The spoken structure is: define both in one breath, say which one outliers move, then give the rule of plotting first and the example of income.

For a data-science round, add one number. Say that one value of 900 among nine values near 62 moved the mean from 62 to 146 and the median from 62 to 63. A figure you computed yourself is more memorable than a rule.

Common mistakes

  • "Average means mean" (wrong). In everyday speech average can mean mean, median or the most common value (right: name the statistic you report).
  • "The median is always the better choice" (wrong). The median ignores magnitude, so it cannot give a total or a fair share (right: use the mean for totals and for symmetric data).
  • "I drop the outlier and use the mean" (wrong). Removing a real value changes the population you describe (right: check whether it is an error, and otherwise report the median or both).
  • "With an even count the median is a value in the data" (wrong). It is the average of the two middle values, so 4.0 for 1, 3, 5, 7 (right: say it is interpolated).
  • "The mean equals the median, so the data are normal" (wrong). Equal values hint at symmetry; many symmetric shapes are not normal (right: look at the histogram or a normal probability plot).

Follow-up questions

When should you use the median instead of the mean?

Use the median when the data are skewed or contain outliers and you want a typical case, such as income, house prices or response times. Use the mean when the data are roughly symmetric or when a total is what matters.

Is the mean always bigger than the median?

No. For right-skewed data the mean is usually above the median, as in the lognormal sample where 1.644 beat 0.998, for left-skewed data it is usually below, and for symmetric data they are close. The rule has exceptions, especially for discrete data: a Poisson distribution with mean 0.7 has positive skewness of 1.195 yet a median of 1, so its mean is below its median1. Von Hippel (2005) shows the rule fails more often than textbooks suggest.

How do you find the median of an even number of values?

Sort the values and average the two in the middle, so the median of 1, 3, 5, 7 is 4.0. If you need an actual data point, some libraries offer a lower or higher median instead, as the Python documentation notes.

What if the mean and median are equal?

It suggests the distribution is roughly symmetric, so either summary describes the centre equally well. It does not prove normality: other symmetric shapes also give equal values, so plot the data. The same habit appears in feature engineering, where numeric gaps are often filled with the median rather than the mean.

Is there a measure between the mean and the median?

Yes: a trimmed mean discards a fixed share of the lowest and highest values before averaging, as in the example where the 10 percent trimmed mean was 63.75. Computing a median without fully sorting, for example with quickselect or two heaps, is a typical topic in the coding interviews guide.

Key takeaways
  • The mean is the sum divided by the count, and the median is the middle value after sorting.
  • An extreme value moves the mean in proportion to its size; it moves the median by at most one position.
  • Right-skewed data usually has its mean above its median, so the mean often overstates a typical case.
  • Plot first: symmetric data or totals suit the mean, skewed data or outliers suit the median.
  • Check whether an outlier is an error before you change the summary.

Sources

  1. statistics, Mathematical statistics functions (Python 3.15 documentation: mean and median) — Python Software Foundation (page footer: last updated 2026-10-24), 24 Oct 2026
  2. 1.3.5.1. Measures of Location, NIST/SEMATECH e-Handbook of Statistical Methods — NIST (page shows no date; read 2026-10-24), 24 Oct 2026
  3. 1.3.5.11. Measures of Skewness and Kurtosis, NIST/SEMATECH e-Handbook of Statistical Methods — NIST (page shows no date; read 2026-10-24), 24 Oct 2026
  4. von Hippel, Mean, Median, and Skew: Correcting a Textbook Rule, Journal of Statistics Education 13(2) — American Statistical Association (article dated 2005; read 2026-10-24), 24 Oct 2026
  5. Income in the United States: 2024 (Current Population Reports P60-286) — U.S. Census Bureau, 9 Sep 2025