In demography, we like to use life tables to estimate the probability that someone born in 1945 (as an example) is still alive nowadays. But another interesting quantity might be the probability that someone alive in 1945 is still alive nowadays.

The main difference is that we do not know when that person, alive in 1945, was born. Someone who was old in 1945 is very unlikely to still be alive in 2017. To compute those probabilities, we can use datasets from here. More precisely, we need both death and birth data. I assume that datasets (text files) were downloaded (it is necessary to register, for free, to get the data).

We have a single number for the number of births, and then a vector for the number of deaths. Consider now another function. Consider the people born in 1930. We want to get two numbers: the number of people still alive in 1945 (say), and the number of people still alive nowadays. The ratio will be the proportion of people born in 1930 that were alive in 1945 that are still alive in 2015.

Then, for a given year (say 1945), to get the proportion of people alive in 1945 that are still alive today, we need to count how many people born in 1944 were still alive in 1945, and in 2015, but also born in 1943, 1942, etc. And we simply consider the ratio of the total number of people alive in 2015 over the total number of people alive in 1945: