Question: Given the code that mu = 85 sigma = 8.3 integrand = lambda x: np.exp(-(x-mu)**2/(2*sigma**2))p.sqrt(2*np.pi*sigma**2) left = 110 right = 130 power = -np.linspace(1, 16,

2. The birth weight of newborn kittens is normally distributed with a mean of =85 grams (wow, so small!) and a standard deviation of =8.3 grams. To compute the probability that a randomly selected newborn is a big one with weight between 110 grams and 130 grams, you would compute the integral S=110130221e(x)2/(22)dx (a) Use scipy.integrate. quad function to calculate the "true" value of S. Save your answer to the variable A11. (b) Use the left-sided rectangle rule to approximate S with step sizes of h=21,22,,216. Save the approximations in an array with 16 elements and save that to the variable A12. (c) Repeat part (b) with the right-sided rectangle rule. Save the result to the variable A13. (d) Repeat part (b) with the midpoint rule. Save the result to the variable A14. (e) Repeat part (b) with the trapezoidal rule. Save the result to the variable A15. (f) Repeat part (b) with Simpson's rule. Save the result to the variable A16
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
