Talk:Random numbers: Difference between revisions

Content added Content deleted
Line 16: Line 16:


I've modified the MAXScript example using formula others have used, but the results are not correct. Specifically, I'm getting a mean of around 1.62 and a std-dev of 0.33. I believe this is because "sqrt (-2*log a) * cos (2*pi*b)" isn't returning values [0.0..1.0]. Removing the "1.0 + 0.5 *" terms gives a mean of 1.25 and std-dev 0.66. Anyone have any ideas where I'm going wrong? [[User:Drea|Drea]] 01:23, 21 September 2007 (MDT)
I've modified the MAXScript example using formula others have used, but the results are not correct. Specifically, I'm getting a mean of around 1.62 and a std-dev of 0.33. I believe this is because "sqrt (-2*log a) * cos (2*pi*b)" isn't returning values [0.0..1.0]. Removing the "1.0 + 0.5 *" terms gives a mean of 1.25 and std-dev 0.66. Anyone have any ideas where I'm going wrong? [[User:Drea|Drea]] 01:23, 21 September 2007 (MDT)

: The normal distribution does not limit values to a hard range. They are instead centered on 0 with a standard deviation of 1. One possibility: make sure your log is the natural logarithm and not base 10. --[[User:IanOsgood|IanOsgood]] 09:03, 21 September 2007 (MDT)