Bimodal random generation - help

A

abhinay07

Hi,

I would like to generate random values which are in bimodal
distribution. If I can give the two peak means and the variance values,
can I get any function to generate them from the uniform random values.


I have seen how to generate gaussian by BoxMuller method. But am not
finding any way to generate the numbers using bimodal distribution..

Please help me out in this....

Thanks in advance.
Abhi
 
K

Kai-Uwe Bux

Hi,

I would like to generate random values which are in bimodal
distribution. If I can give the two peak means and the variance values,
can I get any function to generate them from the uniform random values.


I have seen how to generate gaussian by BoxMuller method. But am not
finding any way to generate the numbers using bimodal distribution..

Please help me out in this....

Thanks in advance.
Abhi

a) This is not a C++ language question proper and therefore off topic in
this group.

b) As far as I know there is nothing called "the bimodal distribution"
defined by two peak and variance values. The term "bimodal" applies to any
distribution that has two local maxima.

c) D.E. Knuth discusses algorithms of generating random variables with
specified distribution in

D.E. Knuth: The Art of Computer Programming
Vol 2: Seminumerical Algorithms, Chapter 3.4


Best

Kai-Uwe Bux
 
A

Arno

Easy: your bimodal distribution is a mixture of Gaussians. So you
randomly (according to the integrals over the individual Gaussians)
pick one of your sources first and then draw a random value from the
source you picked, which you said you can already do.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,792
Messages
2,569,639
Members
45,353
Latest member
RogerDoger

Latest Threads

Top