In this Python exercise we generate independent 1000 exponential random variables

| August 30, 2017

Question
In this Python exercise we generate independent 1000 exponential random variables with mean 2 from independent 1000 uniform random variables on (0, 1) by the following steps.

(a) Use Python to generate the independent 1000 uniform random variables (say U1, . . . , U1000) on (0,1).

(b) Find the inverse function F ?1 (ยท) of the cumulative distribution function F (x) = 1 ? exp(?(1/2)x) , x > 0 of exponential distribution with mean 2 , that is, F ?1 (F (x)) = x for x > 0 .

(c) Using the result of the previous problem, generate exponential random variables (e1, . . . , e1000) in Python by

ek := F?1(Uk); k = 1,…,1000.

This method is called the inversion method. (Hint: Read section 11.2.1).
(d) Using Python compute mean and variance of (e1, . . . , e1000) , and then plot its histogram.

Get a 30 % discount on an order above $ 5
Use the following coupon code:
CHRISTMAS
Order your essay today and save 30% with the discount code: CHRISTMASOrder Now
Positive SSL