Answered step by step
Verified Expert Solution
Question
1 Approved Answer
use python to solve this. (Playing with Array and Probability Theory) Greetings Students. Do not panic after watching the btle of this lab. We are
use python to solve this.
(Playing with Array and Probability Theory) Greetings Students. Do not panic after watching the btle of this lab. We are not going to teach you probability theory in depth (at least not in this labll!). In this lab, we will play with numbers and arrays. In this lab, you are going to implement something trom the scratchlll The lab task is divided into three parts. What are the parts!! 1. You need to lind the mean of a series of numbers stored in an array. 2. You need to calculate the sample standard deviation of those numbers. 3. You need to create a new array where you will cnly store the numbers that are at least 1.5 standard deviations away from the mean. If you are wondering 1 dont know all the theories for calculating all these mean and standard deviations!lel" Just spare some time to follow the inks: - How ro calculate the mean and standard deviation: hittosvigoutubenlaTFpD-uzpel - How to find numbers that are a certain Standard Devation away from the mean. HHesiloulu beive-F2D_REtE - Mean calculation: bllbgilhowmathsialunicomimean.bitm - Standard deviation calculation: HHllpsinmwimathsisfurcoamidatastandard-deviation-formulas.hitmi (Use Sample standard Deviation Fomula (N1)) For example, if you are dealing with an array with the following numbers: [10,8,13,9,14,25,5,20,7,7,4] The mean of the numbers is: 10.181818181818 The standard deviation is: 7.96 New array: [25, -5] Explanation: The mean of the numbers is 10.18 and the standard deviation is 7.96. Only 25 and 5 are at least 1.5 standard deviations away from the mean. And so the new array's length is 2 and only two ilems are copied. Hints to implement this program: 1. Create a function that will take an array and return the mean of the values 2. Create a function that will take an array and fetum the standard deviation of the values 3. Create a function that will take an array and create a new array whose length will be the total number of values of the afray which are 1.5 standard deviations away from the mean of that array. Finally. return the new array. If there is no such value then retum None. 4. Write the driver code and call the above-crealed functions. You can use an array with your preferable length and values to test your programStep 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