Much of the chatter about next month's midterm election has focused on Republican gains in the Senate, possibly enough to take control of the chamber. The chatter has even taken a triumphalist tone on the right: "We're watching a wave come in," writes columnist Michael Barone. But an examination of governors' races around the country paints a different picture—one that is potentially good for Democrats.

In the United States, wave elections are usually defined in terms of gains in the House and the Senate. In midterm years, strong congressional gains are often accompanied by a net gain in governorships, about two-thirds of which come up for election in the same year. Midterm wave elections generally favor the party in opposition to the president. In the quintessential wave election of 1994, Republicans made net gains of 52 seats in the House and 11 governorships. In 2006, Democrats picked up 31 House seats and 6 governorships. Most recently, in 2010, Republicans picked up 64 House seats and six governorships.

With less than two weeks to go until the election, the overall picture of 36 gubernatorial races is not breaking in the Republicans' direction.

This chart—calculated from HuffPost Pollster data, using the median-based approach of the Princeton Election Consortium—shows elections that are likely to result in a switch in party control or are polling with a margin of five percentage points or less. On the left are the margins by which sitting governors won in 2010. On the right is the median performance of this year's candidates in polls completed in the last two weeks. Red indicates a Republican in the lead, blue indicates a Democrat, and green indicates an independent.

The most remarkable feature of this chart is the widespread weakness in the Republican field. In five states—Alaska, Pennsylvania, Maine, Illinois, and Rhode Island—an independent (Alaskan Bill Walker, who is running on a fusion ticket with Democratic running mate Byron Mallett) and four Democrats hold the lead. In eight states, the candidates are either tied or within 1 percentage point or less of each other. The only state where the Republican is somewhat favored to take a governorship from Democrats is Arkansas, which was won by Mitt Romney in 2012 and where Asa Hutchinson now leads Mike Ross by a median of two percentage points.

Almost certainly, other close races besides Arkansas will be won by Republicans. But with these numbers, it is hard to say which ones. In such a situation, the laws of probability can help us estimate the outcome. I used polling margins and possible pollster error to calculate the probability of a Democratic or Republican win in each state, and then calculated the entire distribution of possible outcomes. I estimate that the likeliest range of possibilities, encompassing over two-thirds of scenarios, goes from Republicans gaining a net of two governorships to Democrats gaining four governorships. The median outcome is a net gain of one governorship by Democrats.

These polling margins are snapshots of a single moment in time. As fresh surveys come in, the picture may change, especially for near-tied races in which opinion seems to be on the move. In Massachusetts, enthusiasm for Democrat Martha Coakley has been tepid and her percentage of support has remained flat, while her Republican opponent, Charlie Baker, has gained gradually since summer. In Florida, Republican Governor Rick Scott is currently tied with former governor (and former Republican) Charlie Crist, but most of these surveys were taken before "fangate": In last week's debate, Scott declined to come on stage for around seven minutes because of Crist's use of a cooling fan. This diversion would be merely amusing if it had not diverted so much attention from issues like jobs and education. The next few surveys will reveal how it affects Scott's standing with Florida voters.

Looking at all the polling results together, I see two themes. First and foremost is a strong anti-incumbent sentiment. Ten incumbents are in danger of being turned out of office. For comparison, only eleven incumbent governors between 2004 and 2013 lost their re-election bids. As I wrote in August, a common theme in several races this year is poor economic performance. But with the economy now picking up steam and unemployment decreasing, one might have expected incumbents to recover. Another factor is the year-to-year election calendar: Many Republican governors last ran in 2010, a year that was extremely good for their party. Five out of eight vulnerable Republican governors are running in states won by President Obama in 2008 and 2012. The converse problem is faced by this year's incumbent Democratic senators, who serve six-year terms and were last elected in 2008.

The second unifying theme is that some Republican governors have gotten into trouble by sticking too closely to partisan principles. Nowhere is that more apparent than in their opposition to the Affordable Care Act. Of the eight endangered Republican governors, all but Rick Snyder of Michigan rejected or resisted implementation of the Affordable Care Act, including its Medicaid expansion. This stands in contrast to Republican governors in battleground or Democratic-leaning states including Susana Martinez of New Mexico, John Kasich of Ohio, and Brian Sandoval in Nevada, all of whom are sailing toward re-election. Kasich recently confirmed his support for Medicaid expansion while still expressing a desire to repeal other aspects of the Affordable Care Act. He is attempting to stand at a midpoint between his party's orthodoxy and a more pragmatic approach to governing, perhaps in preparation for a presidential run.

With nine gubernatorial races within two percentage points or less, this picture can change substantially with even a small shift in public opinion—or an unintentional overall bias in how pollsters measure opinion. On Election Night, we might see gains in either direction. But the fact that Democrats stand a chance of gaining in governorships ought to dampen the right's triumphalism at least a little bit.

Correction: A previous version of this article stated that New Jersey Governor Chris Christie was up for reelection; he was reelected last year. Also, the chart has been updated to reflect that a Democrat and independent are running on a fusion ticket in Alaska.