Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Thu, 20 Feb 2003 @ 13:32:46 GMT

  <Prev Next>   <<First <Prev

Subj:   Re: Random Sampling
From:   Geoffrey Rommel

  I have been asked to provide a "truly random" sample of records from a table that exists in our Teradata.  

  While I have read the manual on SAMPLE and RANDOM I am unsure that these functions will provide a statistically valid sample.  

Someone once told me that the algorithm used by Teradata is lrand48. This is a well-known algorithm that operates with 48-bit numbers and I believe is considered pretty good. As for the sampling, I strongly suspect that they use the Waterman algorithm (Knuth, Algorithm 3.4.2R).

The outputs of lrand48 probably meet all the tests you would care to meet (spectral, chi-square, etc.), but if your application demands numbers not produced by an algorithm of any kind, you must go to a truly random source, such as www.random.org.


  <Prev Next>   <<First <Prev
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 28 Jun 2020