in reply to is rand random enough to simulate dice rolls?

The rand function is supposed to be a "Pseudorandom number generator".

And the requirements for PRNG's are mathematically defined.

One of them says, that for every range epsilon ε around the expected average P(E) you can find a minimum set size N such that the actual average will always be within that range.

That's math-speak for "the bigger the closer".

And that's very similar to your test, with the exception that there is no guaranty about this set size 10000. Could be less, could be more.

From my tests it's very likely to hold for 10000 tho, but you can only be "sure" after checking the implementation.

HTH! :)

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

) DISCLAIMER: security is relative if it comes to software and it's implementation