Exercise

How likely is Cynthia to live to 100?

Being an R stats lover Cynthia enjoyed her first explorations of the life table for the year 1999. Using R she wants to gain more insights. Cynthia is particularly interested in the probability to become a centenarian. What is this probability for a zero-year-old, using the data of 1999? And for an 18-year-old? Can you figure out how to calculate those probabilities? Then do a visualization of \((k,\ _kp_{18})\).

In the following exercises, the 1999 period life table for females in Belgium is again preloaded and stored in the object life_table and the lx column has been extracted for you.

Instructions

100 XP
  • Use lx to compute the probability for a zero-year-old to become a centenarian (i.e. to reach age 100). Make sure to extract by index.
  • Compute the same probability for an 18-year-old.
  • Calculate and plot the probabilities for an 18-year-old to survive until ages 18, 19, … up to 100. Define k as a vector from 0 to 82. Use k to calculate the probabilities.