Do You Know When the Mean Can Be Misleading?
🇧🇷 Versão em português: https://medium.com/@data.analyst.deb/voc%C3%AA-sabe-quando-a-m%C3%A9dia-pode-estar-mentindo-para-voc%C3%AA-bf2007302fc4?postPublishedType=initial
What is it?
Mean: The mean is calculated by adding all the values in a dataset and dividing the total by the number of observations.
Median: The median is the middle value of an ordered dataset. If the dataset contains an even number of values, the median is calculated by averaging the two middle values.
When should you use it?
Mean:
- When the data does not contain significant outliers.
- When you want to represent the overall behavior of the dataset.
Examples: average revenue, average age, average grade.
Median
- When extremely high or low values may distort the mean.
- When you want to identify the “typical” value in a distribution.
Examples: salaries, household income, customer service response times, and real estate prices.
How I Used This in a Real Project
In an operational analytics project, I needed to evaluate the average response time for customer requests. At first, I used the mean, but I noticed that a few exceptionally long response times (outliers) made the overall metric appear much worse than the reality.
Get Débora Vieira’s stories in your inbox
Join Medium for free to get updates from this writer.
By also calculating the median using Python (Pandas), I was able to demonstrate that most requests were actually completed much faster than the mean suggested. This provided a more accurate view of the operation and helped stakeholders understand the impact of those exceptional cases.
Although most requests took around 5 minutes, a single request lasting 120 minutes significantly increased the mean. In this scenario, the median provided a much better representation of the typical response time because it is not affected by extreme values (outliers).
There isn’t a universally better metric — the right choice depends on the context. Use the mean when your data is relatively homogeneous and free of significant outliers. Use the median when extreme values could distort your analysis and you want to represent the typical observation more accurately.
If you have any questions, feel free to send me a message!










