Many of the nation’s racial disparities stem from the simple economic fact that white families make more money than black families on average, a gap that has remained stubbornly large in recent decades.

Yet neither this income gap nor blatant discrimination is the only reason for the disparities. A new study, by three Stanford researchers, highlights another big cause: the neighborhood gap.

Even among white and black families with similar incomes, white families are much more likely to live in good neighborhoods — with high-quality schools, day-care options, parks, playgrounds and transportation options. The study comes to this conclusion by mining census data and uncovering a striking pattern: White (and Asian-American) middle-income families tend to live in middle-income neighborhoods. Black middle-income families tend to live in distinctly lower-income ones.

Most strikingly, the typical middle-income black family lives in a neighborhood with lower incomes than the typical low-income white family.