Question: 3): Solve the following problem manually, analytically as well as using MATLAB Code : Question 2(a): In a 10-week typing class for beginners, the average

 3): Solve the following problem manually, analytically as well as using

3): Solve the following problem manually, analytically as well as using MATLAB Code : Question 2(a): In a 10-week typing class for beginners, the average speed per student (in words per minute) as a function of the number of weeks in class, after weeks 1, 4, 7 and 10, is given in the following table: The typing institute wants to fit a straight line relationship: y^=ax+b, to the above data. Determine the coefficients a and b so that the straight line best fits the data, by: a) Minimizing the 2-norm of the error (standard linear regression). b) Minimizing the -norm of the error. In this case, the optimization problem can be written as a linear programming problem, as was discussed in class during one of the initial lectures on examples of optimization problems. Solve the resulting linear programming problem using the Simplex method. When using the big M approach, use a high numeric value of M( e.g. M=100). Note that the error is defined as the actual y from the table above minus the y^ predicted by the straight line relationship. Graphically compare the two solutions, by plotting the two lines in different colors. In the same plot, also show the original data as a scatter plot. Put legends, and x and y axes labels, in your figure. Also report the 2-and the -norms of the errors for each of the two lines. Luestion 2(b) : Write a generalized MATLAB Code for Question 2(a) part (b) , which can handle N data points nstead of four data points, as currently given). Luestion 2(c) : Determine the coefficients a and b by minimizing the 1-norm of the error

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!