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: [mg49974] Re: populate a list with random numbers from normal distribution?
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Sun, 8 Aug 2004 05:38:03 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 8/7/04 at 3:52 AM, sean_incali01 at yahoo.com (sean_incali) wrote:

>Only reason I wanted to use the integers is because of the issues
>raised previously, and because i didn't understand them fully.

>I wanted to pick the integers from a distribution in a range and
>then scale the integers  to make real numbers.

While there are some technical issues with the subtract with borrow algorithm used by Mathematica for reals, these issues don't have any impact on many applications of pseudo-random numbers. Quite possibly by using Mathematica to generate psuedo-random integers then converting these to reals, you are going to a lot of trouble without having any significant effect on your application. Obviously, for me or someone else to determine whether this is the case or not, details of your application are needed which you haven't yet supplied.

>You said the discrete uniform distribution will pick intergers in
>the range {10000,99999}, or any other distribution.

>Will it do normal or poissonian distribution in that range?

I take "it" here to mean Random[Integer,{10000, 99999}]. If this is correct, then the answer to your question is no. Integers uniformly selected in a given range cannot have either a Poisson distribution or a normal distribution. Each of these distributions has different statistical properties, different relationships between say the mean, standard deviation etc.

>if so how do I implement that?

If you need normal deviates then the simplest way to get them would be 

<<Statistics`
Random[NormalDistribution[mean, stdDev]]

or if it is Poisson deviates you need then try

<<Statitistics`
Random[PoissonDistribution[mu]]

Also, do note the Poisson distribution is a discrete distribution, meaning the output of Random[PoissonDistribution[mu]] is an integer. So, starting with uniformly distributed integers and converting these to reals would be counterproductive if what you want are Poisson distributed integers.

If for some reason the algorithms used by Mathematica to generate psuedo-random values are not adequate for your application, then it isn't difficult to implement your own algorithm in Mathematica. Knuth in Seminumerical Algorithms Vol 2 discusses a variety of algorithms for generating psuedo-random values from any desired distribution. But do note there are lot of very bad algorithms that have been used in the past. Writing a good algorithm for generating psuedo-random values and validtating it is definitely a non-trivial exercise.
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: NonlinearRegress
  • Next by Date: Re: Re: 'NonlinearFit` confusion
  • Previous by thread: Re: populate a list with random numbers from normal distribution?
  • Next by thread: Re: Re: populate a list with random numbers from normal distribution?