I'm predicting your death
Broken gently to you by Frey Thorvaldsson
Recently I had dinner with a friend and we started discussing the upcoming US presidential election. Both presidential candidates are in their mid-to-late 70’s, which means that their running mate is more important than usual. Intuitively it feels like there's a good chance that we might see a president Harris or president Pence.
But how big of a chance is it, really?
Lucky for us, there exists a serious set of professionals who, among other things, take calculating your risk of dying very seriously. Calling themselves actuaries, these men and women are why we can have nice things such as sustainable pensions schemes, profitable insurance companies and… publicly available tables showing your life expectancy.
This seemed like as good of a source of figuring out someones likelihood of dying as any other. So, I perused the US life tables, which is a pretty simple table showing your likelihood of making it to a specific age. Applied it to Biden (77 years old) and Trump (74 years old) and got a likelihood of 20% of them dying within 4 years. I thought it would be higher, but there we go.
The limits of these sorts of estimates are pretty clear.
Presidents have access to much better health care, diet and fitness experts than the average American. Theoretically they should live longer. But who knows, 4 US presidents have been assassinated while in office and the job isn’t exactly stress free. It could well be that a sitting president has a higher likelihood of death than the average person. 
Either way, the point is less about getting a certain figure and more about getting a rough estimate. If we knew exactly when everyone would die we wouldn't need life tables.
But since we have all this data, why not apply it to everyone?
Curious about how much life I had left in me I found the UK life tables from the ONS website. After playing around with the those for a bit I thought it might be useful to have a proper user interface for the table. So I set up a website to see your likelihood of dying within the next 1, 5 and 10 years.
So I spun up a create react app project, converted the life table to JSON, bought the domain itcomesforusall.com and went to work. What you see online took a bit more than 10 hours of work. A good portion of this time was spent grappling with TypeScript getting in my way since I'm fairly new to it.
The numbers the site spits back at you are sketchy but accurate in a bigger picture way. For example, the way your odds of death increase over the years was the startling part to me.
As a male 60 year old, your odds of dying within the next 10 years are around 11-12%. Each year it increases by more than a percentage point.
This means that by the time you’re 70 your odds of dying within 10 years is roughly 27%. It took 60 years to get to 11-12% and only a decade to more than double that figure. At 80 you’re up to 63% likelihood of dying within 10 years.
There's a lot I could do to improve the site, off the top of my head:
- Stop misusing data. Use actuarial tables that predict the future instead of ones looking at the past.
- Add more countries than the UK.
- Add in lifestyle factors like smoking, diet, drinking, etc.
- Break UK down by postcode / wealth. Even inside a small geographucal area people can live dramatically longer than their fellows. In Camden deprived men will live for 11.6 fewer years than the richest in Camden. I refuse to stop being shocked by this.
- Improve the dropdown input component.
- Trigger deployment with Github actions after running tests.
- Add a section on celebrities and politicans showing odds of death. (This could be popular with todays polarised politics)
But I have other projects that actually pay the bills which I enjoy working on just as much.
So although it's tempting to spend a few weeks polishing It Comes For Us All to perfections, it's probably best to let things be and keep things simple.
I found this way of thinking about death as yearly odds useful and hopefully you do too! It might spur you on to spend some more time with your parents if nothing else.