powered by
rmix.pois(n, alpha, theta)
#generate a random sample from a 2 component Poisson mixture, #and compute the sample mean and variance. x <- rmix.pois(200,c(0.3,0.7),c(2,5)) mean(x) var(x)
Run the code above in your browser using DataLab