Hacker News new | ask | show | jobs
by dredmorbius 3183 days ago
The odds that a Hacker News user will die tomorrow approaches certainty. The probability that that person has read this particular comment are considerably lower, as every user doesn't read every comment.

I've been playing with the "actuary.py" program and some generated data using awk to come up with estimates based on some very crude assumptions: that there are 100k users, that the ages are uniformly distributed from 20 to 50, and that they are 80% male.

    time ~/bin/actuary.py $(
        gawk 'BEGIN { srand(); for( i=1;i<100000;i++ ) {
            age=20 + int(rand() * 30);
            sex=(rand()>0.8);
            if( sex=="0") sex="m";
            else sex="f";
            printf( "%s%s ", age, sex) }
        }')

    There is a 5%  chance of someone dying within 0.0 years (by 2017).                                                              
    There is a 50% chance of someone dying within 0.0 years (by 2017).                                                              
    There is a 95% chance of someone dying within 0.01 years (by 2017).

That last number tells you that there's a 95% chance of someone dying within 0.01 years, which is to say, 3.65 days.

The script fills out the likelihood that we will all die (we will) ... within a given time:

    There is a 5%  chance of everyone dying within 85.66 years (by 2103).                                                           
    There is a 50% chance of everyone dying within 87.7 years (by 2105).                                                            
    There is a 95% chance of everyone dying within 90.71 years (by 2108).                                                                                                                                                                                           
    Probability of all dying in 1.0 year:   <0.001%                                                                                 100.0                                                                                                                           
    Probability of a death within 1.0 year: >99.99%

The actual daily uniques were 300k, and about 3m monthly, as of about 3 years ago. My 100k population may be a good estimate of the actual number of humans in the daily read. The age distribution almost certainly skews generally younger, but extends older, so don't take the values as gospel, only a general indication.

I also believe the mortality tables Randall uses have been updated since.

The script takes over 6 minutes to run on a rather modest system at 100k individuals.

HN user data (from ~3 years ago):

https://news.ycombinator.com/item?id=9219581

xkcd "actuary.py"

https://blog.xkcd.com/2012/07/12/a-morbid-python-script/comm...