Everyone has theories for why well-educated, higher-income professionals are moving back into parts of cities shunned by their parents’ generation.

Perhaps their living preferences have shifted. Or the demands of the labor market have, and young adults with less leisure time are loath to waste it commuting. Maybe the tendency to postpone marriage and children has made city living more alluring. Or the benefits of cities themselves have improved.

“There are all sorts of potential other amenities, whether it’s cafes, restaurants, bars, nicer parks, better schools,” said Ingrid Gould Ellen, a professor of urban policy and planning at New York University.

“But a huge piece of it,” she said, “I think is crime.”

New research that she has conducted alongside Keren Mertens Horn, an economist at the University of Massachusetts in Boston, and Davin Reed, a doctoral student at N.Y.U., finds that when violent crime falls sharply, wealthier and educated people are more likely to move into lower-income and predominantly minority urban neighborhoods.