Cohort survival probabilities
The probability Cynthia calculated earlier for an 18-year-old in 1999 to survive until the age of 23 was in fact the period survival probability. Can you help her to adjust her computations in order to take the dynamics of the survival probabilities over time into account? The one-year survival probabilities used in the multiplication rule should hence be extracted from the life table in a diagonal way:
$$ _5p_{18, 1999} = p_{18, 1999} \cdot p_{19,2000} \cdot p_{20,2001} \cdot p_{21,2002} \cdot p_{22,2003} $$
The life_table
object from the previous exercise is still loaded.
This exercise is part of the course
Life Insurance Products Valuation in R
Exercise instructions
- Create and print the cohort life table for females born in \(1999 - 18 = 1981\) using
subset()
. - Define the cohort one-year survival probabilities
px
from theqx
column oflife_table_1981
. - Compute the 5-year cohort survival probability for (18).
- Can you repeat this calculation for birth year 1881, a century earlier, in a one-line command? You will need to use both
with()
andsubset()
.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Construct and print the cohort life table for birth year 1981
life_table_1981 <- ___(___, ___)
life_table_1981
# 1981 cohort one-year survival probabilities
px <- ___
# 1981 cohort survival probability that (18) survives 5 more years
___(px[(___):(___)])
# 1881 cohort survival probability that (18) survives 5 more years
___(___(life_table, year - age == ___), prod(1 - qx[(18 + 1):(22 + 1)]))