PreviousIndexNext

[help-gsl] Re: sampling mixture distribution (2008-10-02)

From: Rodney Sparapani <rsparapa@.......>
Subject: Re: sampling mixture distribution
Date: Thu, 02 Oct 2008 08:52:58 -0500
To: help-gsl@gnu.org

Jun Yang wrote:
Hi,

How to use GSL to sample from mixture distribution such as a Gaussian
mixture? Thanks.


Best Regards,

Jun Yang

I don't think there is a GSL routine for this. But, that's probably just as well. Normally, the way you do this is you have 3 PRNG streams: a Bernoulli and 2 different Gaussians. If the Bernoulli is zero, then you sample from one Gaussian, otherwise, the other.

Rodney