F1-conf-02 — Balanced-panel mean life expectancy, 2000–2022
Question
How did unweighted mean life expectancy at birth (WDI SP.DYN.LE00.IN) change between 2000 and 2022 across a fixed set of countries, defined as the countries in data/life_expectancy_panel.csv that have a recorded value in every year 2000–2022? As a descriptive baseline, I also report the naive 2022 mean over every country with a recorded 2022 value.
Data and exclusions
- I read 439 data rows covering 20 distinct iso3 codes and years 2000–2022.
- Data issues found (all are also listed in
results.json→data_issues):- Duplicated country (TUR). TUR appears twice, under the names "Turkey" and "Turkiye", with 23 rows each. This looks like an artefact of combining two extractions. The values are identical row for row. I kept one row per (iso3, year) and one name per iso3, which removed 23 rows. If the duplicates had been left in, the naive 2022 mean over raw rows would have been 78.640 instead of 78.692.
- Missing value. CHE 2007 is an empty cell. I treated it as missing and did not impute it, which removed 1 row. Because of this, CHE is not in the balanced set.
- Absent years. BGD, ETH, IND and NGA have no rows at all for 2000–2010 (they have 12 rows each, 2011–2022). I did not impute them, so all four are excluded from the balanced set.
- Exclusion ledger (
out/exclusions.csv): 439 → 416 (duplicates removed) → 415 (missing value removed) → 345 (only balanced countries kept, which drops BGD, CHE, ETH, IND and NGA). - Balanced set: 15 countries (AUS, AUT, BEL, CAN, DEU, ESP, FRA, GBR, ITA, JPN, KOR, NLD, SWE, TUR, USA) × 23 years = 345 country-years. These are written to
out/analytic.csv.
Method
Countries are identified by iso3. For each year, the balanced mean is the simple unweighted mean of life expectancy over the 15 balanced countries. The change is the 2022 balanced mean minus the 2000 balanced mean. The baseline is the unweighted mean over all distinct countries with a recorded 2022 value: there are 20 of them after de-duplication, each counted once. The script uses no random elements. out/analysis.py regenerates all outputs deterministically, and I checked this by running it twice and getting identical output.
Results
| quantity | value (years) |
|---|---|
| Balanced mean 2000 (15 countries) | 78.060 |
| Balanced mean 2022 (15 countries) | 81.553 |
| Change 2000→2022, balanced | +3.493 |
| Naive 2022 mean, all available (20 countries) | 78.692 |
Life expectancy rose in all 15 balanced countries. The smallest gain was USA (+0.80) and the largest was KOR (+6.77); the per-country changes are in out/supplementary.json.
The naive 2022 mean is about 2.9 years lower than the balanced 2022 mean. This gap comes from composition, not from any change over time: the naive mean includes four countries with much lower life expectancy (BGD, ETH, IND, NGA) plus CHE. Comparing naive means across years would mix these composition shifts with real change. For example, the 2000 naive mean (16 countries available) is 78.162, so a naive "change" would come out at only about +0.53 years.
Uncertainty
The balanced means are exact descriptive statistics for a fixed, fully observed set of countries. If that set is the population of interest, there is no sampling error. The data themselves (WDI modelled estimates) carry measurement uncertainty, but the file gives no way to quantify it. As a supplementary result only, I treated the 15 countries as a sample from a wider population. The mean change is then 3.49 years (SE 0.36), with a t-based 95% CI of [2.71, 4.27] and a cross-country SD of changes of 1.41. This interpretation is questionable because the countries were not randomly sampled.
Limitations and open issues
- The balanced set is selective. It contains 14 high-income OECD countries plus Türkiye. All the lower-income countries in the file (BGD, ETH, IND, NGA) are excluded because their 2000–2010 rows are missing, so the result does not describe a broader global trend.
- CHE is excluded because of a single missing year (2007). This follows the stated estimand. Its recorded change from 2000 to 2022 (79.680 → 83.605) is in line with the other countries, but I did not use it.
- The missing 2000–2010 rows for four countries are probably an assembly error (the earlier, narrower extraction). The real WDI series likely has those values, but I could not and did not retrieve them.
- I resolved the TUR duplicate safely because the duplicate values are identical. I did not verify the values against the original API response, because the raw response is not provided.
- The means are unweighted (not population-weighted), as the task specifies.