Q1 . As you already saw in homework 1, using some basic calculus we can show that if we want to fit the simple model to some data points (1, , 1, ), .. , (1, . D. ), the optimal choice offf is (you do not need to show this) Ex (Its, )y, (1) (a) Now consider a Ridge regression problem which requires minimizing E(y, - 8 -8 1, )2 4 8 2. Show that in this case the optimal selection off is En(Its, )y, (2) (b) If the true regression function is in the form of /(x) # of s and we measure the noisy observations y =8 +8 x + , where is a random variable with E = 0, var ( ) = 02, show that ware ) = E= (x + 1 )2 (c) Going through basic steps (you do not need to show this), we can show that for the optimal value off in (1), ware ) can be calculated as ware ) = show (mathematically or discuss technically) that for all A > 0: Q2. In this question we analyze the data file Fertility .cav , which is attached to the homework folder. In this dataset Fertility, the first column, is the response variable, and the other variables are potential predictors. We will use several different statistical modeling techniques. The data set contains 47 rows (samples), split the data into training and test sets . Set the find 30 rows to training samples and the rows 31 through 47 as the best summphs (a) Fil a linear model to the training set, and report the test error (MSE ) obtained (b) Fit a Ridge regression model to the training set, with A chosen by cross-validation. Report the test error obtained. (c) Fil a LASSO model to the training set, with A chosen by cross-validation. Report the ust error oblainal - (d) Fit a PCR model to the training sel, with the number of principal components ( M) chosen by cross-validation. Make sure you set the scale option to TRUE . Report the test error obtained, along with the value of M selected