Not from the numbers themselves

by

The thing about TRULY random numbers is that anything can happen... You could get a billion of such random numbers and get a nice repeating pattern, or even the same number over and over (very, very, very unlikely but not impossible).

Any algorithically-generated pseudorandom numbers (such as those that come out of QB's RND function) repeat after no more than 2^(however many bits that the algorithm stores internally).

E.g. if a certain function uses a static LONG (32 bits) then it will repeat, at most, every 4294967296 calls. Usually less.


Another issue is bias - will the function cover all values evenly over the course of its repetition cycle? (Or for truly random variables, does the variable have equal probability of assuming all values?) This is just a property of the function - it does not reflect on how random it is, simply on the weightings of the values it can produce. Just because a coin is weighted so that the probability of tails is 75% doesn't make it less random - it's still POSSIBLE to get 10 heads in a row eventually.

Still, a uniform distribution is usually most useful.



There are other ways to get "more randomness"... You can buy hardware that generates "noise" and then converts this into numbers to be fed into the processor. The result is much closer to (if not the same thing as) true randomity.


Posted on Mar 18, 2008, 3:34 AM
from IP address 220.245.178.132

Respond to this message   

Goto Forum Home


Response TitleAuthor and Date
Interesting... but to reiterate my original question: on Mar 18
 * OK, so what is YOUR definition of truely Random? on Mar 18
 Here's what I found on Googleqbguy on Mar 19
  Qbasic Version of Msdn codeqbguy on Mar 19
   Version with a function to convert array to string as described in Articleqbguy on Mar 19
   Ahhh, now we're getting somewhere. on Mar 20