Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Random number generation
Message
From
06/05/2003 19:08:12
 
 
To
06/05/2003 14:15:16
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00785329
Message ID:
00785627
Views:
12
Thanks Tamar, good articles, keep the knowledge going in the community. I have concluded that the RAND() function, when used as the documentation states appears to be random :)

Thanks,
Jeff


>>Interesting, the reason that I'm posing this question is that this program has been in place for about 8 months. A question arose when a certain person was selected for the 4th time, others having never been chosen at all. My reply is "that's because it's random!", but wanted a little feedback to reinforce my position.
>>
>>Thanks, Jeff
>
>I tested it a long time ago for the Hacker's Guide. Here's what I wrote:
>
>One question you'd think we'd hear a lot is "How random are the results of RAND()?" There are various tests you can run to test the randomness of a sequence of random numbers. The downloads (www.hentzenwerke.com) contains two tests. Each generates a sequence of random numbers and then computes a statistic about it. The first is the Chi-Squared test. It returns a value you can look up in a table (try a statistics textbook, or check out Excel's CHIDIST() function) to see how random RAND() is. The second test is called the "Coupon Collectors" test. The return value is the average number of random numbers you have to generate in order to be sure you've gotten at least one of each value in a range.
>
>If you have the book, you can download that code and test it for yourself.
>
>Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform