Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help code the following using python with NumPy Library. Thank you. Using numpy and/or scipy, simulate 1000 draws from a Gaussian random variable with

Please help code the following using python with NumPy Library. Thank you.

image text in transcribedimage text in transcribedimage text in transcribed

Using numpy and/or scipy, simulate 1000 draws from a Gaussian random variable with mean =2 and variance =2. From these 1000 samples, estimate the (sample) mean and (sample) variance. Do you achieve numbers close to the correct values? What happens to these estimates if you change the number of samples drawn from the distribution? [ ] Using your samples from above, estimate the following P(00otherwise And has is governed by single parameter . Plot the probability density function of the exponential distirbution with =0.1,1, and 4 . Overall all of the pdfs on the same plot. The package scipy has easy ways to generate pdfs from different distributions. Use google to help you here! [ ] Now, draw 5 samples from the exponential distribution, calculate the sample mean and the sample standard deviation from the samples. You should be able to find a function in numpy to generate samples from an exponential distribution with parameter lambda The central limit theorem Do the above process (drawing five samples from an exponential distribution and calculating the sample mean and sample standard deviation) 1000 times. Make an numpy array of all 1000 of the means and standard deviations and generate a histogram for each (you may use plt.subplot for each of these histograms). [ ] Do the same for 10 samples, and 50 samples. Generate histograms of the 1000 means and standard deviations from the samples. What do you notice about the histogram of the means? [] ] Finally, using the list of means generated from the 50 sample example, check to see if this distribution of means is in agreement with the central limit theorem. Explain your answer in a few sentences. [ ]

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

Database Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

More Books

Students also viewed these Databases questions