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

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 := F1(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.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!