MathGroup Archive 2006

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

Search the Archive

A conditional random number generation problem (please help me!)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65650] A conditional random number generation problem (please help me!)
  • From: "rjmachado3" <rjmachado3 at portugalmail.pt>
  • Date: Wed, 12 Apr 2006 05:59:58 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

I need to know the formula for the random function that return random
numbers in a range of a and b integers [a,b] but that obey on a custom
probability (possibly different!) for each integer number on this [a,b]
range (of course the sum of all integer number probabilities are = 1!).
Finally, what i want is the general function formula that simulate the
random behavior (based on a custom probability value for each integer
number between the [a,b] range. confuse? i hope not! please help me!!!!

what i know so far is that the function formula for generating a "pure"
random number between [a,b] range is:

rand()*(b-a)+a

where rand() return a random number between 0 and 1.


  • Prev by Date: Re: Flatten and BlockProcessing
  • Next by Date: Re: Flatten and BlockProcessing
  • Previous by thread: Re: Reaction-diffusion PDEs
  • Next by thread: Re: A conditional random number generation problem (please help me!)