Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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,

image text in transcribed
image text in transcribed
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, 16) # This will use in b c d e f for the power of 2
Can you help me solve this with python? Thanks.
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

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

Step: 3

blur-text-image

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

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

A 300N F 30% d 2 m Answered: 1 week ago

Answered: 1 week ago