DO the Republicans owe their current congressional majority to gerrymandering? At first glance, it seems self-evident that they do. In the 2012 election, the Democrats won the popular votes for the presidency, the Senate and the House of Representatives. But somehow in the House — for whose seats Republicans controlled the redistricting process in many crucial states — the Republicans managed to end up with a 16-seat majority despite losing the popular vote.

The presumption among many reformers is that the Democrats would control Congress today if the 2012 election had been contested in districts drawn by nonpartisan commissioners rather than politicians.

But is this true? Another possibility is that Democrats receive more votes than seats because so many of their voters reside in dense cities that Democratic candidates win with overwhelming majorities, while Republican voters are more evenly distributed across exurbs and the rural periphery. Perhaps even a nonpartisan redistricting process would still have delivered the House to the Republicans.

To examine this hypothesis, we adapted a computer algorithm that we recently introduced in the Quarterly Journal of Political Science. It allows us to draw thousands of alternative, nonpartisan redistricting plans and assess the partisan advantage built into each plan. First we created a large number of districting plans (as many as 1,000) for each of 49 states. Then we predicted the probability that a Democrat or Republican would win each simulated district based on the results of the 2008 presidential election and tallied the expected Republican seats associated with each simulated plan.