How can Texas rank last in the nation — 51st — in the percentage of adults with high school diplomas, and simultaneously rank 22nd in the percentage attending at least some college?

The complicated answer involves more than the quality of the K-12 education system. The figures, based on the percentage of adults over 25 years old with various levels of education, come from a review of 2008 census bureau data by the Brookings Institution, which put data on education attainment from every state into this nifty web widget. It came as part of a larger study called the State of Metropolitan America, released in May (which includes some other interesting data on Texas cities).

In a ranking of the 50 states plus Washington, D.C. in educational attainment, Texas was all over the map: 51st in high school (79.6 percent); 22nd in some college (22.6 percent); 44th in associate’s degrees (6.3 percent); 31st in bachelor’s degrees (25.3 percent); and 36th in graduate degrees (8.3 percent). The leading factor driving down the state’s rankings has little to do with the quality of public schools and everything to do with the rapid rate of immigration, said Alan Berube, senior fellow and research director at Brookings, a left-leaning policy think-tank.

Many Mexican and Latin American immigrants “came to Texas as adults. They didn’t come there to finish high school. They came there to work. So that depresses the indicator,” Berube says. Further, the wide gap between high school and college attainment indicates a relatively large percentage of Texans who do complete high school go on to college, with many graduating, he says.

The same trends can be seen in California — the other huge state with rapid growth in immigration — with an even more severe spread between high school and college attainment. The sunshine state ranked 49th in high school attainment, yet 15th and 16th, respectively, in the percentage of adults with bachelor’s and graduate degrees.

In addition, the rankings can be deceiving because almost every state in the nation is clustered between 80 and 90 percent, so the state ranking last isn’t necessarily so far behind others ranking much higher. “But somebody’s got to be 51st,” Berube said, “and it turns out that’s Texas.”

At the same time, Houston, Austin and Dallas are three among only nine cities in America with the rare combination of fast growth, high levels of ethnic diversity and high educational attainment, Berube said. San Antonio, El Paso and McAllen, unfortunately, have the fast growth and diversity — but low educational attainment.

While some of the data should give policymakers concerns, none of it should be interpreted as solely a failure of the Texas education system, Berube said. Many Texas adults grew up elsewhere, and fast growth in Texas cities speaks for itself — people who live elsewhere want to move here. As for education levels, the real demographic shift will come when today’s second- and third-graders — who are Hispanic and low-income in higher percentages than today’s Texas teenagers — get into high school. In 2008, the Hispanic population represented 36 percent of all Texans, but 46 percent of births, according to the Pew Hispanic Center. The latest enrollment report from the Texas Education Agency, from the 2008-09 school year, shows that Hispanic students now account for 48 percent of public school enrollment — and 65 percent of pre-kindergarten enrollment.

How Texas public schools perform in educating these students — many from Spanish-speaking families without a history of high school and college graduation — largely will determine the future prosperity of the state. The current levels of educational attainment are “certainly something to be concerned about,” Berube said. “But the focus should be more properly on how the schools are doing with the children of these immigrants.”