Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: populate a list with random numbers from normal distribution?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg49998] Re: populate a list with random numbers from normal distribution?
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Tue, 10 Aug 2004 06:02:55 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 8/9/04 at 9:44 AM, drbob at bigfoot.com (DrBob) wrote:

>RandomArray is (potentially) different for every distribution,

Yes, particularly when RandomArray is faster than generating the same number of randoms with Random 

>and I seem to recall it behaved better than Random for SOME
>distribution, possibly the Normal?

It seems reasonable RandomArray should behave differently than Random in those cases where it offers faster performance. But it would be difficult to verify it has better behavior. Doing testing on random number generators tends to be quite time consuming.

And there is the additional difficulty that most (all?) of the standard test suites are designed to test uniform deviates. For example, how would the Birthday Spacing test the subtract with borrow algorithm used by Mathematica fails be applied to say an expoential distribution? 

The most obvious way to apply the Birtday Spacing test to an exponential distribution, would be to transform the exponential deviates to uniform deviates using 1-Exp[-a x] where x is the exponenetial deviate. But when the exponential deviate is generated usign -a Log[Random[]], it is clear using 1-Exp[-a x] will result in the same problem with the Birthday Spacing test as Random has.

I think all of the deviates generated by RandomArray utilize in some way Random. So, problems with Random should show up in any of the other distributions as well although probably not in an obvious way. It seems to me for *very critical* applications, it would be necessary to replace Random. But I also strongly beleive for most applications, Random and RandomArray has they are now are quite adequate. And it is definitely true, replacing Random is quite likely to result in worse performance unless you really know what you are doing. 
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: Re: Reduce/Solve
  • Next by Date: Re: Reduce/Solve
  • Previous by thread: Re: Re: populate a list with random numbers from normal distribution?
  • Next by thread: NonlinearFit