Does Having A Ph.D. Make you Earn More (in the tech field)?

Introduction
The popularity and employment prospects of certain Ph.D. fields have shifted unevenly in recent decades. The number of Ph.D. graduates has risen since 1990, but fewer postdoctoral research positions were available at their graduation. According to the National Science Foundation, more than 55,000 people received doctorates in 2019, about 70% stayed in academia. How about those who could not get a postdoc or are not willing to continue their career as researchers? Looking for an industrial job is an alternative. Jobs requiring skills that are in line with what they have learned in graduate school are the best option. These skills include data analyses, programming, experiment design, and so on, making them ready on the market.
Will years of academic training help them to get larger paychecks?

I used data from Stackoverflow’s 2017 Annual Developer Survey to answer this question. There are 64,000 participants from 213 countries and territories filling out the survey. It aims to understand various aspects of jobs related to software development and data analytics. Of course, the survey collects information about participants’ education level and salaries, which we can use to answer our question.
Question 1: Does having a Ph.D. really make you earn more money (in the tech field)?
Let’s first take a look at the distribution of the highest education they received. The majority of them have a bachelor's degree and then a Master’s degree. A little more than five hundred participants have a Ph.D. degree, which only takes up 3.6% of participants who answered the survey.

Rather than comparing the total number of Ph. Ds with those of other degrees in the field, we can also rank the average salary for each education group as shown in the bar chart below. Clearly, participants with a doctoral degree rank the first in terms of the average they get paid, which is around $78,000 a year. Interestingly, people with primary/elementary school education are ranked second. Education may not be the most important indicator of salary.

To test our hypothesis that Ph.D.s have a higher salary, I grouped participants into Ph.D. and non-Ph.D and ran a hypothesis testing. The boxplot below shows the average salaries for the two groups. The mean and median salary of the Ph.D. group is higher than the other group.

Null hypothesis Ho: The mean salary of Ph. Ds is equal to the mean salary of non-Ph.D.
Alternative hypothesis Ha: They are different.
t-test = 5.49 and p-value = 1.8116761446575578e-07
Therefore, we reject the null hypothesis and conclude that the average salary of Ph.Ds is higher.
Question 2: Where do Ph.Ds Go, Small Startup, or Big Companies?
Having answered the first question, we are also interested in what companies do Ph.Ds work at? That might answer the question of why their average salary is higher. The companies with more than 500 employees are considered big companies, and the rest are small companies. Among 551 participants with a Ph.D. degree, 223 are working at large-sized companies, whereas 328 are in small companies. What’s more interesting is shown in figure 4. Even though more Ph.Ds are in small companies, the average salary is lower than those in big companies. A takeaway message for new Ph.D. graduates is that applying for jobs in big companies will make your earn more.

Question 3: What Factors are Associated with High Salary?
Having learned that a higher degree will make people in the tech field earn more, but what are the most important factors affecting the paychecks? The answer to this question may help people who do not want to investigate another degree but willing to raise their salary.
To answer this question, I ran a random forest regression to learn the relationships between the salary and the other factors in the dataset. I plot the most important features in the random forest regression.

Here, we can see that the most important factor in explaining the high salary is actually which country the data analysts/developers are working in. If a participant is working in the U.S, he/she is more likely to get paid more. However, we don’t have the information about the costs of living and other information. Years of programming experience is the second factor that influencing salary.
Conclusion
In this article, we took a look at the average salary of people with a Ph.D. degree according to Stack Overflow 2017 survey data.
- The hypothesis testing concluded that the average salary of Ph.Ds in the tech field actually is higher than the salary of non-Ph.Ds.
- More Ph.Ds work at small companies but get paid less than those in big companies.
- Finally, the education degree is not the most important factor affecting salary; it is actually which country you are from. The U.S data analysts and engineers are making the most. Years of programming experience is also positively correlated with salary.
If you are a new Ph.D. graduate, you shouldn’t be sad about leaving academia because you are more likely to get a big paycheck in the industry. For those who want a raise in salary, my advice is to move to the U.S. and keep programming.
To see more about this analysis, see the link to my Github available here.





