Mean versus median in a skewed order-value report
In this article (6 sections)
Use the mean when the arithmetic average matches the question, and the median when the middle observed order is the intended summary. In a skewed distribution, report enough context to show why they differ rather than declaring one universally better.
For revenue reporting, the total and order count remain essential. A median describes a location in the distribution; multiplying it by order count does not generally reconstruct revenue.
Calculate all three from the same population
The analyst statistics lab contains ten synthetic order values in INR: 100 through 180 in increments of ten, followed by a valid bulk order of 2,000.
import numpy as np
from build_and_verify import ORDER_VALUES
values = ORDER_VALUES.copy()
count = len(values)
total = float(values.sum())
mean = float(values.mean())
median = float(np.median(values))
assert (count, total, mean, median) == (10, 3260, 326, 145)
assert mean * count == total
assert median * count != total
assert np.sort(values)[4:6].tolist() == [140, 150]
print({'orders': count, 'total_inr': total, 'mean_inr': mean, 'median_inr': median})The median is the midpoint of 140 and 150 because there are an even number of observations. The mean is higher because the INR 2,000 order contributes to the arithmetic total.
NIST's measures of location guide discusses location summaries and their different sensitivities. The fixture makes those differences concrete without implying that the bulk order is erroneous.
Match the statistic to the decision
If the question is the observed average revenue per order, the mean is INR 326 for this population. If the question is the middle order value, the median is INR 145. If the question is total observed revenue, the answer is INR 3,260.
Calling the median the true average would obscure the legitimate contribution of larger orders. Calling the mean the typical customer purchase could also mislead if the audience expects a middle-sized order.
Use a precise label and explain the skew. A small distribution table or histogram can show the concentration near INR 100–180 and the separate bulk order.
Do not delete a valid order to improve the summary
Removing the largest order leaves nine orders totaling INR 1,260, with mean and median both INR 140. That is a different population, not a correction unless the exclusion is justified by the reporting contract.
If bulk and retail orders serve different business questions, report the segments explicitly and reconcile them to the combined total. Do not create a segment solely to hide an inconvenient observation.
Choose the grain before the statistic
Order-level median and customer-level median answer different questions. A customer with several orders appears several times in an order-level distribution but once after customer-level aggregation.
Similarly, averaging daily order-value means gives each day equal weight. To obtain the overall order mean, combine daily revenue and daily order counts, then divide. The denominator must match the intended unit.
Missing amounts require separate coverage. A mean over observed amounts should be labeled as such when some orders lack values. Filling those values with zero changes the statistic through an assumption.
Separate description from inference
These calculations describe the ten supplied orders exactly. They do not establish a future population average or a confidence interval. Generalizing requires a sampling or process model and attention to dependence, seasonality and selection.
A large historical extract can still be unrepresentative of the period or customers relevant to a decision. More rows do not automatically resolve a mismatched population.
Exercise: replace the bulk order with INR 3,000 and calculate the new mean and median. Explain why the median can remain unchanged while total revenue and mean increase, and identify which change matters for a revenue forecast versus a typical-order description.
NeuraPath's Data Analytics with Generative AI course connects statistics with metric definitions. A useful report chooses its summary from the decision and keeps the population and units explicit.
Continue learning
This article is part of the Statistics for analytical decisions sequence. Use the neighbouring tasks when you need the prerequisite or the next application.
- Continue with Standard deviation versus standard error with a simulation.
- Then apply it in Confidence intervals: explain uncertainty without promising certainty.
Pankit Kumar has 10 years in Data Science & AI, building and shipping production systems in regulated pharma and clinical environments. He is a freelance trainer at Boston Institute of Analytics, AnalytixLabs and Scaler, and has taught this material to thousands of working professionals.
This article is part of our Data Analytics with Generative AI programme — 3–4 months. The full analyst stack — Excel, SQL, Power BI and Python pipelines — then a generative-AI layer you can prove is right.
Explore Data Analytics with Generative AI