Bloomberg's inaugural "Economic Diversity Index" shows Pennsylvania is a lot more than U.S. Steel Corp. and Hershey's chocolate. The variety within the nation's sixth-largest state economy puts it ahead of silver- and bronze-medalists Texas and Colorado.

Bloomberg analyzed the contribution to gross domestic product by industry and government in all 50 states to create the diversity index. It's modeled on the Herfindahl-Hirschman method, a mathematical measure used to detect monopoly in marketing and biodiversity in ecosystems. Theoretically, scores can range from 0 — representing maximum diversity — to 1, which signals single-industry domination. The lower the score, the more well-represented the sectoral GDP.

A diverse economy can help build resiliency against market fluctuations and trade vagaries, whether global or domestic. The index can be an indicator of which states — and their workers and government tax coffers — are best insulated from (or exposed to) sudden swings in a single industry, company or even aggregate demand.

Real estate was the largest GDP component in 20 states in 2018, with Hawaii's economy getting the highest proportion (21%) of its output from related activities. A decade earlier, the property sector was the top industry in just 10 states, reflecting volatility from the Great Recession.

"Big government" was the No. 1 component in eight states, topped by New Mexico (23%), whose overall 46th ranking underscores the benefits of a balanced economy. Excluding government contributions to GDP, Colorado would rank No. 1 in economic diversity, followed by Texas and Pennsylvania.

Resource-rich North Dakota ranked 5th overall, as the benefits of its mining industry had "spillover" effects throughout the state.

"Higher incomes increased demand across many sectors, though few had the sustained growth and expansion of extractive industries," said David Flynn, an economics professor at the University of North Dakota. Mining revenue has contracted 40% since its peak of $10 billion in 2014. North Dakota was the only state to see a decline in its median age this decade, from 37 years in 2010 to 35.2 in 2018.