Get Started

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”

View Course

Exercise instructions

  • Compute the curtate life expectancy of (0), a newborn female. First, define the survival probabilities kp0 as the cumulative product of px. Then, print the sum of kp0.
  • 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(___, ___)]

This exercise is part of the course

Life Insurance Products Valuation in R

IntermediateSkill Level
5.0+
2 reviews

Learn the basics of cash flow valuation, work with human mortality data and build life insurance products in R.

Life tables play a vital role in life insurance products. In this chapter you will work with data sets from the Human Mortality Database by building meaningful visualizations to study the evolution of mortality data over age and time. You will also use survival and death probabilities.

Exercise 1: Random future lifetimeExercise 2: Like it's 1999!Exercise 3: Visualizing one year of mortality dataExercise 4: Men versus womenExercise 5: Binomial experimentsExercise 6: How likely is Cynthia to live to 100?Exercise 7: The number of deathsExercise 8: Calculating probabilitiesExercise 9: Multiplication rules!Exercise 10: Deferred mortality probabilitiesExercise 11: Calculating life expectanciesExercise 12: Curtate vs complete life expectancy
Exercise 13: Plotting life expectancies by ageExercise 14: DynamicsExercise 15: Mortality rates over timeExercise 16: Cohort survival probabilities

What is DataCamp?

Learn the data skills you need online at your own pace—from non-coding essentials to data science and machine learning.

Start Learning for Free