Guest User

LessWrongSurvey_hospital

a guest
Nov 4th, 2012
93
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $l = 45; # Number of births per day, large
  2. $s = 15; # Number of births per day, small
  3. # Which will have more days on which >= 0.60 girls?
  4.  
  5. $tot_s = 0;
  6. $tot_l = 0;
  7.  
  8. for($i = 1; $i <= 365; $i++) {
  9.   $l_day = 0;
  10.   $s_day = 0;
  11.   for($ll = 1; $ll <= $l; $ll++) {
  12.     $l_day += randnum(0,1,1);
  13.   }
  14.   for($ss = 1; $ss <= $s; $ss++) {
  15.     $s_day += randnum(0,1,1);
  16.   }
  17.   if ($l_day >= 27 ){
  18.     $tot_l++;
  19.   }
  20.   if ($s_day >= 9 ){
  21.     $tot_s++;
  22.   }
  23. }
  24.  
  25. '';
RAW Paste Data