Monthly Archives: January 2017

Inequality of life expectancy between countries

A colleague of mine recently asked me if I knew of a citation for the narrowing in life expectancy between high-income countries (HICs) and low- and middle-income countries (LMICs).  I didn’t.  But the question did get me thinking.  Was there a narrowing between country-level life expectancy?  Probably … maybe … I didn’t know.

There are some very nice resources on life expectancy. I particularly liked Max Roser‘s post on the Our World in Data website.  None of the things I found, however, seemed to tackle the question of “the narrowing” in quite the way I wanted.  A longer search may have solved the problem, but it seemed just as easy to grab some data and have a look for myself.  While my colleague asked about a narrowing in the life expectancy gap according to the World Bank’s income classification (i.e., between HICs and LMICs), my interest was piqued by the broader question of the inequality in life expectancy between countries.

I decided to use the GapMinder data.  For a “quick and dirty” look it suited my purposes, it’s readily available, and the googlesheets R-package makes it trivial to access the data for re-purposing.  To simplify things, I calculated the deciles of life expectancy for the available countries in the gapminder data from 1870 to 2016.

I started with 1870 because in the years prior (from 1800) the gapminder data show nine largely unvarying parallel lines.  Around 1870 you can see that the life expectancy of the top (9th decile) improve rapidly, moving away from the pack of the lowest performing (90%) of countries.  The divergence continues until the beginning of World War I, when life expectancy in the 9th decile countries begin to decline as Europe started to implode. There is a sharp drop for life expectancies in all countries in 1918 marking the appearance of “Spanish Flu“.  After 1918 life expectancy in deciles 6-9 all start to improve, taking a dip for World War II; and then after World War II, life expectancy in all the deciles began to improve.  The overall pattern is one of narrow and low life expectancies in 1870.  Increasing disparity between the 1st and the 9th deciles, peaking around 1950, and then there is a gradual narrowing.

I find it quite difficult to make those kinds of visual comparisons, so I calculated a simple measure of inequality, the difference in years between the life expectancy of the 9th-decile countries and the life expectancy of the 1st-decile countries.

This 9th/1st decile gap (mis-named in the graph titles) in life expectancy is much, much clearer.  There is a relatively steady increase in the inequality, peaking around 1950.  There is then a steady decline in the inequality until the 1990s (when it increases again) and begins to decline again in 2000.  The narrowing inequality is, thus a relatively recent phenomena.  In 2016 the difference between the life expectancies in countries of the 9th- and the 1st-decile was 20.1 years.   In every year prior to 1909, the inequality was even lower.  Of course the life expectancies were also much lower.  In 2016 the life expectancies were 81.4 (9-th decile) and 61.3 (1st-decile), in 1909 they were 46.2 (9th-decile) and 26.0 (1st-decile).

The data extraction and plotting with the R-code is posted as a “gist” on GitHub.


The data are not without their problems, for one, they are derived from multiple sources (some better than others).  Another obvious problem is that a “country” is not static over time.  Countries come and go and their borders change. To ask then about the life expectancy of a country is not straightforward.  Imagine a country with significant regional disparities in life expectancy, and that country is then divided into two independent states along those same regional lines.  Simply by division, an inequality in life expectancy arises.  I did not try to discuss this, nor to weight the analysis by the population size of the country. On the gapminder site you can find details of the data sources.

Finally the difference between the 9th-decile and the 1st-decile is only one among many ways to measure and understand inequality.