In the process of investigating the relative merits of majoring in computer science versus various engineering specialties, I came across the following puzzle, which I've been unable to solve. Maybe one of you can.

The puzzle is that:

  • Computer science majors make about the same as mechanical and electrical engineering majors do in general.
  • For colleges with top computer science programs and engineering programs, computer science majors' starting salaries are far higher than mechanical and electrical engineering majors' starting salaries.

Some supporting data below:

Computer science majors make about as much as mechanical/electrical engineering majors 

The 2013-2014 Payscale College Salary Report gives the following figures:

Major / Starting Salary / Midcareer Salary

Computer Science / $60k / $102k

Mechanical Engineering / $61k / $100k

Electrical Engineering / $64k / $106k

Here the figures are very close.

----

A Payscale report from 2008 gives a breakdown of mid-career salary by major and percentile:

Major / 10%-tile / 25%-tile / 50%-tile / 75%-tile / 90%-tile

Computer Science / $56k / $74k / $95k / $122k / $154k

Mechanical Engineering / $64k / $76k /  $97k / $120k / $163k 

Electrical Engineering / $69k / $83k / $103k / $130k / $168k

This gives the impression that CS majors generally made less than electrical and mechanical engineering majors at the time.

----

The Bureau of Labor Statistics (2013) gives percentile breakdowns for programmers, software developers, electrical engineers and mechanical engineers. This isn't strictly data about salaries by major but nevertheless serves as a proxy to salary by major (with programmers and software developers being associated with the computer science major)

Job / 10%-tile / 25%-tile / 50%-tile / 75%-tile / 90%-tile

Computer Programmer / $44k /  $58k  / $76k / $98k / $124k

Software Developer  / $56k / $72k / $92k / $117k / $144k

Mechanical Engineer / $53k / $65k / $82k / $103k / $123k 

Electrical Engineer / $57k / $70k / $89k /  $113k / $139k

Pooling together the programmers and software developers would give salary figures in line with electric and mechanical engineers' salary figures.

For recent graduates from top schools, the situation is different

I looked at salary data from the 6 top ranked colleges (roughly speaking) in computer science and engineering.

---

Stanford reports average starting salaries for 2011-2012 graduates by major:

Major / starting salary

Computer Science BS / $94k

Computer Science MS / $105k

Mechanical Engineering MS / $83k

Electrical Engineering BS/MS / $73k

The page doesn't say whether the average is the mean or the median.

----

MIT reports average starting salaries for 2013 graduates by major (pg. 25)

Major / starting salary

Electrical Engineering and Computer Science / $92k

Mechanical Engineering  / $75k

The document doesn't say whether the average is the mean or the median.

---

UC Berkeley reports average starting salaries for 2012 graduates by major:

Major / starting salary

Electrical Engineering and Computer Science Computer Science / $83k

Mechanical Engineering  / $64k

The pages don't say whether the average is the mean or the median.

---

Carnegie Mellon reports starting salaries for 2013 graduates in computer science and engineering

Major / mean starting salary / median starting salary

Computer Science / $95k / $100k

Mechanical Engineering  / $64k / $64k

Electrical and Computer Engineering  / $86k / $90k

---

University of Illinois reports starting salaries for 2012 graduates by major. 

Major / mean starting salary / median starting salary

Computer Science / $81k / $90k

Mechanical Engineering  / $65k / $64k

Electrical Engineering  / $67k / $70k

---

Cornell University reports starting salaries for the class of 2012 by major

Major / mean starting salary

Computer Science / $76k + ~5k bonus

Mechanical and Aerospace Engineering  / $62k

Electrical and Computer Engineering  / $70k + ~3k bonus

---

Putting this together, it appears that on average, computer science majors at top schools make between $8k and $21k more than electrical engineering majors, and between $16k and $36k more than mechanical engineering majors, depending on the metric used and the school. These differences favor computer science substantially more than any of the differences described in the previous section.

Possible explanations

What is going on here? Why do recent graduates from top schools who major in computer science have salaries that are so much higher than  than those who major in electrical and mechanical engineering, when the trend doesn't appear to hold more generally, even when comparing the 90th percentile of earners in the respective majors?

Do salaries in computer science start higher but plateau more quickly?

Are graduates from top schools above the 90th percentile in earning power (after controlling for age), such that the broader trends reported on in the first section of this post aren't pertinent? 

I'd welcome any thoughts.

New Comment
33 comments, sorted by Click to highlight new comments since:

The CS graduates from top schools disproportionately end up in Silicon Valley, where salaries are much higher than in other places, as is the cost of living. Mechanical engineering doesn't have a very large Mecca of its own.

