placestats

Ethnic diversity vs. Slum share of urban population

Holds up after adjusting for income

Across 147 countries, Ethnic diversity and Slum share of urban population rise and fall together at r = +0.50 (on a scale from −1 to +1, where 0 means no link). It holds up almost unchanged when only countries with similar income (GDP per person) are compared (r = +0.37, q = 0.027, allowing for the many pairs tested). Caution: direction is not consistent across regions.

Comparing countries across the middle half of ethnic diversity, 0.236 to 0.702 points, slum share of urban population is worse by 23.3% of urban population at the top of that range than the bottom. Comparing only countries with similar national income, the gap is 11.3% of urban population.

Link before adjusting (r)+0.497p = 1.6e-10 · 147 countries
After adjusting for national income+0.369p = 4.6e-6 · likely range [+0.22, +0.50]
p, allowing for regions0.002standard error 0.069 · 7 regions
Check for luck (q)0.027across 13,797 pairs

How to read these.r runs from −1 (one goes up as the other goes down) to +1 (they rise together), and 0 means no link. Adjusting for national income means comparing countries with the same GDP per person, so differences in wealth can’t explain the link. Income is used in percentage terms, since an extra $1,000 means more to a poor country than to a rich one. p is how likely a link this strong would be if there were really none. Below 0.05 means it is unlikely to be chance. Very small values are written in short form: 1.1e-32 means a decimal point followed by 31 zeros and then 11, so very close to zero. The likely range is where the true figure probably lies, and a range that crosses zero means the link could easily be chance. Countries in the same region tend to resemble each other, so the third figure allows for that, which gives a fairer p. The standard error is the typical size of the error in r. Finally, testing this many pairs means some will look strong by luck alone. A q below 0.05 means this link is unlikely to be one of those.

Ethnic diversity · index, 0 to 1link with income -0.37 · moderate
Slum share of urban population · % of urban populationlink with income -0.78 · high

“Link with income” is how closely each measure tracks GDP per person across countries, from −1 to +1.

Every country as a dot

