MathGroup Archive 2005

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

Search the Archive

Re: Pseudo-Random Numbers??

  • To: mathgroup at
  • Subject: [mg54582] Re: Pseudo-Random Numbers??
  • From: Bill Rowe <readnewsciv at>
  • Date: Wed, 23 Feb 2005 03:12:08 -0500 (EST)
  • Sender: owner-wri-mathgroup at

On 2/22/05 at 4:23 AM, rak at (rafal rak) wrote:

>Hello; I have a problem with program to generate Pseudo-Random

>Does anyone have code for generate Pseudo-Random Numbers

>for any distribution  f(x). Here is an example for this,


>but they use special package (I don't have it)

Although I did not check the URL, I would assume the package being used is mathStatica which offers a variety of enhancements over the statistical routines that are distributed with Mathematica.

The simplest way to generate pseudo-random numbers would be to use the standard add-ons. For example, if I wanted pseudo-random numbers from a normal distribution I would do


Similar syntax works for a number of common distributions.

If you need something other than one of the distributions available, then you will need to write your own code.  Vol 2 of Knuth's Seminumerical Algorithms describes a number of ways to generate pseudo-random numbers from arbitrary distributions. 
To reply via email subtract one hundred and four

  • Prev by Date: Re: pattern matching all list elements but last
  • Next by Date: Re: pattern matching all list elements but last
  • Previous by thread: Re: Pseudo-Random Numbers??
  • Next by thread: SparseArray and ListInterpolation