MathGroup Archive 2006

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

Search the Archive

Re: How to sample a 2-dim. r.v. with known density function?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65280] Re: [mg65247] How to sample a 2-dim. r.v. with known density function?
  • From: "Dr A.H. Harker" <a.harker at ucl.ac.uk>
  • Date: Thu, 23 Mar 2006 06:58:51 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Dear Kees,

         Unless you are really lucky and there is some analytic form you can
use, the best bet may be a rejection method. Here you generate pairs from
some distribution that is available (if the worst comes to the worst, a
scaled uniform distribution) po(x,y) that is everywhere above your desired
distribution p(x,y). This means it need not be a normalised distribution
(though it must be normalisable). You then accept or reject the point you
generate by comparison with p(x,y): 
  for the point (x,y) generate a sample z from a uniform distribution in the
    range 0 to po(x,y)
  accept the point if z < p(x,y), otherwise accept it

    Tony

  
Dr A.H. Harker
Department of Physics and Astronomy
University College London
Gower Street
London
WC1E 6BT



]->-----Original Message-----
]->From: KvS [mailto:keesvanschaik at gmail.com] 
To: mathgroup at smc.vnet.net
]->Subject: [mg65280] [mg65247] How to sample a 2-dim. r.v. with known 
]->density function?
]->
]->Hi all,
]->
]->I guess the title explains it already, I have a 2-dim. 
]->density function (the joint density of a geometric Brownian 
]->motion with drift and its running maximum to be more 
]->precise, explicit formula can e.g. be found
]->here: www.maths.ox.ac.uk/~hambly/PDF/O10/lecture15.pdf) and 
]->now I would like to generate random pairs according to this 
]->density. I'm not even sure whether a general method for 
]->doing this exists, is anybody familiar with a method that I 
]->can either implement myself in Mathematica or built-in stuff 
]->that can be used to do this?
]->
]->Lots of thanks in advance,
]->
]->- Kees
]->
]->


-- 
This message has been scanned for viruses and
dangerous content by the UCL virus scanning system, and is
believed to be clean.


  • Prev by Date: Re: sorting list of roots af a transcendental function
  • Next by Date: Re: Grouping similar indices together in an expression
  • Previous by thread: Re: How to sample a 2-dim. r.v. with known density function?
  • Next by thread: Re: How to sample a 2-dim. r.v. with known density function?