Ethnic diversity · index, 0 to 1 →Slum share of urban population · % of urban population →0.0190.8890%92.5%Afghanistan: 0.763 index, 0 to 1, 71.6% of urban populationAngola: 0.779 index, 0 to 1, 62.7% of urban populationAlbania: 0.139 index, 0 to 1, 2.7% of urban populationUnited Arab Emirates: 0.684 index, 0 to 1, 0.113% of urban populationArgentina: 0.158 index, 0 to 1, 14.5% of urban populationArmenia: 0.045 index, 0 to 1, 8.39% of urban populationAustralia: 0.276 index, 0 to 1, 0.035% of urban populationAustria: 0.248 index, 0 to 1, 0.0466% of urban populationAzerbaijan: 0.122 index, 0 to 1, 26.9% of urban populationBurundi: 0.308 index, 0 to 1, 36.8% of urban populationBelgium: 0.592 index, 0 to 1, 0% of urban populationBenin: 0.764 index, 0 to 1, 64% of urban populationBurkina Faso: 0.767 index, 0 to 1, 87.9% of urban populationBangladesh: 0.025 index, 0 to 1, 51.5% of urban populationBulgaria: 0.289 index, 0 to 1, 0.197% of urban populationBahrain: 0.582 index, 0 to 1, 0% of urban populationBosnia and Herzegovina: 0.637 index, 0 to 1, 0.313% of urban populationBelarus: 0.309 index, 0 to 1, 0.004% of urban populationBolivia: 0.572 index, 0 to 1, 46.6% of urban populationBrazil: 0.559 index, 0 to 1, 14.9% of urban populationBhutan: 0.651 index, 0 to 1, 44.7% of urban populationBotswana: 0.395 index, 0 to 1, 39.6% of urban populationCentral African Republic: 0.79 index, 0 to 1, 68.9% of urban populationCanada: 0.73 index, 0 to 1, 1.1% of urban populationSwitzerland: 0.367 index, 0 to 1, 0% of urban populationChile: 0.439 index, 0 to 1, 7.32% of urban populationChina: 0.19 index, 0 to 1, 26.3% of urban populationCote d'Ivoire: 0.731 index, 0 to 1, 48.3% of urban populationCongo, Dem. Rep.: 0.7 index, 0 to 1, 78.4% of urban populationCongo, Rep.: 0.704 index, 0 to 1, 75.3% of urban populationColombia: 0.639 index, 0 to 1, 9.7% of urban populationComoros: 0.054 index, 0 to 1, 48.5% of urban populationCabo Verde: 0.442 index, 0 to 1, 46.4% of urban populationCosta Rica: 0.398 index, 0 to 1, 3.55% of urban populationCyprus: 0.347 index, 0 to 1, 0.272% of urban populationCzechia: 0.262 index, 0 to 1, 0.0273% of urban populationDjibouti: 0.649 index, 0 to 1, 48.7% of urban populationDenmark: 0.177 index, 0 to 1, 0% of urban populationDominican Republic: 0.453 index, 0 to 1, 11.2% of urban populationAlgeria: 0.372 index, 0 to 1, 13.2% of urban populationEcuador: 0.528 index, 0 to 1, 57.8% of urban populationEgypt, Arab Rep.: 0.041 index, 0 to 1, 3.84% of urban populationSpain: 0.669 index, 0 to 1, 0.046% of urban populationEstonia: 0.458 index, 0 to 1, 0.345% of urban populationEthiopia: 0.783 index, 0 to 1, 64.3% of urban populationFinland: 0.138 index, 0 to 1, 0% of urban populationFiji: 0.528 index, 0 to 1, 9.4% of urban populationGabon: 0.789 index, 0 to 1, 38.8% of urban populationUnited Kingdom: 0.399 index, 0 to 1, 0.163% of urban populationGeorgia: 0.367 index, 0 to 1, 7.08% of urban populationGhana: 0.736 index, 0 to 1, 33.5% of urban populationGuinea: 0.727 index, 0 to 1, 44% of urban populationGambia, The: 0.762 index, 0 to 1, 37.1% of urban populationGuinea-Bissau: 0.808 index, 0 to 1, 59% of urban populationGreece: 0.167 index, 0 to 1, 0.05% of urban populationGuatemala: 0.511 index, 0 to 1, 37.6% of urban populationGuyana: 0.695 index, 0 to 1, 11.3% of urban populationHonduras: 0.229 index, 0 to 1, 31.5% of urban populationCroatia: 0.171 index, 0 to 1, 0.527% of urban populationHaiti: 0.105 index, 0 to 1, 51.1% of urban populationHungary: 0.232 index, 0 to 1, 7.2% of urban populationIndonesia: 0.803 index, 0 to 1, 19.4% of urban populationIreland: 0.174 index, 0 to 1, 8.5% of urban populationIran, Islamic Rep.: 0.743 index, 0 to 1, 44.7% of urban populationIraq: 0.446 index, 0 to 1, 49.3% of urban populationItaly: 0.11 index, 0 to 1, 0.02% of urban populationJamaica: 0.21 index, 0 to 1, 0.883% of urban populationJordan: 0.044 index, 0 to 1, 23.4% of urban populationJapan: 0.019 index, 0 to 1, 2% of urban populationKazakhstan: 0.538 index, 0 to 1, 0.794% of urban populationKenya: 0.855 index, 0 to 1, 40.5% of urban populationKyrgyz Republic: 0.487 index, 0 to 1, 2.44% of urban populationCambodia: 0.158 index, 0 to 1, 42.3% of urban populationKorea, Rep.: 0.095 index, 0 to 1, 4.5% of urban populationKuwait: 0.765 index, 0 to 1, 0% of urban populationLao PDR: 0.634 index, 0 to 1, 54.8% of urban populationLebanon: 0.133 index, 0 to 1, 4.53% of urban populationLiberia: 0.889 index, 0 to 1, 60.5% of urban populationLibya: 0.259 index, 0 to 1, 16.6% of urban populationSri Lanka: 0.323 index, 0 to 1, 44.7% of urban populationLesotho: 0.313 index, 0 to 1, 25.6% of urban populationLithuania: 0.284 index, 0 to 1, 0.509% of urban populationLatvia: 0.547 index, 0 to 1, 0.593% of urban populationMorocco: 0.566 index, 0 to 1, 10.9% of urban populationMoldova: 0.427 index, 0 to 1, 6.5% of urban populationMadagascar: 0.194 index, 0 to 1, 65.7% of urban populationMexico: 0.587 index, 0 to 1, 17.6% of urban populationNorth Macedonia: 0.562 index, 0 to 1, 0.278% of urban populationMali: 0.852 index, 0 to 1, 92.5% of urban populationMyanmar: 0.59 index, 0 to 1, 58.3% of urban populationMongolia: 0.315 index, 0 to 1, 17.9% of urban populationMauritania: 0.713 index, 0 to 1, 58.6% of urban populationMauritius: 0.466 index, 0 to 1, 48.7% of urban populationMalawi: 0.791 index, 0 to 1, 38% of urban populationMalaysia: 0.57 index, 0 to 1, 0.2% of urban populationNamibia: 0.76 index, 0 to 1, 41.4% of urban populationNiger: 0.666 index, 0 to 1, 70.4% of urban populationNigeria: 0.85 index, 0 to 1, 48.5% of urban populationNicaragua: 0.544 index, 0 to 1, 5.52% of urban populationNetherlands: 0.354 index, 0 to 1, 0% of urban populationNorway: 0.151 index, 0 to 1, 0% of urban populationNepal: 0.86 index, 0 to 1, 40.1% of urban populationNew Zealand: 0.485 index, 0 to 1, 0% of urban populationOman: 0.597 index, 0 to 1, 0% of urban populationPakistan: 0.748 index, 0 to 1, 56% of urban populationPanama: 0.612 index, 0 to 1, 16.3% of urban populationPeru: 0.618 index, 0 to 1, 45.1% of urban populationPhilippines: 0.807 index, 0 to 1, 35.9% of urban populationPoland: 0.069 index, 0 to 1, 4.22% of urban populationPortugal: 0.22 index, 0 to 1, 0.059% of urban populationParaguay: 0.179 index, 0 to 1, 15.1% of urban populationQatar: 0.708 index, 0 to 1, 0% of urban populationRomania: 0.207 index, 0 to 1, 2.52% of urban populationRussian Federation: 0.376 index, 0 to 1, 2.62% of urban populationRwanda: 0.28 index, 0 to 1, 38.3% of urban populationSaudi Arabia: 0.224 index, 0 to 1, 0.55% of urban populationSudan: 0.746 index, 0 to 1, 73.7% of urban populationSenegal: 0.747 index, 0 to 1, 46.4% of urban populationSingapore: 0.395 index, 0 to 1, 0% of urban populationSolomon Islands: 0.097 index, 0 to 1, 1.95% of urban populationSierra Leone: 0.801 index, 0 to 1, 49.3% of urban populationEl Salvador: 0.165 index, 0 to 1, 16.5% of urban populationSomalia, Fed. Rep.: 0.222 index, 0 to 1, 48.7% of urban populationSerbia: 0.396 index, 0 to 1, 1.42% of urban populationSlovak Republic: 0.241 index, 0 to 1, 0.066% of urban populationSlovenia: 0.258 index, 0 to 1, 0.527% of urban populationSweden: 0.219 index, 0 to 1, 0.336% of urban populationEswatini: 0.39 index, 0 to 1, 17% of urban populationSyrian Arab Republic: 0.213 index, 0 to 1, 41.1% of urban populationChad: 0.855 index, 0 to 1, 82% of urban populationTogo: 0.88 index, 0 to 1, 38.5% of urban populationThailand: 0.352 index, 0 to 1, 2% of urban populationTajikistan: 0.367 index, 0 to 1, 0.05% of urban populationTurkmenistan: 0.255 index, 0 to 1, 8.38% of urban populationTimor-Leste: 0.802 index, 0 to 1, 33.9% of urban populationTrinidad and Tobago: 0.655 index, 0 to 1, 8.63% of urban populationTunisia: 0.034 index, 0 to 1, 7.64% of urban populationTurkiye: 0.521 index, 0 to 1, 14.1% of urban populationTanzania: 0.591 index, 0 to 1, 70.1% of urban populationUganda: 0.883 index, 0 to 1, 52.7% of urban populationUkraine: 0.37 index, 0 to 1, 1.1% of urban populationUruguay: 0.176 index, 0 to 1, 1.3% of urban populationUnited States: 0.527 index, 0 to 1, 0.0932% of urban populationUzbekistan: 0.313 index, 0 to 1, 7.1% of urban populationSouth Africa: 0.856 index, 0 to 1, 24.2% of urban populationZambia: 0.706 index, 0 to 1, 48.3% of urban populationZimbabwe: 0.415 index, 0 to 1, 54.9% of urban populationBFABGDCANCOMEGYJPNKWTMDGMLIQATTCDTUN

