Session Ready
Exercise

Like it's 1999!

Cynthia is now 18 and registered in the actuarial program at KU Leuven in Belgium. This term she takes a course on life insurance mathematics. Using R she is asked to build meaningful visualizations of lifetime data statistics. You will assist her by inspecting the Belgian mortality data for females as registered in the year 1999. This is not just Cynthia's year of birth; '1999' is also her favorite Prince song! The mortality rates have been obtained from the Human Mortality Database and are stored in the data set life_table.

In this exercise, you will work with a data frame object in R by exploring what is contained in life_table.

Instructions
100 XP
  • Verify the structure of life_table using the function str() and the first and last entries of life_table using head() and tail().
  • Extract the variables age, qx and ex from life_table using the $ notation.
  • Print the probability \(q_{18}\) that an 18-year-old in 1999 would die before turning 19.
  • Print the expected future lifetime \(e_{18}\) of an 18-year-old in 1999?