Question: Show me the steps to solve Exercise 2 ( Gaussian Distribution ) Coding Use python or R , for creating functions ( or methods )

Show me the steps to solve Exercise 2(Gaussian Distribution) Coding
Use python or R, for creating functions (or methods) to calculate the Gaussian
Distribution for random data (x) that is generated by the following f(x).
f(x)=12+ cosine(x 2)80
x= f(x)
(8)
In your source code, you should:
1. generate random seeds for the variable x to be in the range of 0 and 1
(Hint: you might use linspace from np package in python), the size of
the seeds can be defined in the functions argument (could be any value
>1).
2. use (8) to generate x using the random seeds x obtained from requirement
1 above.
3. transfer the x into a normal distribution using the Gaussian distribution
formula (9):
p(x)= N (x|,\sigma 2
)=1
\sigma
2\pi
exp(x)
2
/2\sigma
2
(9)
4. plot the normal distribution using x in the X axis and Gaussian distribution results in the Y axis. (Hint: for creating a smooth curve, you may
consider using make interp spline from Scipy package in python. Also,
before plotting the normal distribution, sort x for a nice chart!)

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