Salary surveys love a headline number: “Average pay for data analysts in Bengaluru is ₹9.8 lakh.” Read carefully, that number may not describe a typical analyst at all. The reason is one of the most useful ideas in basic statistics: the difference between the mean and the median, and what happens to both when data is skewed.
A small team, a big difference
Consider an illustrative analytics team of seven people with these annual salaries, in lakh rupees:
5, 6, 6, 7, 8, 9, 42
The mean is the total divided by the count: 83 ÷ 7 ≈ 11.9 lakh. The median is the middle value once sorted: 7 lakh. Six of the seven people earn less than the mean. One senior leader’s salary has pulled the mean far above where most of the team sits.
If that team’s manager reports “average salary ₹11.9 lakh” to justify that pay is competitive, the statement is arithmetically correct and practically misleading. The median says much more about what a typical team member earns.
What skew actually means
A distribution is right-skewed (or positively skewed) when it has a long tail on the high side: many values clustered low, a few very large ones. Income, house prices, order values on an e-commerce site, time spent on a web page and claim amounts in insurance are almost always right-skewed. In such data the mean sits above the median, sometimes far above.
Left skew is the mirror image: a long tail on the low side, with the mean below the median. Exam scores on an easy test often look like this, with most students scoring high and a few scoring very low.
A quick check is to compare the two numbers. If the mean and median are close, the data is roughly symmetric. If the mean is well above the median, expect a long right tail and look at the distribution before quoting either.
Which summary to use
- Median for “what does a typical case look like?” in skewed data: typical salary, typical delivery time, typical ticket resolution time.
- Mean when totals matter. If finance needs to budget the total payroll for next year, the mean multiplied by headcount gives the right answer and the median does not. The mean is also what most statistical tests and models are built around.
- Percentiles when the spread itself is the story. Reporting the 25th, 50th and 75th percentiles (the quartiles) shows where most people sit, and the 90th percentile shows what the top end looks like. Compensation benchmarking is almost always done this way for good reason.
Outliers: remove, cap, or keep?
The ₹42 lakh salary is an outlier, but it is not an error. Deleting it would misrepresent the team. That is the first question to ask about any extreme value: is it a genuine observation or a data problem, such as an extra zero typed into a form or a value recorded in rupees instead of lakh?
Genuine outliers should usually stay in the data but be handled thoughtfully. Common approaches are to report the median alongside the mean, to cap extreme values at a high percentile (often called winsorising) for modelling purposes, or to analyse on a log scale, which compresses the long tail. The interquartile range rule, flagging values more than 1.5 times the IQR beyond the quartiles, is a handy first screen, not a deletion rule.
Doing it in the tools you already use
In Excel, AVERAGE(), MEDIAN() and PERCENTILE.INC() cover all of this, and SKEW() gives a numeric measure of asymmetry. In pandas, df["salary"].describe() prints the mean, quartiles and spread in one go, and .skew() returns the skewness. In SQL, most modern databases support PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY salary) for the median, though the exact syntax varies between PostgreSQL, SQL Server and others. A histogram in any of these tools will show the shape faster than any statistic.
The habit worth building
Whenever someone quotes an average, ask two follow-up questions: what is the median, and what does the distribution look like? Those two questions catch a surprising share of misleading charts in business reviews, news articles and salary reports. They also make your own analysis harder to misread.
Written by the RP Strativa Team. Salary figures in the example are illustrative.
Leave a Reply