best-fit line line after adjusting

Four ways to measure the link

MethodrpCountries
Standard (Pearson), not adjusted+0.4971.6e-10147
By rank (Spearman), not adjusted+0.4305.3e-8147
Standard (Pearson), adjusted for national income+0.3694.6e-6147
By rank (Spearman), adjusted for national income+0.2380.004147

The rank version uses only each country’s place in line, from lowest to highest, so a few extreme countries count for less. The adjusted and unadjusted versions use the same 147 countries: those that report both measures and GDP per person. So the gap between them comes from the adjustment, not from a change in which countries are counted. Drop in the size of r after adjusting: +0.128 (a minus sign means it grew).

How solid is it?

Leaving out one country at a time, r ranges from +0.336 (without SLB) to +0.393 (without BGD). The bar above shows that range on a scale from −1 to +1, with the solid line at the full result. The single country that moves r most: SLB (-0.033).

Fragile: this link may not hold up.
  • direction is not consistent across regions

Within each region

Countries are not separate, unrelated cases, and neighbors share a lot. A link that holds inside each region is far more believable than one that shows up only when comparing regions.

nr
East Asia & Pacific17+0.33
Europe & Central Asia43-0.25
Latin America & Caribbean21+0.37
Middle East, North Africa, Afghanistan & Pakistan19+0.64
Sub-Saharan Africa41+0.30

