View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jerry W. Lewis Jerry W. Lewis is offline
external usenet poster
 
Posts: 837
Default Is the RANBETWEEN function certified randomness?

You don't say what you use the random numbers for, or what consequences would
occur if there were detectable autocorrelations. Since you are using
RANDBETWEEN instead of RAND, I will guess that your application is not very
critical, in which case, RANDBETWEEN might be acceptable for your purpose.

RANDBETWEEN appears to correctly convert continuous uniformly distributed
random numbers into discrete uniformly distributed intetegers. The quality
of its output depends on the quality of the underlying random number
generator, which in turn depends on the version of Excel that you are using.

Like almost all software, Excel uses pseudo-random number generators, that
means that the numbers follow a deterministic sequence, instead of being
truly random. Pseudo-random sequences are not all created equal.

Prior to Excel 2007, RANDBETWEEN was part of the Analysis ToolPak (ATP), and
so likely used the ATP random number generator, which was never very good.

Excel 2007 converted ATP functions to native worksheet functions. In 2007,
RANDBETWEEN likely calls the worksheet RAND function. MS changed the
algorithm for RAND in 2007. It is now supposed to use an algorithm that was
considered to be quite good 25 years ago, but is not considered to be up to
today's standards for serious applications. More disturbing, it does not
appear to be implemented correctly despite being a very simple algorithm.
The original 2007 implementation sometimes produced negative numbers, which
is not possible in the algorithm they intended to use. MS issued a patch
that to resolve the negative number problem but a recent research article
notes that the output of RAND in 2007 is still not consistent with the
algorithm that MS claims to use
http://groups.google.com/group/micro...4bc52422a1ca99
Consequently, no one knows how good or bad the 2007 random number generator
is because no on knows how MS is actually producing its random numbers.

Jerry

"Candicehkjc" wrote:

We use the RANBETWEEN function to generate random numbers, is this function
certified randomness?