used to inspect whether the assumptions on the errors {ei are satisfied figure gives two such plots the first is scatterplot of the residuals {ei against the fitted valuesb yi when the model assumptions are validthe residualsas approximations of the model errorshould behave approximately as iid normal random variables for each of the fitted valueswith constant variance in this case we see no strong aberrant structure in this plot the residuals are fairly evenly spread and symmetrical about the line (not shownthe second plot is quantile-quantile (or qqplot this is useful way to check for normality of the error termsby plotting the sample quantiles of the residuals against the theoretical quantiles of the standard normal distribution under the model assumptionsthe points should lie approximately on straight line for the current case there does not seem to be an extreme departure from normality drawing histogram or density plot of the residuals will also help to verify the normality assumption the following code was used plt plot(fit fittedvalues ,fit resid ,'plt xlabel (fitted values "plt ylabel (residuals "sm qqplot (fit resid sample quantiles residuals fitted values theoretical quantiles figure leftresiduals against fitted values righta qq plot of the residuals neither shows clear evidence against the model assumptions of constant variance and normality variable selection among the large number of possible explanatory variableswe wish to select those which best explain the observed responses by eliminating redundant explanatory variableswe reduce the statistical error without increasing the approximation errorand thus reduce the (expectedgeneralization risk of the learner in this sectionwe briefly present two methods for variable selection they are illustrated on few variables from the data set birthwt discussed in section the data set contains information on the birth weights (massesof babiesas well as various characteristics of the mothersuch as whether she smokesher ageetc we wish to explain the child' weight at birth using various characteristics of the motherher family historyand her behavior during pregnancy the response variable is weight at birth (quantitative variable bwtexpressed in grams)the explanatory variables are given below