Search for question
Question

Linear Regression: Method of Least Squares

Use least-squares regression to fit a straight line to:

x = 0, 2, 4, 6, 9, 11, 12, 15, 17, 19

y = 5, 6, 7, 6, 9, 8, 8, 10, 12, 12

Along with the slope and intercept of the straight line, compute the sum of the squares of the residuals, the standard error of the estimate, and the correlation coefficient. Plot the data and the regression line.

Then, for a given value of x (which may not be among the samples), predict the value of y using the linear regression.

Fig: 1