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