Question: 1. Task #1: Identify MPG vs. weight using a simple linear regression. You need to a. Provide a mathematical expression of the regression function with

1. Task #1: Identify MPG vs. weight using a simple linear regression. You need to a. Provide a mathematical expression of the regression function with all the coefficients b. Write a matlab program to implement the simple linear regression and c. Plot the results in matlab figure. 2. Task #2: Identify MPG vs. two factors (weight and horsepower) using a multiple regression model. You need to a. Provide a mathematical expression of the regression function with all the coefficients b. Write a matlab program to implement the multiple regression function, and c. Plot the results in matlab figure. load carsdata whos isdata = isfinite (MPG) &isfinite (Weight) &isfinite (Horsepower); y = MPG (isdata): x = Weight (isdata); N = length (y) clf subplot (2,2,1) plot (x, y,'*') xlabel('weight (lbl') ylabel (MPG)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
