Across 197 countries, Basic sanitation and Population 65+ rise and fall together at r = +0.63 (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.13, which could easily be chance (q = 0.35, allowing for the many pairs tested, and allowing for countries in the same region being alike). So the first figure mostly shows richer countries differing from poorer ones, not a link between these two things.
Comparing countries across the middle half of population 65+, 4.02% to 17.1% of population, basic sanitation is better by 28.7% of population at the top of that range than the bottom. Comparing only countries with similar national income, the gap is 5.29% of population.
Link before adjusting (r)+0.625p = 8.9e-23 · 197 countries
After adjusting for national income+0.126p = 0.078 · likely range [-0.01, +0.26]
p, allowing for regions0.009standard error 0.033 · 7 regions
Check for luck (q)0.345across 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
Population 65+ · % of populationlink with income +0.76 · high
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
best-fit line line after adjusting
Four ways to measure the link
Method
r
p
Countries
Standard (Pearson), not adjusted
+0.625
8.9e-23
197
By rank (Spearman), not adjusted
+0.691
2.8e-29
197
Standard (Pearson), adjusted for national income
+0.126
0.078
197
By rank (Spearman), adjusted for national income
+0.228
0.001
197
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 197 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.499 (a minus sign means it grew).
How solid is it?
Leaving out one country at a time, r ranges from +0.113 (without GRL) to +0.136 (without IRQ). 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: GRL (-0.014).
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.
n
r
East Asia & Pacific
31
+0.11
Europe & Central Asia
52
+0.22
Latin America & Caribbean
37
+0.30
Middle East, North Africa, Afghanistan & Pakistan
22
+0.14
Sub-Saharan Africa
46
+0.47
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.
n
r
Poorest third
66
+0.58
Middle third
65
+0.33
Richest third
66
+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.
n
r
Christians
111
+0.20
Muslims
49
+0.31
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.
n
r
France
25
+0.61
Never a European colony
21
-0.02
Spain
19
+0.67
United Kingdom
63
+0.25
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.188 after dropping 15 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.
The link also shows up within countries over time (r = -0.330). It holds even when looking only at changes from one year to the next (r = -0.238). This is the strongest kind of evidence available here: it holds when each country is compared only with itself, and it is not just a product of shared trends.
Across countries (adjusted)+0.126for comparison
Within countries+0.237each country vs itself
…and vs the same year elsewhere-0.330q = 0.000 · 214 countries
Year-on-year changes-0.238q = 0.001
The direction flips. Comparing each country only with itself gives +0.24. Also taking out what happened to the whole world each year gives -0.33. So the first figure was picking up a trend both measures share with worldwide progress, not a link between them.
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.
5,166 country-years (one country in one year), 214 countries, 2000–2024, about 24 years each on average. Share of the variation that happens within countries over time: 6% for Basic sanitation, 4% for Population 65+. 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
Same year (lag 0): -0.330. 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
% of population
% of population
Years
San Marino SMR
100%
23.1%
2024, 2025
Singapore SGP
100%
14.2%
2024, 2025
Puerto Rico (US) PRI
100%
25.3%
2024, 2025
New Zealand NZL
100%
17.6%
2024, 2025
Malta MLT
100%
20.5%
2024, 2025
Macao SAR, China MAC
100%
15.1%
2024, 2025
Kuwait KWT
100%
3.17%
2024, 2025
Brunei Darussalam BRN
100%
7.24%
2024, 2025
Bahrain BHR
100%
4.02%
2024, 2025
Australia AUS
100%
18.1%
2024, 2025
Andorra AND
100%
16.6%
2024, 2025
Chile CHL
100%
14.6%
2024, 2025
Austria AUT
100%
21.1%
2024, 2025
Japan JPN
99.9%
30%
2024, 2025
Bermuda BMU
99.9%
22.6%
2024, 2025
World Bank, World Development Indicators World Bank, World Development Indicators
Data used: most recent value in 2010-2025; values come from 2015–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 Population 65+
This page shows that two measures go together. It does not show that Basic sanitation changes Population 65+, or the reverse. These figures also describe countries, not individual people. See the ecological fallacy.
More links with Basic sanitation or Population 65+