Question: Can you please help with this Matlab problem? PROBLEM 4. points 20 Use MATLAB Linear regression can be extended to data that depend on two
Can you please help with this Matlab problem?
PROBLEM 4. points 20 Use MATLAB Linear regression can be extended to data that depend on two or more variables (called multiple linear regression). If the dependent variable is z and independent variables are x and y, the data to be fitted are in the form (Li, Yi, zi), i = 1,..., n. Instead of a straight line, the fitting function now represents a plane: f(x, y, z) = a + bx + cy (3) Your tasks: n a. 10 points. Show that the normal equations for the coefficients are : Axi Dr Xiyi Yi Xiyi ? Yizi (4) b. 10 points. Develop a MATLAB function for the bi-linear regression as described by the linear system of equations (4). Your function should have the following form: [ abc, r2 ] = myBilinearRegression( x, y, z) where x, y are the vectors of the independent variables, z the vector of the dependent variable, r2 is the coefficient of determination, and abc is the output table or array that collects the coefficients a, b, c of the bi-linear fit (3) PROBLEM 4. points 20 Use MATLAB Linear regression can be extended to data that depend on two or more variables (called multiple linear regression). If the dependent variable is z and independent variables are x and y, the data to be fitted are in the form (Li, Yi, zi), i = 1,..., n. Instead of a straight line, the fitting function now represents a plane: f(x, y, z) = a + bx + cy (3) Your tasks: n a. 10 points. Show that the normal equations for the coefficients are : Axi Dr Xiyi Yi Xiyi ? Yizi (4) b. 10 points. Develop a MATLAB function for the bi-linear regression as described by the linear system of equations (4). Your function should have the following form: [ abc, r2 ] = myBilinearRegression( x, y, z) where x, y are the vectors of the independent variables, z the vector of the dependent variable, r2 is the coefficient of determination, and abc is the output table or array that collects the coefficients a, b, c of the bi-linear fit (3)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
