Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Probability

Authors: Mark Daniel Ward, Ellen Gundlach

1st edition

716771098, 978-1319060893, 1319060897, 978-0716771098

More Books

Students also viewed these Mathematics questions

Question

=+b. What countries are members of OPEC?

Answered: 1 week ago