Finding outliers in a data set. Detecting unusual numbers or outliers in a data set is important in many disciplines, because the outliers identify interesting phenomena extreme events, or invalid experimental results. A simple method to check if a data value is an outlier is to see if the value is a significant number of standard deviations away from the mean of the data set. For example, X is an outlier if Xx - wxl > Nox where wx is the data set mean, ox is the data set standard deviation, and is the number of standard deviations deemed significant. Assign outlierData with all values in userData that are numberStd Devs standard deviations from userData's mean. Hint: use logical indexing to return the outlier data values. Ex: If userData is [9.50, 51, 49, 100 ) and numberStd Devs is 1, then outlierData is (9.100) Function Save C Reset D MATLAB Documentation 1 function outlierData = getOutliers(userData, numberStdDevs) 2 % getOutliers: Return all elements of input array data that are more than 3 % numStdDevs standard deviations away from the mean. 4 5 % Inputs: userData - array of input data values 6 % numberStdDevs - threshold number of standard deviations to determine whether a particular data value is an outlier * Outputs: outlierData - array of outlier data values Assign dataMean with the mean of userData dataMean = 0; Assign dataStdDev with userData's standard deviation dataStdDev = 0; % Assign outlierData with Return outliers outlierData = 0; 21 end Code to call your function C Reset 1 getOutliers (19, 50, 51, 49, 100, 1)

Respuesta :

To assign outlierData with all values in userData that are numberStd Devs standard deviations from userData's mean, check the given code.

What is standard deviation?

A statistic known as the standard deviation, which is calculated as the square root of variance, gauges a dataset's dispersion from its mean. By figuring out how far off from the mean each data point is, the standard deviation can be calculated as the square root of variance.

A higher deviation exists within a data set if the data points are further from the mean; consequently, the higher the standard deviation, the more dispersed the data.

//CODE//

function outlierData = getOutliers(userData, numberStdDevs)

   dataMean = mean(userData);

   dataStdDev = std(userData);

   outlierData=userData(abs(userData-dataMean)>numberStdDevs*dataStdDev);

end

Learn more about standard deviation

https://brainly.com/question/475676

#SPJ4