Question: 4. (7 points) In Lecture 12, we viewed both the simple linear regression model and the multiple linear regression model through the lens of linear


4. (7 points) In Lecture 12, we viewed both the simple linear regression model and the multiple linear regression model through the lens of linear algebra. The key geometric insight was that if we train a model on some design matrix X and true response vector Y, our predicted response = X0 is the vector in span(X) that is closest to Y. In the simple linear regression case, our optimal vector 6 is = [9]3, 9"1], and our design matrix is 1 I 1 Iy | | X= . = Il-n X:,l . | . . . o bl s This means we can write our predicted response vector as = X il = Ooly + 01X 1. 1 In this problem, 1,, is the n-vector of all 1's and X, ; refers to the n-length vector [z1,zg, ..., 2] Note, X, ; is a feature, not an observation. For this problem, assume we are working with the simple linear regression model, though the properties we establish here hold for any linear regression model that contains an intercept term. Ll -~ (a) (3 points) Explain why " e; = 0 using a geometric property. (Hint: & = Y, and i=1 = [e1, 2, ..., e, . Think about how orthogonality applies here.) T (b) (2 points) Similarly, explain why 3 e;z; = 0 using a geometric property. (Hint: Your i=1 answer should be very similar to the above.) () (2 points) Briefly explain why the vector Y must also be orthogonal to the residual vector
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
