News for hackers. Stuff that matters.
Re:H5N1 (2013) by VWWHFSfQ on Sunday March 29, 2020 @04:23PM (#22722360)
for some reason those numbers are not adding up to me. do the chances compound year-over-year? how is the 4% any different in year 1 than in year 30? or any year in between? how does this add up to 70% over a 30 year period
Re:H5N1 (2013) by zamfi on Sunday March 29, 2020 @04:27PM (#22722395)
If you assume 4% each year independently of each other year, then the chance of not having nuclear war is 96% in any given year. Over 30 years, your chance of no war is (0.96)^30 = 30%.
Re:H5N1 (2013) by dragonwriter on Sunday March 29, 2020 @04:32PM (#22722448)
> If you assume 4% each year independently of each other year, then the chance of not having nuclear war is 96% in any given year. Over 30 years, your chance of no war is (0.96)^30 = 30%.

It's clearly not independent though, but this calculation remains true if you assume only that not having a nuclear war doesn't change the odds for future years, even if having one does.

Re:H5N1 (2013) by zamfi on Sunday March 29, 2020 @06:35PM (#22723419)
My apologies, you are right -- I should have said "4% each year independently of each prior year" -- and it's true that only the negation needs to be independent.
Re:H5N1 (2013) by ekosz on Sunday March 29, 2020 @04:35PM (#22722470)
You can try it yourself without any of the math with just a little bit of programming.

  function calc30(odds) {
    for (let i = 0; i < 30; i++) {
      if (Math.random() < odds) return true;
    }
    return false;
  }
  Array.from(Array(10000)).map(() => calc30(0.04)).filter(Boolean).length //=> 7022 or ~70%
  Array.from(Array(10000)).map(() => calc30(0.02)).filter(Boolean).length //=> 4545 or ~45%