# Draw random samples from a mixture of two equally likely Poisson
# distributions, one with mean = 1, and the other with mean = 10
x <- rpoismix(200, c(0.5, 0.5), c(1,10))
hist(x, probability=TRUE)
lines(density(x), col='red')
Run the code above in your browser using DataLab