Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

Re: Pseudo-Random Numbers??

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

On 2/22/05 at 4:23 AM, rak at dami-rz.pl (rafal rak) wrote:


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

>Does anyone have code for generate Pseudo-Random Numbers

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

><http://www.mathstatica.com/examples/>

>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

<<Statistics`;
Random[NormalDistribution[0,1]]

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