
Originally Posted by
dunfiddlin
There is no test for randomness, more or less by definition. All combinations of values being equally probable how could you decide which series of the following is random?
12345
35142
33333
24242
Any 'pattern' you detect is entirely a product of your brain's maddening inability to see anything without imposing a pattern on it. As it is, we know for certain that any computer generated random series is only ever pseudo-random and that applies to this multiple random byte process just as much as to a simple dice simulation. But the point is that you cannot tell the difference. This is why it's very difficult to be certain that dice are loaded or roulette wheels weighted. Even after a large sample you can never say with complete certainty that any series of results, no matter how suspicious, cannot arise from a random selection process.
My point was that there are some accepted tests for pseudo randomness, and that I performed none of them using any code I have posted in this thread.
edit: So I ran it with min =1 and max = 7. It was consistently wrong in that it generated significantly more 3's and 4's. Here is a typical run:
Code:
(1) 12448 Integer
(2) 12450 Integer
(3) 25168 Integer
(4) 24798 Integer
(5) 12558 Integer
(6) 12578 Integer