By income third

If the link shows up only in the richest third of countries, it is a feature of rich countries, not a general pattern.

nr
Poorest third49+0.39
Middle third49+0.40
Richest third49+0.16

By largest religious group

Countries grouped by a label they share, such as main religion, rather than by a number. Groups of fewer than twelve countries are not shown. These groups differ in income, region and history all at once. So a gap between them is a place to start asking questions, not an answer.

nr
Christians84+0.39
Muslims46+0.44

By last european coloniser

Countries grouped by a label they share, such as main religion, rather than by a number. Groups of fewer than twelve countries are not shown. These groups differ in income, region and history all at once. So a gap between them is a place to start asking questions, not an answer.

nr
France23+0.60
Never a European colony21+0.34
Spain18+0.31
United Kingdom43+0.29

Without outliers (countries far outside the middle half of countries on either measure, by more than one and a half times the width of that middle half): r = +0.369 after dropping 0 countries.

Two series, one country

Both measures over the years for one country you pick. The two charts are stacked so they share only the years along the bottom.

Loading…

Over time, within countries

Everything above compares countries with each other at one moment. This section compares each country only with itself over 13years. So a link here can’t come from anything about a country that stays the same, such as its history, geography, institutions or culture.

Within countries over time, there is no link that is clearly more than chance (r = +0.082, comparing each country only with itself over the years, and each year only with the same year elsewhere). Whatever the cross-country picture shows, countries whose ethnic diversity moved did not tend to see their slum share of urban population move with it.

Across countries (adjusted)+0.369for comparison
Within countries+0.002each country vs itself
…and vs the same year elsewhere+0.082q = 0.298 · 129 countries
Year-on-year changes—q = —
Read with care.
  • Almost all of this indicator's variation is between countries, not within them, so the within-country estimate rests on a small part of the data.

896 country-years (one country in one year), 129 countries, 2000–2012, about 7 years each on average. Share of the variation that happens within countries over time: 0% for Ethnic diversity, 5% for Slum share of urban population. The margins of error allow for each country appearing many times, and for each year’s value being close to the year before.

Year-to-year changes are a cautious test, not a final answer. Looking only at changes from one year to the next removes each country’s own trends. But it also makes measurement mistakes louder, which pulls the results toward zero. A near-zero result here is weak evidence of no link, not proof.

With one measure years behind the other

0.10−0.1-50+10years Slum share of urban population trails Ethnic diversity →lag -5: r = 0.083 (n = 625)lag -4: r = 0.082 (n = 625)lag -3: r = 0.089 (n = 764)lag -2: r = 0.089 (n = 764)lag -1: r = 0.084 (n = 896)lag +0: r = 0.082 (n = 896)lag +1: r = 0.078 (n = 1,037)lag +2: r = 0.075 (n = 1,037)lag +3: r = 0.075 (n = 1,169)lag +4: r = 0.072 (n = 1,169)lag +5: r = 0.073 (n = 1,299)lag +6: r = 0.070 (n = 1,299)lag +7: r = 0.072 (n = 1,426)lag +8: r = 0.071 (n = 1,423)lag +9: r = 0.063 (n = 1,564)lag +10: r = 0.062 (n = 1,545)

Same year (lag 0): +0.082. A peak away from zero does not show which comes first. These series change slowly — this year’s value is close to last year’s. That makes the curve smooth and nearly symmetric, whatever produced the data. Even a sharp peak at one lag (a gap of some years) would not prove that one measure changes the other.

The data


index, 0 to 1

% of urban population
Years
Liberia LBR0.88960.5%2013, 2022
Uganda UGA0.88352.7%2013, 2022
Togo TGO0.8838.5%2013, 2022
Nepal NPL0.8640.1%2013, 2022
South Africa ZAF0.85624.2%2013, 2022
Chad TCD0.85582%2013, 2022
Kenya KEN0.85540.5%2013, 2022
Mali MLI0.85292.5%2013, 2022
Nigeria NGA0.8548.5%2013, 2022
Guinea-Bissau GNB0.80859%2013, 2022
Philippines PHL0.80735.9%2013, 2022
Indonesia IDN0.80319.4%2013, 2022
Timor-Leste TLS0.80233.9%2013, 2022
Sierra Leone SLE0.80149.3%2013, 2022
Malawi MWI0.79138%2013, 2022

Drazanova, L. (2019), Historical Index of Ethnic Fractionalization Dataset (HIEF), Harvard Dataverse, doi:10.7910/DVN/4JQRCL
World Bank, World Development Indicators

Sources

Ethnic diversity

Ethnic fractionalization index

Lenka Drazanova · CC0 1.0 · updated one edition (2019), annual values 1945-2013

The chance that two people picked at random in a country belong to different ethnic groups, from 0 (everyone in one group) to close to 1 (many small groups). It measures how mixed a country is, not which groups live there. The groups are those each country's own sources use, so where the lines are drawn differs from country to country. Yearly from 1945 to 2013, so the latest value is from 2013. No "better" direction is set.

Slum share of urban population

Population living in slums (% of urban population)

UN-Habitat · CC BY 4.0 · updated quarterly

How this was computed

Data used: most recent value in 2010-2025; values come from 2012–2022. To adjust for income, each measure is first predicted from GDP per person (in percentage terms, on a log scale) with a straight-line fit. Only what is left over is then compared. This is called a partial correlation. The line is drawn the standard way (ordinary least squares), which picks the line that comes closest to all the countries at once. The error margins allow for countries in the same region resembling each other, using 7 World Bank regions. The q-value corrects for testing all 13,797 pairs at once, using the Benjamini–Hochberg method. Underlying data last updated DYB 2024. How the country data works · explore Ethnic diversity and Slum share of urban population

This page shows that two measures go together. It does not show that Ethnic diversity changes Slum share of urban population, or the reverse. These figures also describe countries, not individual people. See the ecological fallacy.

More links with Ethnic diversity or Slum share of urban population