Established proof of the non-obvious relationship between GDP and Life Expectancy at Birth (Years)

Dramane B. Salifou
9 min readAug 24, 2022

--

Terms in use:

  • As defined here, Life Expectancy is a figure representing the number of years, based on known statistics, to which any person of a given age may reasonably expect to live.
  • As defined here, Gross Domestic Product (GDP) is the overall monetary or consumer value of all finished goods and services produced within the boundaries of a nation over a given period. It acts as a large measure of overall domestic output, as a detailed scorecard of the economic health of the country. GDP is measured in US dollars.

Introduction

In this project, we will analyze data on Life Expectancy at Birth (years) (LEABY) and Gross Domestic Product (GDP) from the World Health Organization and the World Bank to try to identify the relationship between the GDP and LEABY of six countries (Chile, China, Germany, Mexico, United States of America, Zimbabwe) over fifteen years.

During this project, we will analyze, prepare, and plot data in order to answer in a meaningful way some questions such as:

  • Does higher GDP mean higher LEABY?
  • How does the LEABY vary in average by country from 2000 to 2015?
  • How does the GDP vary in average by country from 2000 to 2015?
  • Is a correlation between GDP and LEABY for the countries from 2000 to 2015?

Data sources

Get the code of this project here and link up with me on LinkedIn

  1. Data information

Our dataset has only 96 rows and 4 columns named Country,Year, "Life expectancy at birth (years)", and GDP.

Before moving in, let’s alter the column variable name "Life expectancy at birth (years)" to "LEABY".

Now, let’s inspect few rows of our data.

A quick collection of numerical summaries of the data is:

numerical summaries

2. Visualizing the graph of LEABY

Leaby distribution

As shown, the graph of LEABY is left-skewed. That explains that most of the data are together between the second quarter 74.47 years and the last quarter 78.9 years.

3. Splitting the Data by GDP

Does higher GDP mean higher LEABY?

GDP is known to be a measure of a country’s wealth, Therefore, in our attempt to answer this question, we are going to split our data in two groups based on GDP. Using the median GDP, we created two datasets for “low GDP countries” and “high GDP countries.

On one hand, we see that that China had “low GDP” in only in 2000 while Chile, Mexico and Zimbabwe had “low GDP” over the fifteen years.

On the other hand, we see that Germany, the United States of America and China had “high GDP”.

Now, to On the other hand, we see that Germany, the United States of America and China had “high GDP”.

To compare the LEABY on both wealth groups, we plotted the following histograms.

wealth groups Leaby

As a result, we can see that all the countries with “high GDP” have high LEABY but many countries with “low GDP” also have high LEABY.

4. Visualizing the Average Life Expectancy at Birth (years) growth by country

This bar plot shows that all of the countries except Zimbabwe have the average growth in the mid-to-high 70s.

In the following plot, we’ll explore in deep the variations of the life expectancy at birth (years) of each country over the fifteen years using seaborn.FacetGrid() function.

This figure shows the growth of the Life expectancy at birth (year) in Chile, China, Germany, Mexico, United States of America, and in Zimbabwe from 2000 to 2015.

From 2000 to 2004 the LEABY of Zimbabwe decreased little by little from 46.0s to 44.3s before it began to increase steeply until 2015 where it reached 60.7s.

In 2000 the LEABY of Chile was 77.3s and this number remained constant until 2001. From that time on, its LEABY went up gradually and it reached 79.6s in 2008. Between 2008 and 2010 there was a slight drop to 79.1s before the increase happened quickly, and it reached 79.8s in 2011. From that time, it continued to grow until 2015.

There was a little increase in the LEABY of Mexico from 74.8s in 2000 to 75.0s in 2001. Then, it remained steady at 75.0s between 2001 and 2003. Between 2003 and 2007 it peaked at 76.1s. In 2008 it felt the LEABY felt rapidly to 75.6. It fluctuated between 2008 and 2011 before it started to increase gradually until 2015.

While the LEABY of China increased sharply from 71.7s in 2000 to 76.1s in 2015, the LEABY of Germany and USA increased significantly respectively from 78.0 in 2000 to 81.0s in 2015 and from 76.8 in 2000 to 79.3s in 2015.

Overall, there was an increase in the Life expectancy at birth (year) for all the nations. Germany had the highest LEABY. The USA had the second largest LEABY followed by Chile, Mexico, China, and Zimbabwe.

5. Visualizing the graph of GDP

histogram of GDP

As we can see the GDP is right-skewed in opposition of the LEABY.

6. Visualizing the Average GDP growth by country

This plot shows the average GDP of all the countries except Zimbabwe. The United States of America had the largest average GDP. China had the second largest followed by Germany, Mexico, and Chile.

Next, we’ll explore in deep the variations of the GDP of each country over the fifteen years using seaborn.FacetGrid() function.

This figure shows the graph of GDP of the six nations over 2000–2015.

The GDP of Chile reached its lowest point between 2000 and 2003 and it went up significantly between 2003 and 2007. Between 2007 and 2009 there was a little drop before it started to increase sharply and peaked at almost 2.7 T in 2013 but it plunged considerably around 2.4 T in 2015.

