Question: Work on the following items step by step. a. Write a function (name it outlier_remover) that will first detect the values beyond +2 standard deviation
Work on the following items step by step.
a. Write a function (name it outlier_remover) that will first detect the values beyond +2 standard deviation of the mean for each numeric variable in a .csv data file, and then delete the rows including these values in each numeric variable. Note that if a variable has a data type other than numeric type, function should not perform any operation for that variable.
b. Use promotion.csv file to test your function. After removing the outliers, how many observations do you have in your data set?
Step by Step Solution
3.53 Rating (163 Votes )
There are 3 Steps involved in it
a Write a function name it outlierremover that will first detect the values beyond 2 standard deviat... View full answer
Get step-by-step solutions from verified subject matter experts
