by donaldc · 16y ago · 0 comments
That is an incredible number. 1.2 million out of 7 billion. If the average person lives to age 70, that means that on average, one has a 1.2% chance of dying from a traffic accident.
That said, being human you might overcompensate.
>>> p = 1.2e6/7e9 # Probability of dying in any one year
>>> scipy.exp(log(1-p)*70) # Probability of NOT dying 70 years in a row
0.98807069644395429
>>> 1-_
0.011929303556045712
There might be some roundoff error in the exponentiation. I am too lazy to check. (1-p)**70
? Is there some kind of improved numerical stability?