Over the last two decades, the science, technology, engineering, and mathematics teaching field has become much more female, slightly more diverse, and more qualified, a new analysis shows.

And these STEM teachers not more likely to leave their jobs than other teachers, according to the data—except when they teach in high-poverty schools.

In a new study published by the American Educational Research Association's open-access, peer-reviewed journal, researchers studied seven cycles of nationally representative data from the Schools and Staffing Survey to see how the demographic characteristics, qualifications, and turnover rates of public school STEM teachers have changed from 1988 to 2012, the most recent year for available data.

Perhaps most notably, the percentage of female STEM teachers has dramatically increased from 43 percent in 1988 to 64 percent in 2012.

And while STEM teachers are still mostly white, racial diversity in the field has slightly improved: In 1988, just 2 percent of STEM teachers identified as Hispanic—that increased to 6 percent in 2012. And the percentage of Asian STEM teachers increased from 1 to 3 percent over the same time period. But the percentage of black STEM teachers barely budged, standing at 6 percent in 2012.

"The literature suggests that teachers not only support their students' cognitive development and their learning, but also shape their motivations [and] aspirations," said Tuan Nguyen, a research assistant professor in the College of Education at Kansas State University, and one of the report's authors.

To that end, he said, the increase in the percentage of female STEM teachers is positive for students, especially girls. Research shows that when female students have a female teacher, their self-confidence and test performance can improve.

It's also important for nonwhite students to have nonwhite teachers, Nguyen said. "The research community recognizes we need to bring more minority STEM teachers into classrooms," he added.

A STEM teacher is still more likely to be a white man than the average teacher—national data show that 77 percent of all teachers are women, 9 percent are Hispanic, 7 percent are black, and 2 percent are Asian.

Chart: Changes in STEM Teacher Demographics Over Time

STEM teachers today are also more likely to have attended a selective college, have a graduate degree, and have majored or been certified in a STEM field. (This is not true for everyone: Some policy observers point out that STEM teachers, particularly those who teach middle and elementary grades, are not always well-versed in the rigorous content in their field.)

Still, the analysis shows that STEM teachers who work in high-poverty schools are consistently less likely to have an advanced degree, have attended one of the most selective colleges, or have a STEM qualification. They're also more likely to be in their first three years of teaching. (This is in line with the national data on all teachers.)

"The gap between high- and low-poverty schools is persisting," Nguyen said.

High-poverty schools are also losing STEM teachers more frequently: In 2012, 9 percent of STEM teachers left their high-poverty schools, compared to the 5 percent who left low-poverty schools. And 10 percent of STEM teachers left teaching altogether after working in high-poverty schools, compared to the 7 percent who quit after working in low-poverty schools.

"That is disconcerting for a variety of reasons," Nguyen said. "Those are the high-needs schools most in need of quality teachers."

STEM is one of the perennial shortage areas in which districts struggle finding teachers, and there have been many efforts to recruit and retain STEM teachers in high-needs schools. Nguyen said he hopes future research will look at the efficacy of those programs.

Image via Getty; chart via AERA Open

More on Recruiting and Retaining STEM Teachers:

Interested in STEM education? Register for Education Week's free online event to hear from experts how states, districts, and schools can overcome the obstacles that prevent more students from succeeding in STEM as they progress through school.