(this post might have been better as an Open Thread comment)

(this post might have been better as an Open Thread comment)

I think it's quite alright on it's own.

It's about reasonable data and data driven thinking is something we generally want ot encourage. It's also quite long for Open Thread standards.

Silicon Valley lore is that top programmers are 10x as productive as regular programmers (see Joel Spolsky or Paul Graham). I once attended a lecture series where entrepreneurs from Silicon Valley came to talk, and one point they kept hammering on was the importance of hiring the best people. So if coming from a top school makes SV employers think (correctly or incorrectly) that you're a top programmer, this could go a way towards explaining the salary thing.

So if coming from a top school makes SV employers think (correctly or incorrectly) that you're a top programmer, this could go a way towards explaining the salary thing.

This also works if coming from a top school correlates with some factor that makes SV employers think you're a top programmer. The most obvious example of such a factor is programming skill: you'd expect people at top schools to program better, on average, than people from obscure schools.

This is true of engineering as well though. I've seen whole teams productivity cut to near 0 when a key player leaves the company.

That actually sounds pretty fascinating. Want to share more details?

Here are a few examples off the top of my head- One of my first consulting jobs ever was to reverse engineer a bunch of models a former employee of a small engineering company had built. The company's IT was atrocious, and to work around them, the employee in question had implemented a surprising amount of code in sql queries that were embedded in excel sheets (in general, the ways people work around bad IT make the situation even worse). These models and spreadsheets had become part of nearly every member of her team's workflow. She left the company, productivity ground to a halt (with no one to keep the spreadsheets up to date, they were suddenly at the mercy of their terrible IT) and they spent a small fortune in consultants to get things back to where they were.

Insurance companies have a lot of data entry/data manipulation positions, because of the volume of claim data that comes in, much of which is still on paper. I recently worked with a small company that had four data analyst. One processed 9 data streams, comprising about 70% of their total claim volume, the other three managed to do one stream apiece. He had cornered himself by being literally too productive to promote to more interesting work.

Several months ago, I worked with a small marketing firm. They had a fairly large predictive analytics team, but all of their production models had come from a single modeler. The other modelers were building quite a lot, but none of them were winning out to production (their process, which is pretty common, was to run several models in parallel and move the best performing model to a production environment).

My first though was also along this line: Mechanical and other non-electronics-related engineering is mostly an established (read: CMM 4-5 level) fundamental part of our society where advancements or economically impactive progress are made only by the >99% percentile - at least that is my impression. Sure technology progresses here but it doesn't make economical sense to excessively invest in brains.

CS on the other hand is not as established. Actually we haven't reached the anything worth the name 'software engineering' even though this is demanded all the time. Our best working methodology is called 'agile' and far away from CMM 5. So in such a dynamic environment brains and talent make a difference. And I think this is what translates into a long tail of occupations, jobs, startups that have a sore demand and obviously are willing and able to pay much more than could pay back for normal engineering.

Also compare with blue/red ocean strategy.

The CS graduates from top schools disproportionately end up in Silicon Valley, where salaries are much higher than in other places, as is the cost of living. Mechanical engineering doesn't have a very large Mecca of its own.

The point about cost of living is a good one.

[-][anonymous]70

Bubble-type overvaluation of that particular skillset over the last few years?

Good question. Do you have reason for thinking so, as opposed to the trend being driven by a shift in fundamentals?

[-][anonymous]40

Anecdotal reasons. While being quite far from the programming world myself, I have multiple old friends living and working on the other side of the country in the belly of the beast in San Francisco.

One just recently quit a large well-known company and is looking for another place to work, and complained to me recently that every place she talks to doesn't actually talk about business models or product plans but instead spouts platitudes and overwrought claims of near-cosmic significance that seem to have specifically evolved to extract venture capital money rather than actually fulfil a need or produce a profitable business.

Another is stably working at a small company that actually does have a stable profitable business model, but often complains to me about how the majority of the people he works with or meets in that field have extremely inflated ideas about the amount of value they are actually generating and sometimes wonders when the investors as a general class will figure out how badly they are being played.

I want to note that engineering degrees can be more work than computer science degrees. This definitely true at Harvey Mudd College.

I studied engineering, but looking back Computer Science seems like it would have been a lot better. I've headed there since, but I definitely feel like I'm playing catch-up in comparison.

If it makes you feel better, I studied computer science but frequently feel a sense of inadequacy because it feels less hard core than "real engineering".

Another argument against getting a CS degree is that it's hard to teach yourself engineering on your own but you can teach yourself programming on your own. So in terms of opportunity costs it might make sense to go for engineering. Also, you can go for "X who programs" type roles. See this thread.

