jdharm
03-15-2006, 08:04 PM
A purely academic exercise, but one that might clarify my image of how a computer thinks.
I know that Rnd() generates a 7 digit decimal between 0 and 1. I wrote a script that used the command "Randomize" with no modifier, generated a random number, then evaluated it and looped back to "Randomize", counting the incidence of random numbers generated between 0 and .1, .1 and .2, .2 and .3, etc. along the way. The distribution is pretty close to flat when run 5000 times and gets even flatter with each order of magnitude in the cycle count.
Shouldn't I see a bell curve somewhere in here? What is it about the generation process that makes the distribution flat and not biased to a median?
Josh
<a target="_blank" href=http://www.jdharm.com>www.jdharm.com</a>
I know that Rnd() generates a 7 digit decimal between 0 and 1. I wrote a script that used the command "Randomize" with no modifier, generated a random number, then evaluated it and looped back to "Randomize", counting the incidence of random numbers generated between 0 and .1, .1 and .2, .2 and .3, etc. along the way. The distribution is pretty close to flat when run 5000 times and gets even flatter with each order of magnitude in the cycle count.
Shouldn't I see a bell curve somewhere in here? What is it about the generation process that makes the distribution flat and not biased to a median?
Josh
<a target="_blank" href=http://www.jdharm.com>www.jdharm.com</a>