Appendix A — Life tables and Life expectancy

Back in the 1700s the Swiss mathematician and physicist Daniel Bernoulli (1700 - 1782) developed the use of a life table model by differentiating life tables based on specific causes of death Life Table - an Overview | ScienceDirect Topics (n.d.).

Originally made by the English scientist John Graunt (1620-1674), for the analysis of the mortality of the population of London and the impact of different diseases. Life tables contain fundamental statistics for the calculation of probabilities of deaths and the computation of life expectancy at birth and at different ages.

“Life tables”, William Farr (England 1859)

“Life tables”, William Farr (England 1859)

A.0.1 Life tables components

More recent life tables are standardized to be used for a population of 100 000 at age 0.

\(l_x\) survivors at age \(x\) it starts with a value of 100 000

\(d_x\) deceased at age \(x\)

\(q_x\) probability of deaths

\(p_x\) probability of survive

The probability of survive is given by: \[p_x=1-q_x\]

Let’s start constructing a life table

The Global Life Tables are included in the {infectious} package as Glifetables dataset. This dataset has been released by the WHO, and contains various indicators.

The construction of the Global Life Tables takes consideration of age-specific mortality patterns, which is the main improvements made on life tables construction since the first set of model life tables published by the United Nations in 1955, see (Modified Logit Life Table System, n.d.) for more information about a detailed procedure.

To have a look at the package documentation for this dataset, use:

Hide code
?infectious::Glifetables
Hide code
library(tidyverse)
infectious::Glifetables %>%
  count(indicator)
#> # A tibble: 7 × 2
#>   indicator                                                n
#>   <chr>                                                <int>
#> 1 Tx - person-years lived above age x                    285
#> 2 ex - expectation of life at age x                      285
#> 3 lx - number of people left alive at age x              285
#> 4 nLx - person-years lived between ages x and x+n        285
#> 5 nMx - age-specific death rate between ages x and x+n   285
#> 6 ndx - number of people dying between ages x and x+n    285
#> 7 nqx - probability of dying between ages x and x+n      285

The indicator of interest for re-building a life table are:

  • lx - number of people left alive at age x
  • age_group

These two key elements are crucial for building the life tables.

Hide code
lx <- infectious::Glifetables %>%
  distinct() %>%
  filter(indicator == "lx - number of people left alive at age x",
         year == "2019")
Hide code
x <- lx %>% 
  filter(sex == "female") %>% 
  select(x = age_group)

lx_f <- lx %>% 
  filter(sex == "female") %>% 
  select(lx = value)

lx_m <- lx %>% 
  filter(sex == "male") %>% 
  select(lx = value)

The probability of survival is calculated as follow:

\[p_x = \frac{l_x}{l_{x+1}}\]

Hide code
px = lx_f$lx / lag(lx_f$lx)
Hide code
data.frame(
  x,
  lx = round(lx_f),
  dx = round(c(-diff(lx_f$lx), 0)),
  px,
  qx = 1 - lead(px),
  Lx = c((lx_f$lx[1] + (lx_f$lx[2])) / 2,
         5 * (lx_f$lx[-1] + lead(lx_f$lx[-1])) / 2)
) %>% head
#>       x     lx   dx        px          qx        Lx
#> 1     1 100000 4278        NA 0.042783388  97860.83
#> 2   1-4  95722 1346 0.9572166 0.014064138 475242.70
#> 3   5-9  94375  214 0.9859359 0.002264391 471342.84
#> 4 10-14  94162  166 0.9977356 0.001758090 470394.72
#> 5 15-19  93996  553 0.9982419 0.005885446 468597.83
#> 6 20-24  93443  833 0.9941146 0.008917104 465131.71
Hide code
infectious::Glifetables %>%
  distinct() %>%
  filter(
    indicator == "nLx - person-years lived between ages x and x+n",
    year == "2019",
    sex == "female"
  )
#> # A tibble: 19 × 5
#>    indicator                                       age_group sex     value year 
#>    <chr>                                           <chr>     <chr>   <dbl> <chr>
#>  1 nLx - person-years lived between ages x and x+n 1         female 9.70e4 2019 
#>  2 nLx - person-years lived between ages x and x+n 1-4       female 3.80e5 2019 
#>  3 nLx - person-years lived between ages x and x+n 5-9       female 4.71e5 2019 
#>  4 nLx - person-years lived between ages x and x+n 10-14     female 4.70e5 2019 
#>  5 nLx - person-years lived between ages x and x+n 15-19     female 4.69e5 2019 
#>  6 nLx - person-years lived between ages x and x+n 20-24     female 4.65e5 2019 
#>  7 nLx - person-years lived between ages x and x+n 25-29     female 4.60e5 2019 
#>  8 nLx - person-years lived between ages x and x+n 30-34     female 4.54e5 2019 
#>  9 nLx - person-years lived between ages x and x+n 35-39     female 4.45e5 2019 
#> 10 nLx - person-years lived between ages x and x+n 40-44     female 4.32e5 2019 
#> 11 nLx - person-years lived between ages x and x+n 45-49     female 4.14e5 2019 
#> 12 nLx - person-years lived between ages x and x+n 50-54     female 3.90e5 2019 
#> 13 nLx - person-years lived between ages x and x+n 55-59     female 3.56e5 2019 
#> 14 nLx - person-years lived between ages x and x+n 60-64     female 3.12e5 2019 
#> 15 nLx - person-years lived between ages x and x+n 65-69     female 2.59e5 2019 
#> 16 nLx - person-years lived between ages x and x+n 70-74     female 1.98e5 2019 
#> 17 nLx - person-years lived between ages x and x+n 75-79     female 1.32e5 2019 
#> 18 nLx - person-years lived between ages x and x+n 80-84     female 7.34e4 2019 
#> 19 nLx - person-years lived between ages x and x+n 85+       female 3.84e4 2019

A.1 Life expectancy

Life expectancy is the expected number of years a person will live, based on current age and prevailing mortality rates. There are several methods to calculate life expectancy, but one common approach is to use the actuarial life table, which is a statistical table that provides the mortality rates for a population at different ages. The following steps can be used to calculate life expectancy using a life table:

Identify the relevant mortality rates for the population and time period of interest. Calculate the probability of surviving to each age, given the mortality rates. Multiply the probability of surviving to each age by the remaining life expectancy at that age to obtain the expected number of years of life remaining at each age. Sum the expected number of years of life remaining at each age to obtain the total life expectancy. Note that life expectancy is a statistical estimate and can be influenced by many factors, such as lifestyle, health, and environmental factors, so actual individual life expectancy can vary widely.

Here are some key references for calculating life expectancy:

  1. United Nations World Population Prospects - The UN provides detailed life tables and population data, including life expectancy, for countries and regions around the world.

  2. Centers for Disease Control and Prevention (CDC) - The CDC provides life tables for the United States, as well as information on how life expectancy is calculated and factors that affect it.

  3. World Health Organization (WHO) - The WHO provides information on global health and life expectancy, including data and reports on trends in life expectancy and mortality.

  4. Actuarial Science textbooks - Books such as “Actuarial Mathematics” by Bowers, Gerber, Hickman, Jones, and Nesbitt, or “An Introduction to Actuarial Mathematics” by Michel Millar, provide comprehensive coverage of the methods and mathematics used in calculating life expectancy.

  5. Journal articles - Articles in actuarial and demographic journals, such as the North American Actuarial Journal or Demographic Research, often provide in-depth coverage of the latest research and methods for calculating life expectancy.