Combining normal distrubutions

382 Views Asked by At

I am not sure of the terminology here, if this is a product, summation, or average.

How can you take a two unimodal normal distributions and combine them into a bimodal distribution? And then combine that with another unimodal to get a trimodal distribution.

Here is a simple paint drawing of what I am after: enter image description here

Granted I know that the two on the left need to have weights to them in order to determine the result. I would like to be able to define my own weights, or just using a 50% weight to each is OK as well.

Once I get my n-modal distribution based on n unimodal normal distributions I hope to create a random number generator that follows this distribution.

1

There are 1 best solutions below

0
On BEST ANSWER

The terminology is a weighted mixture of normal distributions or, in short, a mixture distribution. For a mixture of two normals ($N(\mu_1,\sigma_1^2)$ and $N(\mu_2,\sigma_2^2)$) the density is

$$f(x)=\frac{w \exp \left(-\frac{\left(x-\mu _1\right){}^2}{2 \sigma _1^2}\right)}{\sqrt{2 \pi } \sigma _1}+\frac{(1-w) \exp \left(-\frac{\left(x-\mu _2\right){}^2}{2 \sigma _2^2}\right)}{\sqrt{2 \pi } \sigma _2}$$

where $w$ is the probability of the observation coming from a $N(\mu_1,\sigma_1^2)$ distribution.

To obtain a random sample from the mixture distribution first take a random number from a uniform distribution ($U(0,1)$). If that number is less than $w$, then draw a random sample from a $N(\mu_1,\sigma_1^2)$ distribution. Otherwise take a random sample from a $N(\mu_2,\sigma_2^2)$ distribution.

This generalizes to mixtures of any number of normals and note that a mixture of $n$ normals might have far fewer than $n$ modes.