 Hello and welcome to the session. In this session we will discuss how to informally assess the fit of a function by plotting and analyzing residuals. In our earlier session we had discussed about the meaning of residual. Let us recall for each data point the residual is given by r i is equal to y minus y hat where y is the observed y value and y hat is the predicted y value of the data point which is predicted by the line of best fit for the x value of the data point. A positive residual indicates that the point lies above the line of fit and a negative residual indicates that the point lies below the line of fit. Let us consider the following static plot whose line of best fit is given by y hat is equal to 0.74x plus 5.46. Now let us calculate the residual. First we will find predicted value of y using given line of fit. Then we shall find residual by using the formula y minus y hat. Now these are the points mentioned in this scatter plot. Now we have written all these points in the form of a table. And now we will calculate the values of y hat by putting these values of x in this equation. And for x is equal to 3 we get the value of y hat as 0.74 into 3 plus 5.46. And this is equal to 2.22 plus 5.46 which is equal to 7.68. So for x is equal to 3 the value of y hat is equal to 7.68. Similarly for x is equal to 7 the value of y hat is 10.64. For x is equal to 8 the value of y hat is 11.4. For x is equal to 11 y hat is equal to 13.6. And for x is equal to 15 y hat is equal to 16.6. Now we have got the values of y hat and we already had the values of y. So now by using this formula for residual which is equal to y minus y hat we will calculate residual for different values of y and y hat. Now for x is equal to 3 we get the value of residual which is given by y minus y hat that is 8 minus 7.68 which is equal to 0.32. So for x is equal to 3 residual is equal to 0.32. Similarly for x is equal to 7 residual is given by 10 minus 10.64 which is equal to minus of 0.64. For x is equal to 8 residual is given by 12 minus 11.4 which is equal to 0.6. For x is equal to 11 it is given by 13 minus 13.6 that is equal to minus of 0.6. And for x is equal to 15 residual is given by 17 minus 16.6 that is equal to 0.4. So for different values of x we have obtained the corresponding values for residual. Now we shall plot the residuals obtained. We will plot the residuals against the x values to form a residual plot. The residual plot will show how it varies about the line of best fit. We draw x values along x axis and values of residual along y axis. Our first residual is 0.32 and its corresponding x value is 3. So we place point at 0.32 when x is 3. Since it is positive so it lies above x axis. The next residual is minus of 0.64 for x is equal to 7. So we place point at minus of 0.64 when x is 7 since it is negative so it will lie below the x axis. Similarly we shall plot the other points. Now we have plotted the other points and we get this residual plot. Now we will analyze this residual plot. The residual plot helps to determine whether it is appropriate to fit a linear model to a data set. If the points are randomly scattered about the x axis with no obvious pattern then it indicates that the data varies randomly about line of best fit and the linear model is appropriate for the data. And if the points in the residual plot form a pattern like a curve and are not random then it indicates that linear model is not appropriate for the data. Now see in this residual plot the points are randomly scattered about x axis not forming any pattern. So linear model is appropriate for the given set of values. Thus in this session we have discussed how to informally assess the fit of a function by plotting and analyzing residuals. This completes our session. Hope you enjoyed this session.