#Data for problem 2 age.veh <-c(2.07,4.28,2.43,4.24,1.52,7.48,1.55,4.95,12.22,0.68,9.58,4.19,9.86,1.95,6.49,9.03,10.62,5.37,2.43,4.80,10.95,0.54,5.34,8.37, 11.09,9.16,1.07,9.86,6.11,7.79,0.90,8.05,8.18,9.05,10.26,10.33,8.75,9.60,6.50,6.53,12.14,4.18,3.93,5.39,7.03,3.42,7.63,8.56,1.57,8.74) claim.amt <-c(32.158,17.333,24.626,34.212,27.237,22.989,29.699,24.645,16.252,40.845,23.610,20.053,18.934,26.811,20.895,18.507,13.311,18.895, 32.832,24.098,18.407,50.508,18.726,17.957,25.952,18.037,32.998,19.124,17.817,21.987,36.295,22.137,13.967,26.902,16.806,18.110, 27.802,17.959,24.661,21.244,17.785,23.572,28.522,18.877,21.419,22.244,20.068,21.061,29.754,20.512) y <- claim.amt x <- age.veh X <- cbind(rep(1,times=length(x)), 1/sqrt(x)) # Data for Problem 3 # y is sugar content (in grams) # x is calories y <- c(17.7, 24.1, 18.2, 21.0, 18.5, 19.6, 22.6, 16.1, 17.2, 12.4, 11.3, 11.8) x1 <- c(200, 210, 160, 190, 200, 185, 220, 205, 210, 195, 185, 204)