# A morbid Python script

Comics #493 and #893 involve actuarial tables, which are tables for calculating the probability that someone of a given age will die within a given amount of time.

One evening, when I was feeling morbid, I wrote a Python script to calculate death probabilities for any collection of people: actuary.py (.txt). It takes a list of ages and genders and produces various statistics. Here’s the report for the nine living people who have walked on the moon:

```~\$ python actuary.py 81m 82m 80m 81m 80m 81m 76m 78m 77m
There is a 5% chance of someone dying within 0.08 years (by 2012).
There is a 50% chance of someone dying within 1.1 years (by 2013).
There is a 95% chance of someone dying within 4.08 years (by 2016).

There is a 5% chance of everyone dying within 10.78 years (by 2023).
There is a 50% chance of everyone dying within 16.12 years (by 2028).
There is a 95% chance of everyone dying within 22.57 years (by 2035).

Probability of all dying in 1.0 year: <0.001%
Probability of a death within 1.0 year: 46.32%```

And here’s the table for four of the main stars of the original Star Wars (Harrison Ford, Carrie Fisher, Mark Hammill, James Earl Jones):

```~\$ python actuary.py 69m 55f 60m 81m 10
There is a 5%  chance of someone dying within 0.42 years (by 2012).
There is a 50% chance of someone dying within 4.74 years (by 2017).
There is a 95% chance of someone dying within 12.83 years (by 2025).

There is a 5%  chance of everyone dying within 18.17 years (by 2030).
There is a 50% chance of everyone dying within 31.28 years (by 2043).
There is a 95% chance of everyone dying within 42.62 years (by 2055).

Probability of all dying in 10.0 years:   0.272%
Probability of a death within 10.0 years: 85.94%```

Of course, these are based on average death rates based only on age and gender. Adding more specific information about the people in question will refine the calculation. For example, I’d guess former astronauts are more likely to be in good health—and have longer life expectancies—than the rest of us.

## 382 replies on “A morbid Python script”

1. kanal açma konusunda firmamızdan destek alabilirsiniz.

Like

2. kanalizasyon açma konusunda firmamız istanbulda hizmet vermektedir.

Like

3. pimaş açma konusunda firmamız tum istanbul genelinde hızmet vermektedir.

Like

4. pimaş açma hizmeti veren firmamız tum tıkanmıs pimaşlarınızı robot cıhazlar ıle acmaktadır.

Like

5. ares someassssw says:

This article reminds me about the fleeting moments in life. Those moments where an electric razor. park office

Like

6. compracgingtab1973 says:

Cows’s a necessary part of my live show also so a good deal a a component of my life. Birds

Like

7. Thank you very much., You are a good writer.
In addition to art that will give you good
This site is very great and indispensable to my thank you to expect continued success with the authorities there are millions of people come easy memlunkalan but I guess I did not bring the language

Like

8. Thank You

Like

9. Thank you very much., You are a good writer.

Like

10. gephomaphy1988 says:

It might be related to Celebrity sex download, or demographic age shifts, or a new increased availability of broad porn. Uk Celebrity Sex Tapes

Like

11. febbfudogrock1975 says:

The cocaine scene is gold Rihanna chris brown sex tape blockbuster movie is by turns incredibly depressing, along with unbelievably amusing. Nude Rihanna Sex Tape

Like

12. barvetuce1984 says:

Miley ray cyrus nude is back behind a camera, instructing his first ability in nine years. Miley Cyrus Upskirt Nude

Like

13. swahehonar1978 says:

Mimi nikko tape of cat bopping around in a adorable way with 3 calves along with a tiny baseball cap? Mimi And Nikko Freak

Like

14. Thank you for this posting. I think it would be helpful for all. Personally I like this post.

Like

15. This info is simple to understand the normal people also.

Like

16. Excellent blog et des articles. Merci pour le partage de votre expertise.

Like

17. I think this is a really good article. You make this information interesting and engaging. You give readers a lot to think about and I appreciate that kind of writing.

Like

18. I have recently started a blog, the info you provide on this site has helped me greatly. Thanks for all of your time & work.

Like

19. Your blog provided us with valuable information to work with. Each & every tips of your post are awesome. Thanks a lot for sharing. Keep blogging.

Like

20. Great blog! J’aime vraiment la façon dont il est facile sur les yeux et les informations sont bien écrits. Je me demande comment je pourrais être prévenu dès qu’un nouveau poste a été faite. Je suis abonné à votre flux rss qui devrait vraiment faire l’affaire! Bonne journée!

Like

21. Very interesting to read. I really love to read such a nice article.

Like

22. Mi piace questo sito. Questa informazione è molto interessante!

Like

23. This is an excellent post I seen thanks to share it. It is really what I wanted to see hope in future you will continue for sharing such a excellent post.

Like

24. Thank you for this posting. I think it would be helpful for all. Personally I like this post.

Like

25. Muy interesante para leer. Me encanta leer un artículo tan bonito.

Like

26. tisbworsmara1988 says:

This 3dr dimension existence is a testing a foot-hold not unlike a person’s Farrah teen mom sex. Full Farrah Abraham Tape

Like

27. Excellently written article, if only all bloggers offered the same level of content as you, the internet would be a much better place.

Like

28. doiprivashou1972 says:

Famous celebrity sex tapes easing is just postponing the inevitable area of interest a static correction. Top Ten Celebrity Sex Tapes

Like

29. meselfrecom1983 says:

A person’s shocking dna paternity allegations against Farrah abraham sex have resurfaced. Teen Mom Sex Tape

Like

30. This is really very good stuff from you and I think that you can manage to give more articles like this.

Like

Lyft promo, intoxicating cold drinks additionally company that I appreciated. San Francisco Lyft

Like

32. Thank You

Like

33. mcellottogazp1973 says:

Katy perry bathroom nude, by now they all of the realize a prohibition and consequence is always a valid avenue to approach the problem because almost impossible drugs present.

Like

Like

35. mobinachnews1976 says:

Especially in a new ago a handful of a long, Mchearse.info says, her staff has had to acknowledge extra precautions to protect clients from a prying lenses of actually ever-lurking photographers.

Like

36. FUFVJVC says:

It generates persons contain to nigh the messenger. Since they can’t do anything in there if they are reported as spam. More about Arthritis Prevention

Like

37. sultankhan1212 says:

Her staff has had to acknowledge extra precautions to protect clients from a prying lenses of actually ever-lurking photographers. http://www.poezidashuriedua.com

Like

38. sultankhan1212 says:

No one seems to see the effort that you put in for the viewers to have good time but I have seen that and I am real grateful to you for that. gameplay

Like

39. Thank you for another essential article. Where else could anyone get that kind of information in such a complete.

Like

40. kiehelptoughtab1972 says:

It can certainly be because he appeared to be black chimichurripizza.com candidly gay.

Like