Skip to contents

Generate mix gaussian random numbers whose density is: $$\frac{0.3}{\sqrt{2 \pi 0.5^2}} \exp\left(\frac{(x+1)^2}{2 \cdot 0.5^2}\right) + \frac{0.7}{\sqrt{2 \pi 0.5^2}} \exp\left(\frac{(x-1)^2}{2 \cdot 0.5^2}\right)$$.

Usage

mix2gauss_gen(n = 100, seed = NULL)

Arguments

n

The number of random numbers.

seed

A seed for random number generator.

Value

A numeric vector of random numbers whose a density is described in Description.

See also