OHH I am sorry am using python programming version 27 Write

OHH, I am sorry. am using python programming (version 2.7).

Write a function (normal(x, m_n, sigma)) to printout values of the normal probability function (y=1/sigma squareroot2pi exp [-1/2(x-mu/sigma)^2] at n equally spaced points on an interval (a, b). Ex: (mu, sigma)=(0, 1); (a, b)=(-3, 3);n=10

Solution

#Solution

import numpy as np
points=np.linspace(3,3,10) # interval(3,3), n=10 points
mu=float(input(\"Enter mu value: \");
sigma=float(input(\"Enter sigma value: \");
for X in range(1,len(points)):
Y=(1/sigma*sqrt(2*3.14))* exp(-0.5*pow(((X-mu)/sigma)),2)
print(Y)

OHH, I am sorry. am using python programming (version 2.7). Write a function (normal(x, m_n, sigma)) to printout values of the normal probability function (y=1/

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site