powered by
rmix.norm(n, alpha, mu, sigma = rep(1,length(alpha)))
#generate a random sample from a 2 component normal mixture, #plot the histogram of the data. x <- rmix.norm(200,c(0.3,0.7),c(-1,2),c(1,2)) hist(x)
Run the code above in your browser using DataLab