Advertisement
Guest User

LessWrongSurvey_hospital

a guest
Nov 4th, 2012
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.46 KB | None | 0 0
  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. '';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement