In John Sayles’ 1984 movie The Brother From Another Planet, a card shark is riding a northbound A train that is about to make the 66-block jump from Midtown to Harlem. “I have another magic trick for you,” he says. “Wanna see me make all the white people disappear?” The conductor announces the train is going express, skipping the Upper West Side; white passengers disembark.

The joke is a bit outdated; a 40-year exodus of black Americans and the more recent influx of gentrifying whites put blacks in the minority in Greater Harlem a decade ago. But it speaks to a familiar truth about the way that even urbane, liberal whites think about black neighborhoods: as places not to go. In nearly every city, white yuppies have boundaries that can be invoked without further explanation: In Charleston, for years, it was north of Calhoun. In D.C., east of 16th. (Both those cities have gentrified too.)

Courtney Bonam used to hear a version of that in Chicago, where she taught psychology and African American studies at the University of Illinois, Chicago, before joining the University of California, Santa Cruz. “I’ve never heard anyone say, ‘I don’t want to live on the South Side because black people live there.’ But I’ve often heard people say, ‘I wouldn’t live south of Roosevelt or west of Western.’ That’s coded language and people feel just fine making comments like that.”

In a series of studies, Bonam has found that white Americans hold ironclad stereotypes about black neighborhoods—even when they display little or no animus toward black people. They’re likely to infer from the presence of a black family that a neighborhood is “impoverished, crime-ridden, and dirty,” though they make none of those assumptions about an identical white family in the same house. They’ll knock the value of a house down by $20,000, or nearly 15 percent, if they believe the neighborhood is black. Even after being explicitly told a neighborhood’s home prices and demographics, white participants showed a massive divergence in their perception of the neighborhood’s class depending on whether they thought it was black or white.

People who are ready to accept the middle-class status of a black person can’t do the same with a neighborhood.

Results like these jibe with previous research indicating prejudices toward black space. One study found that more black and Latino residents increase the perception of social disorder. Another showed that putting more black people in a neighborhood decreases the perception of its quality. The sociologist Sharon Zukin has used Yelp to contrast perceptions of black and white gentrifying neighborhoods in New York.

How do we know it’s not just that the observer is racist? In her most recent research, published with Caitlyn Yantis and Valerie Jones Taylor, Bonam compared white participants’ impressions of people and places. Participants were given profiles of houses with values or people with incomes and asked to assign each profile a class indicator from 1 to 7. When assigning class status to people, the participants gave virtually the same rankings to white and black profiles. (Low bar, I know.) But when assigning class status to houses, knowing the race of the neighborhood led to widely divergent outcomes. Most strikingly, white participants were almost incapable of assigning middle-class status to houses in black neighborhoods.

Bonam calls this phenomenon “invisible middle-class black space.” People who are ready to accept the middle-class status of a black person can’t do the same with a neighborhood.

It’s a stereotype that is unfortunately rooted in history. Black neighborhoods in the United States have long been deprived of equivalent public services while having substandard and sometimes hazardous housing. In midcentury American cities, as Tom Sugrue’s Origins of the Urban Crisis expertly documents, restrictive housing laws forced extreme overcrowding in black neighborhoods. Sometimes, black families in those areas both had higher incomes and paid higher rents than their white neighbors a few blocks over. But they were barred from moving out, and whites came to see overcrowded black neighborhoods as a self-fulfilling prophecy, justifying the segregation that had created them.

The “neighborhood gap” is still with us. Chris Rock jokes that his black neighbors are all world-famous celebrities, and his white neighbor is a dentist. “He isn’t like the greatest dentist in history either. I had to host the Oscars to get that house—a black dentist in my neighborhood would have to invent teeth.” In fact, across all income levels, blacks and Hispanics tend to live in less affluent neighborhoods than their income-equivalent white peers—and pay more for it.

So in part, whites may be making an inference from what they know and see represented. But the stereotype then leads them to instantly misjudge counterexamples. There are, of course, middle-class black neighborhoods in the United States, even if they don’t exist in the white imagination. The strength of black-space stereotypes in Bonam’s research suggests white people wouldn’t know one if they saw one.

This has real consequences. One of Bonam’s experiments from 2016, which she modeled after real-life situations, asks participants whether they approve of the siting of a potentially hazardous chemical plant. You can guess what happens: All else held equal, there’s more support for putting it in a black neighborhood. (The study controls for racial animus.)

There has been plenty of explicit racism in the construction of the American city, from highway projects to school sites to lending, and that legacy stays with us. But this subtler devaluation of black space, Bonam posits, happens every day and influences how people connect to and protect these places. That might mean people with formal, institutional responsibilities—like a mortgage specialist at a bank, or a firefighter, or a city planner—as well as others who might not think to re-examine their own perceptions, like a driver going too fast on a residential street.