If it makes you feel better, I studied computer science but frequently feel a sense of inadequacy because it feels less hard core than "real engineering".

Your sense of inadequacy is probably unjustified. I studied electrical engineering and computer science. Within both fields there's a wide range of hardcore-ness. In both fields you can find people who do incredibly difficult things, and a much larger group of people who do the bare minimum, and people everywhere in-between. I have seen some startlingly incompetent people with engineering degrees, so the lower bound here is pretty low.

I studied engineering, but looking back Computer Science seems like it would have been a lot better.

I'd be very interested in hearing more – you're just the sort of person who I was hoping would comment (graduate from a top program several years out who switched fields and so has had exposure to both). In what respects would majoring in computer science have been better for you?

  1. Computer science definitely seems better for making companies / entrepreneurship potential.

  2. In my experience, engineering jobs are far more segmented. You can be awesome at making microprocessors, but then only a few companies may be able to hire you. In other fields in similar; there are lots of interesting areas within engineering, but within each, it seems like there are only a very few specific companies, especially within a given geographic area.

  3. For whatever reason, a lot of engineering companies just don't seem that great (I think it's the lack of competition). Tesla and Space X (two of the top companies engineering friends would find jobs at) are much worse to work at than one may expect (see the Glassdoor ratings). Where you can find one, hope you keep the job (it often seems like you become specialized, and there just aren't many other great companies in the space. An example is Intel).

  4. I think that computer science jobs are more flexible than engineering jobs. I'm a bit more afraid of engineering jobs getting automated than computer science jobs (if you're ok learning a lot of new languages).

  5. More startups in computer science, if you're into that.

  6. The fact that engineering is way harder in college (at least my college) is an important factor. I really disliked much of my college experience because of the difficulty. Now a lot of the information doesn't seem applicable to my life, at all (I'll forget it quickly).

  7. It seems like with CS you get the bonus of understanding AI risk more, if you're into that.

I think that my (general engineering) degree definitely gives me a bit of a diverse background. I kind of have the option of going to a hardware/software startup, although I'm not sure I want to go in that direction with my career (it seems to narrow your career without improving your expected earnings). I like to think that it may be useful if I want to go into venture capital or some more diverse or meta-level positions, but now I'm really not sure about that.

One huge benefit to engineering is that I feel more comfortable making cool stuff, like arduino hobby circuits or burning man floats if I wanted to. It does feel really cool. Doesn't help my career as much though.

(For reference, I graduated with a 3.0 at Harvey Mudd College in General Engineering, focussed a bit on electrical. I spent 1 year doing web entrepreneurship with a cofounder, then another year with 80,000 hours doing web development.)

Computer science has a higher loading for intelligence than the engineering majors, so the correlation between intelligence and salary is greater. School selectivity is a measure of intelligence.

For much of the work engineers do, the difference between a smart engineer and a dumb engineer is not that much. Think designing a bridge, that has all be done before and there are general procedures for it.

Programming is different, to a good degree: the difference between the work a smart programmer does and the work a bad programmer is very significant and very noticeable. See "10X programmers" [1] *. Individual differences in programming effectiveness are much larger than in other disciplines.

This is not to say that cs majors are more intelligent, their SAT scores are actually somewhat lower than the other engineering majors. They just matter for them more.

[1] https://programmers.stackexchange.com/questions/179616/a-good-programmer-can-be-as-10x-times-more-productive-than-a-mediocre-one

* it is currently trendy to declare that "10X programmers" are a myth that hurt women and minorities, I ignore those people mostly

  • it is currently trendy to declare that "10X programmers" are a myth that hurt women and minorities, I ignore those people mostly

In my experience, women and minorities in programming tend to go into programming because it is similar to their mental maps, as opposed to a substantial percentage of the members of majority groups - white, Indian, and Asian men - who I've met, who went into programming because it pays well. Thus, in my experience, women and minorities tend to be overrepresented in the "10X" group relative to their overall representation. (My experience is that about women and minorities are about 50/50.)

Startups try to hire software engineers disproportionately from top schools. Starting engineering salaries at startups tend to be in the 80-100k range (sometimes higher). This is the case in SV, but also in NYC and many other markets.

The trend likely doesn't hold generally because it's a very local distortion. Startups like to hire young people and almost never hire engineers over 35 [1]. Essentially they're driving up demand for a small subset of the work-force, and the price for that subset has changed accordingly.

[1]: This is a blatant overgeneralization and is definitely not true for all startups, but does appear to hold for the vast majority.

Starting engineering salaries at startups tend to be in the 80-100k range (sometimes higher).

Is this true? My impression is that they're often lower, with the lower figures compensated for with equity.

