# How do I calculate the average salary of a data set?

I have been given a dataset and been tasked with calculating the average wage for different job titles. The data includes a mix of ranges (min-max) and values.

If we assume for the job title, Developer, these are the wages:

1. $$80K - 120K 2.$$90K
3. $$120K - 150K 4.$$95K
5. $$50K 6.$$200K - 225K
7. $$100K 8.$$100 – 150K
9. $$50K - 120K 10.$$85K


How should I calculate the average wage for a Developer?

My thoughts are to first excluded wage information for 5, 6 and 9 as these look like outliers. I would then take the average of each range and add these together with the other wages, and then divide by the number of wages.

This would give:

(100 + 90 + 135 + 95 + 100 + 125 + 85)/7 = \$104K


I would then conclude that the average wage for a Developer at Company is 104K, with the range 80K to 150K.

Is this approach correct?

EDIT

80K-120K means that there's one person whose income is somewhere in that range.

• What does 80K-120K mean? Does it mean there's one person whose income is somewhere in that range and we're not sure where? or does it mean there's a group of people, one making 80K, one making 120K, the others making somewhere in between? If it's a group, then when you average you should weight the salary by the number of people in the group. Mar 22 '19 at 0:38
• @GerryMyerson Thanks for the reply. Please see my edit which answers your question. Mar 22 '19 at 0:52
• @tigertommy: I'm sorry but I don't understand why are you not using all the data. If you fear that outliers may contaminate the mean, perhaps you should use the median. Other than that, I think it's a good idea to use the range mid-point whenever you don't know the exact value of the salary. Mar 22 '19 at 1:09
• @Ertxiem Thanks. That's a fair point. How should I determine if I should use the median instead of the mean? Mar 22 '19 at 1:14
• @tigertommy: There if no computation that can answer that. It really depends on the aims of the study and how do you wish to deal with the outliers. Mar 22 '19 at 1:19