Not only is the standard deviation smaller than that

Info icon This preview shows pages 3–5. Sign up to view the full content.

View Full Document Right Arrow Icon
diameter of 16 mm. Not only is the standard deviation smaller than that of production line A, but the mean (average), median, and mode of production line B is closer to 16 mm than that of production line A.
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Name: Grant Jensen AERE 161, Spring 2018 HW #6 Due date: 03/07/2018 Problem 14.4 meanw_o_minmax.m function [meanvec_w_o_maxandmin] = meanw_o_minmax(vec) %Grant Jensen, AER E 161, Homework #6, Problem 14.4 %meanw_o_minmax returns the mean of the values in a vector, not including the minimum and maximum values. % To call the function: meanw_o_minmax(vec) % Where vec is a vector [x1, y1] = min(vec); %Finds and gives the coordinates of the minimum value of the vector vec(y1) = []; %Blanks, or removes, the value at the coordinates of the minimum value given by the line above [x2, y2] = max(vec); %Finds and gives the coordinates of the maximum value of the vector vec(y2) = []; %Blanks, or removes, the value at the coordinates of the maximum value given by the line above meanvec_w_o_maxandmin = mean(vec); %This calculates the mean of the vector without it's outliers end twomeans_14_4.m clear,clc %Grant Jensen, AER E 161, Homework #6, Problem 14.4 %Tests the function meanw_o_minmax %Creates a vector of 10 random integers from 0 to 50 vec = randi([0,50],1,10) %Just for fun, this displays the mean of the unedited vector average = mean(vec); fprintf( 'The mean with outliers of the vector vec is: %f\n' ,average) %This next line calls the function meanw_o_minmax and calculates a more %accurate mean, as the outliers are not existent in this one. accuratemean = meanw_o_minmax(vec); fprintf( 'The mean without outliers of the vector vec is: %f\n' ,accuratemean) Output: vec = 33 1 43 47 34 38 37 20 33 8 The mean with outliers of the vector vec is: 29.400000 The mean without outliers of the vector vec is: 30.750000
Image of page 4
Name: Grant Jensen AERE 161, Spring 2018 HW #6 Due date: 03/07/2018 Problem 14.8 clear,clc %Grant Jensen, AER E 161, Homework #6, Problem 14.8 %Mean vs median to replace a test score scores1 = [99,88,95] scores2 = [99,70,77] mean1 = mean(scores1);
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern