placestats

Basic sanitation vs. Internet users

Holds up after adjusting for income

Across 195 countries, Basic sanitation and Internet users rise and fall together at r = +0.81 (on a scale from −1 to +1, where 0 means no link). Comparing only countries with similar income (GDP per person) shrinks it to +0.43 (q = 0.033, allowing for the many pairs tested). Much of the first figure is that both measures rise with national income, but a moderate positive link remains.

Comparing countries across the middle half of basic sanitation, 69.4% to 99% of population, internet users is better by 24.2% of population at the top of that range than the bottom. Comparing only countries with similar national income, the gap is 10.4% of population.

Link before adjusting (r)+0.808p = 2.6e-46 · 195 countries
After adjusting for national income+0.426p = 6.0e-10 · likely range [+0.30, +0.53]
p, allowing for regions0.002standard error 0.084 · 7 regions
Check for luck (q)0.033across 12,497 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.

Basic sanitation · % of populationlink with income +0.79 · high
Internet users · % of populationlink with income +0.85 · proxy

Both of these rise and fall closely with national income, so a strong link between them before adjusting was close to certain. Read the adjusted figure, not the first one.

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

Every country as a dot

Basic sanitation · % of population →Internet users · % of population →10.4%100%8.6%100%Aruba: 98.8% of population, 97.2% of populationAfghanistan: 54.5% of population, 16.1% of populationAngola: 50.3% of population, 40.7% of populationAlbania: 99.3% of population, 85.9% of populationAndorra: 100% of population, 94.4% of populationUnited Arab Emirates: 99.1% of population, 100% of populationArgentina: 94.8% of population, 89.7% of populationArmenia: 93.7% of population, 81.3% of populationAntigua and Barbuda: 99.6% of population, 72.7% of populationAustralia: 100% of population, 96.1% of populationAustria: 100% of population, 91.9% of populationAzerbaijan: 99% of population, 90.8% of populationBurundi: 44.6% of population, 8.6% of populationBelgium: 99.5% of population, 95.8% of populationBenin: 22.2% of population, 34% of populationBurkina Faso: 31.8% of population, 28.3% of populationBangladesh: 67.6% of population, 53.4% of populationBulgaria: 86.1% of population, 82.4% of populationBahrain: 100% of population, 100% of populationBahamas, The: 93.7% of population, 92.5% of populationBosnia and Herzegovina: 95.4% of population, 86.1% of populationBelarus: 99.7% of population, 94.3% of populationBelize: 84.3% of population, 80% of populationBermuda: 99.9% of population, 98.4% of populationBolivia: 71.6% of population, 79.7% of populationBrazil: 92.4% of population, 84.5% of populationBarbados: 98.1% of population, 70.4% of populationBrunei Darussalam: 100% of population, 96.3% of populationBhutan: 86.8% of population, 91.3% of populationBotswana: 72.1% of population, 57.5% of populationCentral African Republic: 14% of population, 13.8% of populationCanada: 98.6% of population, 94.4% of populationSwitzerland: 99.9% of population, 97.3% of populationChile: 100% of population, 95.6% of populationChina: 97.3% of population, 91.6% of populationCote d'Ivoire: 40.4% of population, 41.4% of populationCameroon: 47.1% of population, 46.3% of populationCongo, Dem. Rep.: 16.3% of population, 19.7% of populationCongo, Rep.: 20.6% of population, 47.3% of populationColombia: 96.6% of population, 79.3% of populationComoros: 57.2% of population, 32.5% of populationCabo Verde: 83.1% of population, 74.7% of populationCosta Rica: 98.8% of population, 87.2% of populationCuracao: 99.2% of population, 68.1% of populationCayman Islands: 83.2% of population, 81.1% of populationCyprus: 99.5% of population, 89.6% of populationCzechia: 99.1% of population, 87.7% of populationGermany: 99.2% of population, 93.5% of populationDjibouti: 67% of population, 65.3% of populationDominica: 80.4% of population, 82% of populationDenmark: 99.6% of population, 99.8% of populationDominican Republic: 90.1% of population, 91% of populationAlgeria: 85.9% of population, 77.4% of populationEcuador: 91.2% of population, 77.2% of populationEgypt, Arab Rep.: 97.1% of population, 74.6% of populationSpain: 99.9% of population, 95.8% of populationEstonia: 99% of population, 92.2% of populationEthiopia: 10.4% of population, 21.9% of populationFinland: 99.4% of population, 93.7% of populationFiji: 92.8% of population, 74.7% of populationFrance: 98.6% of population, 88.7% of populationFaroe Islands: 90.9% of population, 97.6% of populationMicronesia, Fed. Sts.: 90.5% of population, 39.5% of populationGabon: 57.4% of population, 68.7% of populationUnited Kingdom: 99.1% of population, 95.5% of populationGeorgia: 90.7% of population, 83.8% of populationGhana: 31.6% of population, 72.2% of populationGuinea: 32.6% of population, 33.3% of populationGambia, The: 48.2% of population, 49.5% of populationGuinea-Bissau: 28.9% of population, 29.8% of populationEquatorial Guinea: 66.3% of population, 63.3% of populationGreece: 99% of population, 86.3% of populationGrenada: 92.6% of population, 70.2% of populationGreenland: 62.5% of population, 69.5% of populationGuatemala: 71.2% of population, 60.2% of populationGuyana: 91.3% of population, 83% of populationHong Kong SAR, China: 94.8% of population, 95.8% of populationHonduras: 87.7% of population, 58.6% of populationCroatia: 95.8% of population, 83.6% of populationHaiti: 29.1% of population, 47.9% of populationHungary: 98% of population, 93.8% of populationIndonesia: 88.2% of population, 72.8% of populationIndia: 83.4% of population, 70% of populationIreland: 89.7% of population, 97.2% of populationIran, Islamic Rep.: 90.5% of population, 85.3% of populationIraq: 98.5% of population, 81.5% of populationIceland: 98.8% of population, 98.2% of populationIsrael: 99.9% of population, 88.2% of populationItaly: 99.9% of population, 89.2% of populationJamaica: 91.6% of population, 90.1% of populationJordan: 96.4% of population, 95.6% of populationJapan: 99.9% of population, 85.5% of populationKazakhstan: 97.9% of population, 93.4% of populationKenya: 40.9% of population, 35% of populationKyrgyz Republic: 98.5% of population, 92% of populationCambodia: 83.3% of population, 68.5% of populationKiribati: 45.2% of population, 89.4% of populationSt. Kitts and Nevis: 95% of population, 76.9% of populationKorea, Rep.: 99.7% of population, 97.9% of populationKuwait: 100% of population, 100% of populationLao PDR: 88.7% of population, 65.6% of populationLebanon: 99.2% of population, 80.6% of populationLiberia: 23.3% of population, 32.2% of populationLibya: 88.5% of population, 82% of populationSt. Lucia: 83.4% of population, 68.2% of populationSri Lanka: 95.4% of population, 54.6% of populationLesotho: 47.9% of population, 51.8% of populationLithuania: 96.4% of population, 89.2% of populationLuxembourg: 97.6% of population, 99.1% of populationLatvia: 92.5% of population, 92.7% of populationMacao SAR, China: 100% of population, 89.8% of populationMorocco: 87.8% of population, 91.2% of populationMoldova: 86.9% of population, 77.4% of populationMadagascar: 15.4% of population, 18.7% of populationMaldives: 99.7% of population, 85.2% of populationMexico: 93% of population, 83.1% of populationMarshall Islands: 79% of population, 65.9% of populationNorth Macedonia: 99% of population, 93.1% of populationMali: 47.8% of population, 36.8% of populationMalta: 100% of population, 93.9% of populationMyanmar: 74.2% of population, 45.4% of populationMontenegro: 97.8% of population, 88.9% of populationMongolia: 74.3% of population, 85.1% of populationMozambique: 38.6% of population, 20.5% of populationMauritania: 58.7% of population, 45.8% of populationMauritius: 97.4% of population, 73.3% of populationMalawi: 49.2% of population, 19% of populationMalaysia: 96% of population, 98% of populationNamibia: 38.7% of population, 64.9% of populationNiger: 16.3% of population, 15.6% of populationNigeria: 47.9% of population, 41.2% of populationNetherlands: 97.7% of population, 97% of populationNorway: 98% of population, 99% of populationNepal: 86% of population, 46.3% of populationNaoero: 71.3% of population, 83% of populationNew Zealand: 100% of population, 93.5% of populationOman: 99.3% of population, 95.3% of populationPakistan: 71.9% of population, 57.3% of populationPanama: 89.1% of population, 72.8% of populationPeru: 78.8% of population, 82% of populationPhilippines: 87.2% of population, 67.3% of populationPalau: 99% of population, 83.9% of populationPapua New Guinea: 23.6% of population, 18.8% of populationPoland: 99% of population, 88.6% of populationPuerto Rico (US): 100% of population, 87.3% of populationPortugal: 99.7% of population, 88.5% of populationParaguay: 95.9% of population, 81.6% of populationWest Bank and Gaza: 99.4% of population, 86.6% of populationQatar: 99.9% of population, 98.1% of populationRomania: 90.5% of population, 91.3% of populationRussian Federation: 92.2% of population, 94.4% of populationRwanda: 81.3% of population, 31.7% of populationSaudi Arabia: 97.6% of population, 100% of populationSudan: 65.7% of population, 18.6% of populationSenegal: 62.5% of population, 60.1% of populationSingapore: 100% of population, 94.4% of populationSolomon Islands: 34.6% of population, 29% of populationSierra Leone: 24.9% of population, 25.1% of populationEl Salvador: 88% of population, 66.5% of populationSan Marino: 100% of population, 97.4% of populationSomalia, Fed. Rep.: 44.5% of population, 27.9% of populationSerbia: 97.9% of population, 87.7% of populationSao Tome and Principe: 48.7% of population, 59.1% of populationSuriname: 90% of population, 87.4% of populationSlovak Republic: 97.5% of population, 89.8% of populationSlovenia: 98.3% of population, 90.8% of populationSweden: 98.7% of population, 95.8% of populationEswatini: 64.5% of population, 63.4% of populationSeychelles: 99.7% of population, 87.8% of populationSyrian Arab Republic: 95.6% of population, 33.8% of populationChad: 13.1% of population, 12.6% of populationTogo: 25.2% of population, 39.5% of populationThailand: 99.4% of population, 90.9% of populationTajikistan: 96% of population, 55.8% of populationTurkmenistan: 99.7% of population, 18% of populationTimor-Leste: 72.9% of population, 35% of populationTonga: 93.9% of population, 67.4% of populationTrinidad and Tobago: 94.2% of population, 82.2% of populationTunisia: 98.5% of population, 76.5% of populationTurkiye: 99.3% of population, 89.8% of populationTuvalu: 89.7% of population, 35.2% of populationTanzania: 37.2% of population, 31.2% of populationUganda: 23.9% of population, 8.95% of populationUkraine: 97.7% of population, 82.5% of populationUruguay: 99.2% of population, 92% of populationUnited States: 99.6% of population, 94.7% of populationUzbekistan: 96.5% of population, 89.5% of populationSt. Vincent and the Grenadines: 89.7% of population, 76.2% of populationVirgin Islands (U.S.): 99.3% of population, 64.4% of populationViet Nam: 95.4% of population, 84.2% of populationVanuatu: 47.8% of population, 22.4% of populationSamoa: 97.1% of population, 21.2% of populationSouth Africa: 77.4% of population, 78.4% of populationZambia: 37.5% of population, 17.1% of populationZimbabwe: 34.6% of population, 41.6% of populationBHRCAFCOGDNKGHAKIRKWTNERSYRTCDTKMWSM

best-fit line line after adjusting

Four ways to measure the link

MethodrpCountries
Standard (Pearson), not adjusted+0.8082.6e-46195
By rank (Spearman), not adjusted+0.7744.1e-40195
Standard (Pearson), adjusted for national income+0.4266.0e-10195
By rank (Spearman), adjusted for national income+0.3031.8e-5195

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 195 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.383 (a minus sign means it grew).

How solid is it?

Leaving out one country at a time, r ranges from +0.400 (without PSE) to +0.473 (without TKM). 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: TKM (+0.048).

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 & Pacific31+0.10
Europe & Central Asia52+0.27
Latin America & Caribbean35+0.32
Middle East, North Africa, Afghanistan & Pakistan22+0.48
Sub-Saharan Africa46+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 third65+0.31
Middle third65+0.22
Richest third65+0.53

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
Christians111+0.31
Muslims49+0.53

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
France25+0.46
Never a European colony21+0.25
Spain19+0.22
United Kingdom63+0.28

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.339 after dropping 12 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 25years. 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.020, 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 basic sanitation moved did not tend to see their internet users move with it.

Across countries (adjusted)+0.426for comparison
Within countries+0.558each country vs itself
…and vs the same year elsewhere-0.020q = 0.819 · 205 countries
Year-on-year changes-0.028q = 0.389
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.
  • Much of the within-country association disappears once shared global year effects are removed, which points to a common worldwide trend rather than a country-level relationship.

4,741 country-years (one country in one year), 205 countries, 2000–2024, about 23 years each on average. Share of the variation that happens within countries over time: 4% for Basic sanitation, 45% for Internet users. 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.50−0.5-100+10years Internet users trails Basic sanitation →lag -10: r = -0.453 (n = 4,179)lag -9: r = -0.443 (n = 4,181)lag -8: r = -0.424 (n = 4,341)lag -7: r = -0.401 (n = 4,480)lag -6: r = -0.365 (n = 4,594)lag -5: r = -0.327 (n = 4,690)lag -4: r = -0.281 (n = 4,746)lag -3: r = -0.226 (n = 4,757)lag -2: r = -0.159 (n = 4,759)lag -1: r = -0.089 (n = 4,754)lag +0: r = -0.020 (n = 4,741)lag +1: r = 0.031 (n = 4,571)lag +2: r = 0.074 (n = 4,387)lag +3: r = 0.110 (n = 4,198)lag +4: r = 0.146 (n = 4,008)lag +5: r = 0.182 (n = 3,810)lag +6: r = 0.215 (n = 3,619)lag +7: r = 0.243 (n = 3,421)lag +8: r = 0.267 (n = 3,219)lag +9: r = 0.288 (n = 3,021)lag +10: r = 0.306 (n = 2,819)

