Quick Success Data Science
When Russia invaded Ukraine in 2022, I had an odd thought. If the world were to end today, what’s the probability that — of all the people who have ever lived — I would be here to see it?
It’s not a strange question, given that WW III may already be in motion. And I’m not alone in my concerns. The “Doomsday Clock” was set to 90 seconds to midnight in 2023. That’s the closest it’s ever been.
Remarkably, this is a question within our reach. In this Quick Success Data Science project, we’ll use Python to calculate the probability of being alive now by estimating the total number of individuals who have ever lived. As part of the process, we’ll use the SciPy library’s valuable interpolate
module, which helps address a common data science problem: gaps within datasets.
To calculate the probability of being alive right now, we need the following inputs:
- The year humanity “started.”
- The size of the population at various periods.
- The average birth rate over those same periods.
- The current population
If we know the human population for every year, we can multiply it by the average birth rate to determine the number of people born that year. We can then keep a running total of how many people have ever been born. To calculate the probability of being alive now, we can divide the current population by this total.
Fortunately for us, a lot of smart people have spent a lot of time studying these four factors, and we can leverage their work to find the solution.
The Year Humanity Started
While “humans” ostensibly go back 300,000 years or more, we’ll focus on anatomically modern humans, who date back between 190,000 and 195,000 years. To compromise, we’ll use a starting date of 192,000 years before the present.