cday41 / paz-search

Automatically exported from code.google.com/p/paz-search
0 stars 0 forks source link

Number of offspring exceeds expectations for mean and standard deviation #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I ran a test where I had 50 females all breed with offspring # mean=2 
SD=10. I would have expected ~100 children born in year 2 (realizing that 
stochasticity would make it vary). Instead I had 412 offspring in year 2. 
I think this is due to the way we are calculating the random number from 
the normal distribution. We seem to generate a random number based off the 
normal distribution using the given mean and standard deviation (I assume 
this is a canned function). From there, we convert it to an integer and 
take the absolute value. The problem is that any negative number is 
converted to positive (including large negatives going to large positives) 
which greatly skews the result in the positive direction. In my mind, what 
we should do is get the random number, convert it to an integer and then 
make all of the integers that are <0 equal to 0. It still skews the 
distribution a bit but is much more realistic in my opinion. I have 
included the xml (and test maps are on the FTP) if you want to check it 
out.

Original issue reported on code.google.com by bpa...@purdue.edu on 2 Nov 2009 at 8:22

Attachments:

GoogleCodeExporter commented 9 years ago
I will have to mull it over a bit, but this same problem could be cropping up 
when 
we calculate awake and asleep periods. If it is, most likely we could use the 
same 
fix (I think).

Original comment by bpa...@purdue.edu on 2 Nov 2009 at 8:37

GoogleCodeExporter commented 9 years ago

Original comment by bpa...@purdue.edu on 4 Nov 2009 at 2:51

GoogleCodeExporter commented 9 years ago

Original comment by bpa...@purdue.edu on 5 Nov 2009 at 1:24

GoogleCodeExporter commented 9 years ago
Was looking at other issue and ended up fixing this.  Will be in revision 245

Original comment by ran...@mwwb.net on 8 Nov 2009 at 1:46

GoogleCodeExporter commented 9 years ago
Fixed. Thanks Bob.

Original comment by bpa...@purdue.edu on 8 Nov 2009 at 4:07