Pedestrians brave the rain in the Chinatown neighborhood of Washington during September 2016. (Robert Miller/The Washington Post)

For decades, the data on median household incomes have shown the same, persistent racial disparities: Asians beating out whites at the top, while Hispanics and blacks hover near the bottom.

Asian Americans seem to offer proof that minorities can prosper — and even leapfrog whites — if they work hard and jump through the right hoops. For that reason, Asian Americans have often been invoked as a way to excuse the income gaps between whites and blacks or whites and Hispanics.

But why do typical Asian American households outearn typical white households? Like many statistics showing an Asian American advantage, this fact proves illusory upon closer examination. A common explanation is that Asian Americans are better educated. While that’s true, there’s another factor that can completely account for the income gap between Asians and whites.

It has to do with where people reside.

Prices and rents vary wildly in different parts of the country. The cost of living near Jonesboro, Ark., for instance, is about 18 percent below the national average, while the cost of living near San Francisco is about 21 percent above the national average.

White and African Americans are more likely to live in cheaper locales, while Asian and Hispanic Americans are more likely to live in pricier ones. The contrast between whites and Asians is particularly stark. Nearly 1 in 5 white Americans reside in rural counties, where a dollar goes a lot further. But 97 percent of Asian Americans live in or near a major city, where the cost of living is higher.

These histograms provide the full account of how different groups are distributed among the nation’s 381 major metro areas, which contain about 85 percent of Americans overall.

From left to right, the bars show the fraction of people who live in low-cost, average and high-cost parts of the country. The data on price levels come from the Bureau of Economic Analysis, which calculates local indexes based on surveys of rents and household purchases.

White Americans tend to live near less expensive metro areas, such as St. Louis or Cincinnati — both cities where prices are 10 percent below the national average. About one-third of white Americans live in a metro area with above-average costs; one-half live in metro areas with below-average costs; and the rest live in rural areas, where prices are lower still.

Asian Americans, largely for historical reasons, cluster near expensive coastal cities. More than 25 percent of Asian Americans live in one of the four metro areas with the highest costs of living — Honolulu, San Jose, New York and San Francisco. Overall, about 73 percent live in metro areas with above-average costs, 24 percent live in metro areas with below-average costs, and 3 percent live in rural areas.

When we factor in these geographic patterns, the racial income gaps start to look a little different. This chart shows median household incomes before and after adjusting for local costs of living.

What stands out is that the median Asian American income declines by more than 8 percent. The entire gap between Asian American and white households is erased by the cost-of-living calculation. So while Asian American households seem richer on paper, many of them don’t really feel richer because they live in places where the rent is high and the groceries are more expensive.

Other changes are less dramatic. White incomes rise a little, as do black incomes, but the black-white income gap doesn’t seem to move much. The median Hispanic household income declines by about 3 percent, but it remains neck and neck with the median black income.

There are a couple reasons we don’t often adjust for the cost of living when reporting economic statistics. For one, the process is a bit tricky. You need access to the underlying survey data showing where individuals live. And there’s still a lot of price variation within a single metro area. Living in Flushing in Queens — home to many Asian Americans in the New York City area — is much cheaper than living in SoHo. But the available data on local prices aren’t that fine-grained. So these calculations represent a rough approximation.

Furthermore, it’s unclear what the policy recommendations would be. Would it benefit Asian and Hispanic Americans to pack up for lower-cost cities? Maybe. But there are reasons that certain groups crowd into certain cities. Places like San Francisco and New York have been sites of Asian immigration going as far back as the 1800s. The ethnic networks that have taken root there make life easier in tangible and intangible ways, helping people find jobs, linking them to social services, and giving them a sense of community. Because of these social networks, many residents of these ethnic enclaves choose to stay despite the rising rents.

Even if there isn’t anything we can immediately do about the racial disparities in purchasing power, it’s important to recognize how this complicates the stereotype of Asian American success. There’s a long history of politicians wielding statistics about Asians against other minorities. The fact that Asian Americans outearn white Americans on average has often been used to deny claims that whites enjoy special advantages in America.

But Asian Americans have to work harder just to keep up with whites. If you compare whites and Asian Americans with the same amount of schooling, Asian Americans actually make less money. If Asian Americans seem prosperous — and many aren’t, by the way — that’s only because a much greater fraction of Asian Americans have advanced degrees.

And despite those educational advantages, it’s an open question whether Asian American incomes are higher than white incomes in any meaningful sense. As we’ve seen, a startling number of them live in places where a dollar just doesn’t stretch as far, where it’s costlier just to put a roof over your head.

Technical notes: I used data from the Census Bureau’s American Community Survey, which covers more than 3 million Americans living in more than 1 million households. For each of those million households, I adjusted the reported income according to the local cost of living. If the household lived in a metro area, I used the cost of living for that metro area. If the household lived outside of a metro area, I used the cost of living for non-metro regions in that state. Then I recalculated summary statistics using the new adjusted incomes. Household race/ethnicity is assigned according to the race/ethnicity of the household head. White, Asian and black categories are all single-race non-Hispanic.

Following Pew, all incomes are standardized to a household size of three. I used the square root scale, which both Pew and the OECD use to compare incomes across households. If you don’t adjust for household size, the income gap between white and Asian households is even greater because Asian households tend to be larger. Similarly, after adjusting for household size, the gap in median income between Hispanic and African American households more or less disappears because Hispanic households tend to be larger.