MathGroup Archive 2009

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

Search the Archive

Re: random variable

  • To: mathgroup at smc.vnet.net
  • Subject: [mg102836] Re: random variable
  • From: Mark Fisher <particlefilter at gmail.com>
  • Date: Sun, 30 Aug 2009 06:04:31 -0400 (EDT)
  • References: <200908280943.FAA11851@smc.vnet.net> <h7b0ak$i7$1@smc.vnet.net>

On Aug 29, 6:36 am, "Tony Harker" <a.har... at ucl.ac.uk> wrote:
>   The best bet is probably the rejection method. Suppose the required
> distribution is p(x). We generate random numbers according to some
> distribution q(x) which need not be normalised (but should be normalisable,
> that is, have a finite integral over the domain of interest) with q(x)>=p(x)
> for all x -- ideally q(x) should be a distribution that has the same general
> shape as p(x), but in extremis we can just use a uniform distribution. This
> function q(x) is called the comparison function. The one thing we need to be
> able to do with q(x) is to generate samples from it (hence common choices
> are the uniform and the normal distribution) Then the procedure is as
> follows:
> a) Select a point from the distribution q(x). This gives a value of x.
> b) Select a value y from a uniform distribution between 0 and q(x).
> c) If y lies below p(x), accept the value of x, otherwise reject it.
> d) Repeat until the required number of x values have been accumulated.
>  Obviously the closer the comparison function q(x) is to the required
> distribution p(x) the more likely step (c) is to accept the point, and the
> less 'wasteful' the process is.
>
>   Tony
>
> ]-> -----Original Message-----
>
> ]-> From: omar bdair [mailto:bdai... at yahoo.com]
> ]-> Sent: 28 August 2009 10:43
> ]-> To: mathgr... at smc.vnet.net
> ]-> Subject:  random variable
> ]->
> ]-> I want to ask, how can I generate a random vaiable from
> ]-> some probability density functions which are not
> ]-> well-known? I mean, if we have some pdf which is not
> ]-> normal, binomial, weibull, ... but the only thing I know
> ]-> that it is a log-concave function, then how can I generate
> ]-> a number of random variables?
> ]->
> ]->
> ]->
> ]->
>
>

As a follow up, since the pdf is log concave, you can use "adaptive
rejection sampling". See

http://www.amsta.leeds.ac.uk/~wally.gilks/adaptive.rejection/web_page/Welcome.html

I don't know if there is an implementation in Mathematica.

--Mark


  • Prev by Date: Re: Problem with ColorFunction in ListDensityPlot in
  • Next by Date: Coupled Diff Eqs or Poisson Eq, is symbolic solution possible?
  • Previous by thread: Re: random variable
  • Next by thread: Re: random variable