Thursday, July 4, 2019

Mapping diversity and taking probability and base rates into account

It's 4th of July, so let's celebrate diversity instead of tanksLazaro Gamio has written about his latest interactive visualization, a nice map of the United States showing where diversity has increased and decreased:
America is becoming more racially and ethnically diverse, on its way to becoming majority non-white in 2045 — but some parts of the country are changing more rapidly than the rest [...] Using Census data, we calculated a diversity index for every county in the United States going back to 2009. Each number represents the probability that two people chosen at random will be of a different race or ethnicity.
At first I was surprised at first that Miami-Dade county's diversity decreased a bit in the past decade, but then I realized it makes sense:
Miami-Dade County (49.9) is less diverse than the country as a whole, mainly because 70 percent of its population is Hispanic.
And what about this?
The counties seeing the greatest relative increase in racial and ethnic diversity are among the least diverse places in the country — particularly in the Midwest.
This may be a matter of probability. If a county's diversity is already very low, it's more likely that it'll increase a bit than it is that it'll decrease even further. The same may be true for the reverse situation: if a county's diversity is very high, it's more likely than not that it'll decrease in the future.

I also got curious about how much the index varies depending on population size. It may be that the largest and smallest changes happened in sparsely populated counties. If you have a county with 1,000 inhabitants and 100 of them are minorities, the probability of choosing a minority person at random is 10%. If 50 new minority people move in, the probability increases to 14% (150/1,050 = 0.14). But if those same 50 people moved to a county with 10,000 inhabitants, their impact on diversity wouldn't be that large.

The data Lazaro used is available, so you can play with it. Here are the results, excluding the three counties that had increases of more than 1,000%, Tucker, WV, Owsley, KY, and Hand, SD (see interactive version here):