Bad random number generator : Microsoft Excel (office XP)

From: simon plouffe (simon.plouffe_at_sympatico.ca)
Date: 06/10/04


Date: 10 Jun 2004 12:52:28 -0700

Hello,

 I was conducting some tests with the built-in
random number generator of Excel.

I asked 4 runs of 30,000 random numbers between 0 and 1.

It has some limitations of course since a column can hardly
have more rows anyway, if you ask for 1 million entries the
program is too dumb to figure out to spread the results on
many columns, so you have to split the thing in many parts.
In principle this works since it apparently make a different
run each time BUT...!

There is a little surprise with this.

Actually it does not look really a good random number generator
because of this.

- There are 120,000 entries but only 3037 are different, in other
words it did pick up the same number up to 15 times!
- The precision is suppossedly of 15 digits but according to the
choice of different values I bet one could find the generator by
doing a reverse engineering on it, ;-)
- It did pick up the number 1 , 2 times.

I think that this is BAD, how a random number generator
can pick up the same values so many times at a precision
of 15 digits : this is impossible.

Did someone ever tested this particular bad program and
if so, does anybody has any idea what is the formula
or algorithm they (Bill Gates and Co.) use?

I suspected that Excel and Microsoft are not so advanced
, I had no idea it was so bad, this is Mickey Mouse Mathematics!

I use the latest version of Excel with Windows XP, service
pack 1 and Office XP.

If you want to do a simulation and you use Excel? : bad idea.

ps: I should send this to D.E. Knuth!

Simon Plouffe



Relevant Pages

  • Bad random number generator : Microsoft Excel (office XP)
    ... Actually it does not look really a good random number generator ... The precision is suppossedly of 15 digits but according to the ... I suspected that Excel and Microsoft are not so advanced ...
    (sci.math.symbolic)
  • Re: Bad random number generator : Microsoft Excel (office XP)
    ... >random number generator of Excel. ... >It has some limitations of course since a column can hardly ... >- The precision is suppossedly of 15 digits but according to the ...
    (sci.math)
  • Re: Random Number Generator Problem
    ... I think there's another article explaining that Excel 2004 has further ... refinements to the random number generator. ... Jim Gordon MVP wrote: ... >>Note, however, that for serious statistical work, the ATP RNG is pretty ...
    (microsoft.public.mac.office.excel)
  • Re: Random Number Generation Dialog Box
    ... >> Am using Excel 2001 and want to generate some random numbers from a normal ... >> distribution. ... A help search tells me about what looks like a wonder dialog ... > Be aware, however, that the ATP's pseudorandom number generator is not ...
    (microsoft.public.mac.office.excel)
  • Re: Bad random number generator : Microsoft Excel (office XP)
    ... note 'On the Reliability of Microsoft Excel XP ...' ... > I was conducting some tests with the built-in> random number generator of Excel. ... > I think that this is BAD, how a random number generator> can pick up the same values so many times at a precision> of 15 digits: ...
    (sci.math)