Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

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




  • Prev by Date: Re: options for PDF export, where are they listed??
  • Next by Date: Re: Nullcline and getting "2" values for y
  • Previous by thread: Re: how to get random numbers from a distribution
  • Next by thread: Re: how to get random numbers from a distribution