Nati Harnik/The Associated Press Pipes are stacked for an oil line that will stretch from North Dakota to Illinois. Economists say capital-intensive industries such as oil extraction have contributed to a gap between economic growth and median household income in states such as North Dakota.

Economic growth outpaced any gains in median household income in every state from 2000 to 2013, a new Stateline analysis shows.

The divergence between middle-class income growth and general economic growth has been a topic of debate among economists for years. But the new analysis—which uses state gross domestic product per person as a measure of economic growth and income data through 2013, the most recent available—reveals significant differences between states that often reflect their differing economies.

The state-level look shows that some of the biggest gaps are in prospering energy states like North Dakota and Wyoming. Rounding out the list of states with the biggest gaps were Alaska, Louisiana and Nebraska. The states with the smallest gaps were Arizona, Colorado, Delaware, Idaho and Nevada. The District of Columbia was the only place where median household income outpaced GDP, 24.5 to 20.4 percent.

So where did the growth in wealth go? Why are middle-class incomes stagnant, and why is the middle class shrinking, if there is more economic output as measured per person? And what explains those differences between the states?

Many economists point to growing income inequality. According to economist Lane Kenworthy of the University of California at San Diego, as the top 1 percent of income earners have gotten a larger portion of the country’s overall wealth,“household income growth for the middle has become decoupled from economic growth.”

Mark Frank, a professor at Sam Houston State University in Texas who studies income inequality at the state level, said top earners often make their states more prosperous.

“It kind of goes in lockstep—in the states that are doing well, the top 1 percent is doing really, really well. They move together,” Frank said. “The question is, how do you get that down to the bottom 90 percent or the median?”

In some states like North Dakota, the gap between economic growth and income is wider, despite overall prosperity, in part because of the huge upfront investments in equipment required to extract oil and gas shale, economists say. Those capital-intensive investments can boost a state’s economy, but they don’t necessarily go into workers’ pockets.

“The energy boom has been a boon for North Dakota and other states’ overall output, but even in these states, median income growth hasn’t come close to per capita output growth,” said David Cooper, an analyst at the Economic Policy Institute (EPI).

North Dakota ranked first in the U.S. for state GDP growth and income growth between 2000 and 2013, but nevertheless has the largest gap: economic growth was 86.1 percent, with median household income growing 19.1 percent. (It is too soon to gauge the full effect of the sharp drop in world oil prices that began in the fall of 2014.) Many other energy boom states, including Alaska, Louisiana, Oklahoma, Texas and Wyoming, also have large gaps.

Agricultural states Kansas and Iowa also had large gaps. Because of the increased use of ethanol, grain prices followed oil prices to historic highs, according to the United Nations, before starting to fall last year. Grain farming has also become more automated in the last half-century, meaning larger investments in equipment and fewer workers.

Robert Gordon, an economist at Northwestern University, offers other possible explanations for why median household income growth has been decoupled from broader economic growth. One reason is that machines are doing more work once done by people, leading to fewer total hours of labor. Another reason, according to Gordon, is that the effect of women entering the workplace has worn off.

“The standard of living can grow faster than labor productivity when there is an increase in hours per capita, and this happened between 1965 and 1990 as females entered the labor force,” Gordon wrote.

At the other end, Maryland and Virginia had relatively small gaps, as did Massachusetts. Those states and D.C. have “knowledge-based” economies, which have grown for very different reasons than the energy states, but have shared the spotlight for their recent income gains. Their workforces are among the most highly educated, and that can help workers command better pay.

In a 2013 report, EPI found that knowledge-based economies as in the D.C. area and in Massachusetts could prosper through a well-educated workforce.

But in other places, such as Arizona, Idaho and Nevada, the small gap between state GDP growth and the change in median household income indicates declining economic activity.

“I suspect there are different reasons for different states on the small gaps,” said Cooper, the EPI analyst. “For the shrinking economies, I think one could just make the argument that when things are bad, the median household suffers commensurate with the larger trends, hence a small gap.”