Suppose I have an exponential distribution with rate 0.5 and n=1000 together with a uniform distribution between 0 and 1. And I also need to draw a histogram. Write the R code.
The R code I wrote is :
Just wanna know whether my R code is correct? Do I need to perform the inversion method here?