Curtate vs complete life expectancy
Still working with the 1999 female life table for Belgium, Cynthia is wondering what the life expectancy was for a newborn and an 18-year-old, using the data from 1999. Moreover, she wants to check whether she can empirically verify the 0.5 difference between the complete and curtate life expectancy that was discussed during her Life Insurance Mathematics class.
Recall from the video that the curtate life expectancy can be computed as
$$ E[K_x] = \sum_{k=1}^{\infty} {}_kp_x. $$
The one-year survival probabilities px
and complete life expectancy ex
have been preloaded.
This is a part of the course
“Life Insurance Products Valuation in R”
Exercise instructions
- Compute the curtate life expectancy of (0), a newborn female. First, define the survival probabilities
kp0
as the cumulative product ofpx
. Then, print the sum ofkp0
. - Repeat for (18), an 18-year-old female. This time, subset
px
from age 18 onwards before calculating the cumulative product. - Compare with the complete life expectancies. Print out the subset of
ex
corresponding to ages 0 and 18 in one line using a vector of length 2 inside square brackets.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Survival probabilities and curtate expected future lifetime of (0)
kp0 <- ___
___
# Survival probabilities and curtate expected future lifetime of (18)
kp18 <- ___(px[(___):___])
___
# Complete expected future lifetime of (0) and (18)
___[c(___, ___)]