Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In [ 1: In [ 1: In [ 1: In [ 1: In [ 1: In [ ]: 4d) - QUESTION Define a function, my_sd()
In [ 1: In [ 1: In [ 1: In [ 1: In [ 1: In [ ]: 4d) - QUESTION Define a function, my_sd() , which accepts a single argument named x . That argument may be assumed to be a list of numeric values (integers or floats). The my_sd() function must return the sample standard deviation of the values in the x list. Test your function works correctly by printing the standard deviation of [1, 2, 3] to the screen. HINT: How can you use your my_variance() function to easily calculate the standard deviation? 4d) - SOLUTION def my_sd(x): # remove this line and the next line before adding your code raise NotImplementedError ### type your code to test your function here 4e) - QUESTION Let's now use the my_sd() function to calculate the standard deviation of the elementsin x_list . You must use a list comprehension to apply my_sd() to each elementin x_list . Assign the result to the X_sds object. Display the x_sds object to the screen. 4e) - SOLUTION # remove this line and the next line before adding your code raise NotImplementedError ### type your code to display the x_sds object here 4f) - QUESTION Which of the elements in x_list has the largest standard deviation? Does the result make sense based on the values contained in x_1list ? 4f) - SOLUTION In [ 1: ### write your answer here [ ] : # You will work with the following object for the first few questions in this assignment. _list = [ list(range(6) ), 3 * [10, 11, 12, 13] + [20, 21, 22, 23], [-100, -50, -25, 0, 25, 50, 100], list ( range (10, 25) ), 2 * [-11, -12, -13, -14, -15] ]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started