Re: How to sample a 2-dim. r.v. with known density function?
- To: mathgroup at smc.vnet.net
- Subject: [mg65310] Re: How to sample a 2-dim. r.v. with known density function?
- From: "atul" <atulksharma at yahoo.com>
- Date: Sat, 25 Mar 2006 05:17:46 -0500 (EST)
- References: <email@example.com>
- Sender: owner-wri-mathgroup at wolfram.com
You may find straight-forward rejection sampling rather inefficient. Under the topic of Monte Carlo Simulations, you may have come across reference to the sampling importance resampling (SIR) procedure, which can help, particularly if the rejection method is discarding a large number of candidates. Essentially, you sample from a proposal distribution g(x) as in rejection sampling, but the proposal need not exceed the target distribution f(x) everywhere in this case. It should however have heavier tails. You then resample from the candidates you've collected, weighted by the discrete weights f(x)/g(x), which corrects for the discrepancy between proposal/target. The result is that you're sampling from a discrete probability mass function that approximates the continuous target distribution. Instead of a random number of draws to obtain a sample of size n (rejection sampling), you are now able to specify the number of draws to obtain a sample of size n. Of course, the 'price' is that the method is no longer 'perfect' i.e. you are only approximating your target distribution. If you look up the method, don't confuse it with importance sampling, which is more often intended to reduce the variance of monte carlo estimation procedure. A. "KvS" <keesvanschaik at gmail.com> wrote in message news:dvrbl7$a1l$1 at smc.vnet.net... > 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 >