Question: we introduced 2 dif- Generating Gaussian Random Variables ferent algorithms to generating Gaussian random variables: (i) Inverse Method with approx- imated inverse CDF; and

we introduced 2 dif- Generating Gaussian Random Variables ferent algorithms to generating Gaussian random  

we introduced 2 dif- Generating Gaussian Random Variables ferent algorithms to generating Gaussian random variables: (i) Inverse Method with approx- imated inverse CDF; and (ii) A-R Method using exponential as proposed distribution. (a) Implement the two methods in Python. (b) Verify your implementation as follows. Using your codes to generate 10,000 samples from the standard Gaussian distribution. Compare the histogram of the simulated data with the density of standard Gaussian. (c) Generate 100,000 samples using the two methods you have implemented and the function numpy.random. normal(), respectively. Compare their computation times. Can your implementation beat the numpy function?

Step by Step Solution

3.49 Rating (152 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

This question is about generating Gaussian random variables using two different methods ... View full answer

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 Programming Questions!