Re: how to get random numbers from a distribution
- To: mathgroup at smc.vnet.net
- Subject: [mg81513] Re: how to get random numbers from a distribution
- From: Roman <rschmied at gmail.com>
- Date: Wed, 26 Sep 2007 06:44:04 -0400 (EDT)
- References: <fd7s2q$cfd$1@smc.vnet.net>
Oops, sorry, since you're using 5.2 you cannot use the RandomReal command. Change the last line of my post from g/@RandomReal[{0,1},10] to g/@Table[Random[],{10}] Roman. On Sep 24, 10:21 am, tdoxm... at gmail.com wrote: > Hi ya alll > > I am a new Mathematica user. > I have a function that i use to generate a probability distribution > (eg x^2). I want a random number generator, that should generate > values from this probability distribution only, > > I know this Random function in mathematica, that can generate in > particular range, but how do i tell to generate from a particular > distribution. > > I created a list of values using my probability function but not able > to integrate it with Random function so that random numnber takes > value from that list. > > Also I googled and saw some function like RandomChoice and some other > but they are available in Mathematica6 and i use 5.2. > > Can u help with this. > > Thanks in advace