Page 1 of 1

RandomInt

Posted: Sat Nov 25, 2006 5:56 pm
by Grin
Hello:) I'm interesting in RandomInt function. I need to know distribution of this function.
Example: Rand(100) < 10
Simple normal distribution gives 10%
RandomInt(100) < 10 is same but if i take range greater, the result willn't be same...
Example: RandomInt(41943)<714 chans isn't 1.7%

Thnx for answers.

Posted: Sat Nov 25, 2006 6:21 pm
by OldnGrey
About all I can say is that I treat a result of 0 as occuring about 2 times as often as I'd expect it to.

So RandomInt(10) == 0 does subjectively occur more than its fair share.
I am just careful of what I assign to a result of 0.

Years ago I saw the results of a small script that recorded the results of of hundreds of randomint throws and of course it tended to even out over time. Just how you can reconcile those two findings I have no idea. :)

Posted: Sat Nov 25, 2006 6:23 pm
by OldnGrey
Duplicate - cannot delete post

Posted: Sun Nov 26, 2006 2:33 am
by Grin
And what about RandomDiceRoll? Is situation same?
I can do normal distribution with RandomInt, but it will take more core time for result...