The GDP of Mexico fluctuated from 0.7 T in 2000 to 0.8 T in 2004 and it increased sharply to reach 1.1 T between 2007 and 2008, but it plunged dramatically to 0.9 T between 2008 and 2009. From that time, it went up sharply and reached a peak at1.3 T between 2013 and 2014 but it fell dramatically below 1.2 T in 2015.

With its lowest at 0.2 T in 2000, the GDP of China increased sharply and peaked around 1.2 T in 2015.
The GDP of the United States of America climbed sharply from 1.0 T in 2000 to around 1.5 T in 2008, but it dropped slightly between 2008 and 2009. Next, it boomed to reach a peak at 1.8 T in 2015.

The GDP of Germany increased vastly from 2.0 T in 2000 to around 3.7 in 2008. From that time, it fluctuated before it peaked at 3.9 T in 2014, but it fell steeply to 3.4 in 2015.

The GDP of Zimbabwe decreased steadily 0.7 T in 2000 to its lowest 0.4 T in 2008, but it rose sharply and peaked at 1.6 T in 2015.

Overall, there was an increase in GDP of all the nations from 2000 to 2015 except Zimbabwe for which the boom happened only from 2008 to 2015.

6. Visualizing the correlation between GDP and Life expectancy at birth

correlation between GDP and LEABY 1
Correlation between GDP and LEABY over time

From this figure, we can see changes in LEABY vs GDP of the countries over the fifteen years. No noticeable change in the movement of data points for Chile, Mexico, China, and Germany could be discerned between 2000 and 2004, but the GDP of China and Germany started to move off along the x-axis which means that their GDP went up. From 2004 t0 2015, China and the United States are the countries with GDP that have mostly moved onward along the x-axis: their GDP was considerably increased over that period. Whereas, the GDP of Zimbabwe had mostly moved upward along the y-axis which means that life expectancy at birth (year) in this country had increased sharply over time. Moreover, Life expectancy at birth (year) in Chile and Mexico remained constant for the fifteen years. Lastly, for Germany, both GDP and at Life expectancy at birth (year) move slightly over the fifteen years.

Correlation GDP and LEABY by country

As we can see, this plot shows positive correlation between LEABY and GDP for all the countries.

Finally, using a violin plot let’s visualize the shape of the distribution patterns of Life expectancy at birth (year) and GDP by nation from 2000 to 2015.

Shape of visual patterns of GDP and LEABY by country

This violin plot shows the shape of the distribution patterns of LEABY and GDP. Country is on the y-axis and LEABY and GDP are on the x-axis.

In the LEABY chart on the left, many countries had shorter distribution shape spans, except for Zimbabwe, which had a scale from high 30 to the high 60.

Whereas, in the GDP chart on the right, the distribution shape of China and the United States had relatively wide reach, while Zimbabwe, Chile, and Mexico had shorter reach.

Conclusion

With the development of this project, we learned some aspects of the relationship of life expectancy and GDP from data visualizations. Even though the data we utilized was not quite big, it helped us to get insight in the non-obvious relationship between life expectancy and GDP of the six nations from 2000 to 2015. Also, the development of this project gave responses to some questions asked at the top beginning.

  • Does higher GDP mean higher LEABY?

No, we saw that all the countries with high GDP have high LEABY but many countries with high LEABY also had low GDP. For example, Chile and Mexico have low GDP but they have high LEABY (years) almost equal to the one USA had. Even though their GDP was not increasing at the same rate as USA and China, they still have high LEABY (years). Likewise, Germany that had the highest LEABY over the fifteen years had a fluctuated GDP lower than the GDP of the USA. Therefore, it seems that the relationship between GDP and Life expectancy at birth (years) was not so evident.

  • How does the LEABY vary in average by country over fifteen years?

In general, there was an increase of the Life expectancy at birth (year) for all the nations. Germany had the highest LEABY. Chile had the second largest LEABY followed the USA, Mexico, China, and Zimbabwe in 2015. In fact, the average life expectancy was between mid to high 70s for the countries except for Zimbabwe which was 50 even though this nation had the highest rise in LEABY.

  • How does the GDP vary in average by country over fifteen years?

Overall, the United States of America had the largest average GDP. China had the second largest followed by Germany, Mexico, and Chile. Whereas, in terms of growth, there was an increase in GDP for all the nations particularly for China.

  • Is there a correlation between GDP and life expectancy of a country?

Yes, there is a positive correlation between GDP and life expectancy for all the nations in our study.

All in all, this project demonstrates that LEABY and GDP were in growth and the correlation between them was positive for each country in our list from 2000 t0 2015. That was great benefits for the nations. Unfortunately, rising GDP hasn’t always been linked with prosperous life expectancy as shown in this World Economic Forum article.

Get the code of this project here and link up with me on LinkedIn.

--

--

Dramane B. Salifou

Telling stories with data and driving that culture to help companies to make data-driven decisions based on perspective and predictive analysis is my passion.