Results 1 to 4 of 4

Thread: Probability of dying at a given age in a computer simulation

  1. #1
    Junior Member
    Join Date
    May 2011
    Posts
    2

    Probability of dying at a given age in a computer simulation

    Hi all

    This is my first post here.
    Thanks to Saliu for all the good information on the site. It is pretty kewl

    I am very interested in evolution of man and I used to be a programmer, so I decided to make a computer simulated world (to simulate various things).
    In the world, people are born and obviously die.
    To calculate when a person dies, I created a forumla but my people seem to die too early.
    Basically I said the average age for my people is 4 (its not 4 but illustration purposes its easier).
    So over a few hundred people, the average age the people live till should be 4, but it never is (its about 3.6 consistantly).

    The actual calculation for when someone dies goes something like this.
    There is a continious loop (each iteration representing a unit of age) and in the loop I calculate a number which I call a risk factor for each person, depending on how many loop iterations they have been through.
    The risk factor is calculated like this
    {risk factor} = {current loop iteration} / {total risk} * 100
    Total risk factor is the recursive sum of the average age.
    In other words 1 + 2 + 3 + 4 = 10
    So on day 1 your risk would be 10%
    Day 2 it would be 20%
    Day 3 it would be 30%
    Day 4 it would be 40%
    The logic here is that, by the 4th iteration of the loop, you would have been exposed to 100% risk, and would more than likely die and on average people would live till 4.
    Once I have the risk factor, I get a random number between 0 and 100 and if the random number is lower than the risk factor, the peoson dies on that day.

    I think there are 2 flaws in my logic and the way I calculate the risk factor.
    1) at a given point, in this examples case on day 10, you have 100% chance of dying. Your risk of dying can never be 100%
    2) as explained above the inputted average and the actual average age dont meet up. Lets say every 10 days in the program I update average age.
    On day 0 average age is 4
    On day 10 average age will be 3.66 and so on
    Eventually it will be very close to 0 and the people wont live.

    After reading some information on this site, I think that this is a binomial distribution problem, but cant seem to get it right.

    Can anyone help with my problem?

    Thanks in advance, it is much appreciated

  2. #2
    Administrator Ion Saliu's Avatar
    Join Date
    Sep 2010
    Location
    Gettysburg, Pennsylvania, United States
    Posts
    379
    I don’t think I understand clearly your point. Maybe I’ll come back after the release of BrightH3 (horseracing software).

    I wrote about the odds (probability) of dying randomly (unexpectedly or accidentally) in the United States. The calculations can only be performed based on statistics. But statistics in such matters are a far cry from guaranteed accuracy:

    Probability Caveats in Lotto, Lottery, Gambling, Life, Sports.

    I calculated the odds of dying unexpectedly (randomly) in America: 685 / 300000000 = 0.00000228333… or '1 in 437956'.

    The odds of winning the jackpot in a 5/37 lotto game are '1 in 435897'. Based on my stats (from radio, TV, printed press), dying unexpectedly (randomly) in America has the same chance as winning the jackpot in a 5/37 lotto game.

    The procedure can be extended to the odds of dying in general. That depends a lot on statistics and differs widely from nation to nation, from region to region, even from city to city. We can calculate the sinister probability of death by dividing total deaths by total population. There are also yearly variations. We can track longer periods of time and calculate yearly averages. There are years with major catastrophes, when the death rate increases dramatically (tsunamis, earthquakes, wars . . .)

    Calculating the daily risk of dying is an even more complicated matter, with a much wider margin of approximation . . .

    It is a very depressing discussion you started!

    Have a nice day!

    Ion Saliu

  3. #3
    Junior Member
    Join Date
    May 2011
    Posts
    2
    Hey Ion Saliu

    Thanks for the reply. I appreciate the help.
    I understand not understanding my problem. It has proven to be a little bit of a toughie...

    Let me try explain it another way.
    I start my society off with an average age of 4 (inputted value).
    My society starts with 10000 people.
    Each of the 10000 people start living on the same day (ie when I start running the program lol).
    So, once everyone has died (all 10000 people) the average age of all the dead people should be 4.
    In other words the total number of years lived by all people should be 40000.

    Lets put it another way
    Lets say my society has 100 people, and they die as per the table below (the data in the table is made up by me, based on previous simulations where the average comes out a little low)
    Day 1 15 people die 15 total people years
    Day 2 10 people die 20 total people years
    Day 3 13 people die 39 total people years
    Day 4 21 people die 84 total people years
    Day 5 19 people die 95 total people years
    Day 6 12 people die 72 total people years
    Day 7 6 people die 42 total people years
    Day 8 3 people die 24 total people years
    Day 9 1 people die 9 total people years
    In total all 100 people die and the total people years is 400.
    Thus the average age of a person is 4 (400 / 100).

    So my question is, how do I calculate the probability of dying on each day?
    In other words
    On day 1, what is the probability of dying?
    On day 2, what is the probability of dying? etc.. (so that the average age is 4)

    Does this make it any clearer?

    Thanks buddy
    Have a great evening / day

  4. #4
    Junior Member
    Join Date
    Aug 2011
    Posts
    1
    I have a related question, one based unfortunately on a real person.

    Given incidence rates of various diseases, what would the probability be of being diagnosed with all of the diseases at various points in the person's life and still alive? Family health history for the given diseases is 0 occurances for maternal and paternal histories.

    Malignant Brain Tumor .2/100,000
    Breast Cancer 100-117/100,000
    Cervical Cancer 8.5-11.2/100,000
    Uterine Cancer 9.6/100,000
    MS 3.6/100,000
    Rheumatoid ARthritis 1.8-7.6/100,000

    Maybe more interestingly, what is the probability or DC that the person is lying?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •