Imagine two hypothetical pitchers. Their ERAs are very close together and both pretty average: 3.40 and 3.41. They’ve both pitched just over 200 innings in 30 starts with just a couple weeks of the season remaining. But one pitcher has had some pretty advantageous matchups: he’s played the Padres four times, the Reds and Rockies twice each, the Pirates, the Mets, the Royals – all teams with records under .500. The other pitcher, on the other hand, has had a harder schedule: four games each against the Yankees and the Red Sox, two against the Rangers, and one in Detroit. Are these equivalent pitchers?

I set out to determine if pitchers we accept as “elite” are truly that great, or if some might have an unfair advantage due to schedules. I downloaded all of MLB’s gamelogs for the 2011 regular season up through yesterday, and then I parsed them, tracking a few key pieces of information. First, the number of innings each pitcher pitched against each team. Second, the average number of earned runs each team scores per inning. Then, for each pitcher, I calculated what their ERA would be if they allowed exactly their opponent’s average for each appearance. Here are the results (for pitchers who have enough innings pitched to qualify for the ERA title):

Expected ERA - after 2011-09-12

One interesting takeaway is that there aren’t any huge surprises. Of the pitchers with the ten best actual ERAs, only one of them (Cole Hamels) isn’t in the top ten for the best differential. Another interesting fact is how much a pitcher’s expected ERA is affected by simple rotation timing, and not just the team’s schedule. The Phillies have played against a lot of sub-.500 teams this year, and Cole Hamels has one of the lowest expected ERAs. But his teammate Cliff Lee hasn’t been so lucky – his expected ERA is higher than most.

But there are some people who get a nudge from good to great with this analysis. Oh, and those two hypothetical pitchers I mentioned? They aren’t hypothetical. They’re Daniel Hudson of the Diamondbacks and David Price of the Rays, respectively. This puts a little context on the fact that Price’s record is 12-12 and Hudson’s is 16-9.