The word "startup" gets thrown around a lot in Silicon Valley, e.g. I was an intern at a company with over 50 employees that had millions of users and had been profitable for several years that still called itself a startup.

You need to compare the ratio of number of graduates from elite universities to total job market sizes. If there are 3 times as many CS jobs, but the same number of elite-school CS graduates, those graduates can all get high-paying jobs.

Another variable, similar to location-based compensation (i.e. standard of living multiplier) is what sort of company the employee lands at. I work at a very large company (80k employees world-wide), with very established pay scales for employees. Just to illustrate how things work:

  • Technical employees are on a scale of what are called job grades
  • Job grades have a pay scale, which includes a minimum, median, and maximum
  • Annual pay increases are calculated based on performance + where you are in your current grade's scale
  • Promotion raises are between 8-12% unless 12% would land you below the minimum of the next grade up

So, that's all to say that when I read this, I wondered about the types of companies that each major lands at. If I had to ballpark my employer's demographics, I'd say: polymer scientists = chemists = chemical engineers > mechanical engineers = physicists = electrical engineers >> environmental engineers = CS majors.

If it's a large, established company with significant investment in a system like the above (intuitively, I'm thinking that ME's and other engineers are more likely to land in places like this vs. startups, smaller companies, and consulting with more variability in salary), could this shed light on the situation? This is similar to Gunnar_Zarncke's comment, but with a bit more behind why established companies might pay less.

I think your suggestion about graduates from top schools being above the 90th percentile is quite plausible.

Also, part of it could be that programmer salaries have gone up recently, so that the mid-career data you cite won't be in line with the current starting salaries. This would match up with the anecdata I have that starting salaries for college hires at Microsoft, Amazon, etc. are about 30% higher now than 7 years ago. Have salaries for other engineering jobs increased at the same rate?

I think your suggestion about graduates from top schools being above the 90th percentile is quite plausible.

Let's see. This article from 2013 reports that 56,742 students graduated with CS majors in 2012. It seems that there are on the order of 100 CS graduates at each top school per year (with the number increasing rapidly over time), so maybe 1,000 total, so 2% of CS graduates. So yes, it's plausible that they're above the 90th percentile.

Also, part of it could be that programmer salaries have gone up recently, so that the mid-career data you cite won't be in line with the current starting salaries. This would match up with the anecdata I have that starting salaries for college hires at Microsoft, Amazon, etc. are about 30% higher now than 7 years ago. Have salaries for other engineering jobs increased at the same rate?

The 2008 source that I cited in particular is dated.

Is it plausible that starting salaries would increase faster than mid-career salaries? Why wouldn't salaries for senior software engineers rise by 30%, too?

It is leveling of pay throughout the career for CS compared to growth in the first 8-10 years for engineering followed by general leveling, at least from what I see. Entry level engineers see salaries increase 10-15% annually at first! and then leveling off around $110k to a 2-3% annual increase. (There appears to be an age biased decrease after age 55 or so for the median changing jobs as well.)

This happens in cycles... Bubbles if you will. It isn't really sustainable, and it distorts the market. The numbers don't make much sense without a lot of detail.

For a given aptitude, earnings potential in engineering and CS are similar.

Is it plausible that starting salaries would increase faster than mid-career salaries? Why wouldn't salaries for senior software engineers rise by 30%, too?

Yeah, that was the hidden assumption behind my claim. On further reflection I don't have a clear idea whether it's correct or not.

It seems that there are on the order of 100 CS graduates at each top school per year (with the number increasing rapidly over time),

I would be extremely surprised if the graduates from the top 10 CS schools as a proportion of all CS graduates were rising. In fact, I believe that some of the top schools stopped increasing enrollment decades ago. To the extent that the list of top CS schools differs from top schools or top engineering schools, it is because it is the places that got into CS early.

The number at Stanford in particular seems to have doubled over the past 5 years – I was extrapolating based on that together with the nationwide trend. But Stanford may be unrepresentative, or I may be reading the data wrong.

Is it plausible that starting salaries would increase faster than mid-career salaries? Why wouldn't salaries for senior software engineers rise by 30%, too?

How durable is the human capital of software engineers? When the age discrimination in Silicon Valley comes up, a lot of people point out the huge turnover in technologies over decades, which would seem to negate a lot of the benefits of experience.

Good point, thanks. Are you a programmer? If so, is this your subjective sense for what's going on?

I'm not a professional programmer, but I do program for my own needs, my older sister is a professional, and obviously I hang out with a lot of programmers between Reddit/HN/Lesswrong/#lesswrong. My subjective sense is that there's a lot of truth to the turnover claim, although I don't know how much or how one would rigorously test such a claim.