Same year (lag 0): -0.020. 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.

This curve peaks at the edge of the window (lag -10), so it is still drifting where the search stops. That pattern usually reflects a slow trend left over in the data, not a link with real timing. The peak value should not be read as the “true” link at the right lag.

The data


% of population

% of population
Years
San Marino SMR100%97.4%2024
Singapore SGP100%94.4%2024
Puerto Rico (US) PRI100%87.3%2024, 2022
New Zealand NZL100%93.5%2024
Malta MLT100%93.9%2024
Macao SAR, China MAC100%89.8%2024
Kuwait KWT100%100%2024, 2025
Brunei Darussalam BRN100%96.3%2024
Bahrain BHR100%100%2024
Australia AUS100%96.1%2024
Andorra AND100%94.4%2024
Chile CHL100%95.6%2024
Austria AUT100%91.9%2024, 2025
Japan JPN99.9%85.5%2024
Bermuda BMU99.9%98.4%2024, 2017

World Bank, World Development Indicators
World Bank, World Development Indicators

Sources

Basic sanitation

People using at least basic sanitation services (% of population)

World Bank · CC BY 4.0 · updated quarterly

Internet users

Individuals using the Internet (% of population)

International Telecommunication Union · CC BY 4.0 · updated quarterly

How this was computed

Data used: most recent value in 2010-2025; values come from 2014–2025. 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 12,497 pairs at once, using the Benjamini–Hochberg method. Underlying data last updated DYB 2024. How the country data works · explore Basic sanitation and Internet users

This page shows that two measures go together. It does not show that Basic sanitation changes Internet users, or the reverse. These figures also describe countries, not individual people. See the ecological fallacy.

More links with Basic sanitation or Internet users