The Number 1 independent website for ACL information!

TexasACL User Group
About Us
Training
Why ACL
Essays & Scripts
ACL News
Events
Links
FAQ
Site Map
Support Us
The Not So Random Number

There are two things to remember when working with ACL's random number generator. 

1) No computer system can truly generate truly random numbers.  Random number generators are based upon a pre-determined algorithms.  If these algorithms are known, then one can predict the results.  Further more, if you use a "Seed" the results will be the same.

2) The results of a random sample will not be presented in the order that they were selected, but rather in the order in which they appear in the original file.  If the sample that you select is the same size as the sample that is being used, this is not an issue.  If, on the other hand, the sample is larger than the required sample, it will create bias in the results.  In other words, if your original data is sorted by date, then the sample will be presented by date.  This means, that if you only look at half of the "random" population, then the half that you look at will all occur in during the first half of the sample period!  Similarly, if it is sorted by size it will be biased to the high or low amounts.

There are two work arounds.  The first one is to create a new field using the RAND() function, extract by fields, and then SORT based upon the newly created field.  The second option is to select the "More" tab on the Sample wizard box.  If you then ask for fields, ACL will give you the option to get the results in "Report Selection Order."

In a script this can be accomplished by adding the qualifier "ORDER" to the sample before declaring the fields to be captured.