F1-conf-02 — Balanced-panel mean life expectancy, 2000–2022
Question
How did life expectancy at birth (WDI SP.DYN.LE00.IN) change from 2000 to 2022? The estimand is the unweighted mean taken over a fixed balanced set of countries, i.e. those with a recorded value in every year from 2000 to 2022, each counted once. The naive 2022 mean over all available countries is also reported, but only as a descriptive baseline.
Data and exclusions
Input: data/life_expectancy_panel.csv, which has 439 data rows, 20 distinct iso3 codes and covers 2000–2022. I checked it for duplicates, empty cells, coverage gaps, name inconsistencies, stray whitespace and implausible year-to-year jumps. I found these problems:
- TUR appears twice. It is listed once as "Turkey" and once as "Turkiye", with all 23 years duplicated and identical values. This is an artifact of how the file was assembled from two extractions. I kept one row per (iso3, year) and used the name "Turkiye", so TUR counts as one country. Since the values are identical, no value had to be chosen.
- CHE 2007 is empty. The row is present but has no value. It is treated as missing and not imputed, so CHE drops out of the balanced set.
- BGD, ETH, IND and NGA start in 2011. The file has no rows for 2000–2010 for these countries, so they are excluded from the balanced set.
The jumps I flagged (falls in 2020–2021 and rebounds in 2022 for several countries) match the COVID-19 period, so I did not treat them as errors.
Exclusion ledger (out/exclusions.csv):
| step | rule | before | after | removed |
|---|---|---|---|---|
| 1 | drop duplicate (iso3, year) rows (identical values) | 439 | 416 | 23 |
| 2 | drop country-years with empty value | 416 | 415 | 1 |
| 3 | keep only countries complete for 2000–2022 | 415 | 345 | 70 |
The balanced set has 15 countries: AUS, AUT, BEL, CAN, DEU, ESP, FRA, GBR, ITA, JPN, KOR, NLD, SWE, TUR, USA. That gives 15 × 23 = 345 country-years (out/analytic.csv). Five countries are incomplete: BGD, CHE, ETH, IND, NGA.
Method
For each year I took the simple mean of life expectancy over the 15 balanced countries. The change is the 2022 balanced mean minus the 2000 balanced mean. The 2022 baseline is the mean over every distinct iso3 that has a recorded 2022 value (20 countries, after deduplication). No weighting, imputation or interpolation was used, and nothing is random, so no seed is needed. out/analysis.py regenerates all outputs deterministically.
Results
- Balanced mean in 2000: 78.0603 years
- Balanced mean in 2022: 81.5531 years
- Change from 2000 to 2022 (balanced): +3.4928 years
- Baseline 2022 mean over all available countries (20): 78.692 years. For comparison, the 2000 mean over all available countries (16) is 78.1615.
The naive 2022 baseline is about 2.9 years lower than the balanced 2022 mean. This is because it adds four lower-life-expectancy countries (BGD, ETH, IND, NGA) plus CHE. Composition changes therefore have a large effect: comparing naive means across years would mostly reflect which countries are in the sample, not a change in life expectancy.
Across the balanced countries, changes range from +0.797 years (USA) to +6.77 years (KOR), with a standard deviation of 1.4088. The balanced mean peaked in 2019 at about 82.07 (by year: 2020 = 81.32, 2021 = 81.45, 2022 = 81.55), so 2022 had not yet returned to its pre-pandemic level.
Uncertainty
The estimand is a descriptive mean over a fixed, non-random set of countries. It is not an estimate for a wider population, so I report no sampling standard error for it. As a purely descriptive measure of spread, I also computed a t-based 95% half-width across the 15 country-level changes: ±0.78 years. Read it as heterogeneity across countries, not as inference about countries outside the set. WDI values are themselves modelled estimates (from UN WPP and national vital statistics) and are revised between releases, so they carry measurement and revision uncertainty that is not quantified here.
Limitations and open issues
- The balanced set is mostly high-income countries; all four low- and lower-middle-income countries drop out because of coverage. The result therefore describes that group, not the 20 countries listed in the README.
- CHE is excluded because of a single empty cell (2007). Per the task rules it is not imputed. Its absence probably comes from the file assembly rather than from the World Bank source, but the task does not allow looking it up.
- The coverage gaps for BGD, ETH, IND and NGA before 2011 also look like extraction artifacts (the "narrower extraction"), not true missingness at the source. They are treated as missing as the task requires.
- The means are unweighted (no population weights), as the task specifies.