Question: Suppose you needed to generate a Gaussian ( normal ) distribution ( , | ) = 1 2 2 e - ( x - )
Suppose you needed to generate a Gaussian normal distribution
of random variates, but the only random number generator you know about
is numpy.random.uniform However, assume you do know about the central
limit theorem. Create a Python script
gengauss.py which does the following:
Reads and from the command line. Be sure that your script checks that
it has the proper inputs, and prompts the user if not.
Uses the central limit theorem to generate values of having the proper
distribution, using only random numbers from numpy.random. uniform
Creates a plot in the file gengauss.png showing a histogram of values with
the superimposed.
Be sure the distribution you generate has mean and width as specified on the command
line.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
