Patterns / Measuring

Median beside the mean

Report both. The gap between them is a free skew diagnostic, and it tells the reader which number to trust.

Core ·Statistics

You meet it when#

Anyone asks for an average of something with a floor and no ceiling — order value, session length, salary, resolution time, items per order. Which is most business metrics.

Why the mean drifts#

The mean is the balance point of a distribution. For a symmetric distribution that is also the typical value. For a right-skewed one — a long tail of large values — the balance point is dragged toward the tail, away from where most observations actually are.

Right skew is the default in business data because most quantities are multiplicative: spend is roughly visits × items × price, and multiplying three variable things produces a long tail.

The pattern#

sql
select
    borough,
    count(*)                                               as trips,
    percentile_cont(0.50) within group (order by fare_usd) as median,
    avg(fare_usd)                                          as mean,
    percentile_cont(0.90) within group (order by fare_usd) as p90
from ride_hail_trips
group by borough
order by median desc;

Four numbers, one query, and the reader can see the shape.

Reading the gap#

Median vs meanWhat it meansWhat to report
CloseRoughly symmetricEither; mean is fine
Mean noticeably higherRight-skewedMedian, with p90 beside it
Mean much higherHeavy tailMedian, and a t-test on this is not valid

The mean is not wrong — it is the total divided by the count, so if you care about total revenue it is exactly the right per-unit number. Say which you mean: "mean $84, which multiplies out to total revenue; median $41, which is a typical order."

Spread, matched to the summary#

Standard deviation inherits the mean's assumptions. On a lognormal fare column, "mean 14.20, sd 11.80" implies a range dipping below zero.

For skewed data quote the interquartile range or the percentiles themselves: "median 11.40, IQR 7.80–17.20, p99 62.00" is accurate, immediately interpretable, and no longer than the mean and sd.