EDP 660 LEAST SQUARES HANDOUT In order to use simple linear regression to predict Y from X, we need to:1. Make sure the model is reasonable- The points on the scatterplot should fall around a straight line.2. Estimate ob and 1b from the data-y b b Xo^ 1 is the sample regression line- Equivalent to drawing a straight line through the data on the scatterplot- We choose the values of b’s to minimize2^yy, sum of squared errors.We call this the method of least squares.Example:In a very small scale study of persistence, an experimenter gave three subjects a very difficult task. Data on the age of the subject (X) and on the number of attempts to accomplish the task before giving up (Y) follow:Subject i 1 2 3Age Xi20 55 30Number of attempts Yi5 12 10To find “good” estimators of the regression parameters β0 (y-intercept) and β1 (slope), first graph the sample data as a scatterplot.Filling in the table below, we will calculate the line (Xbbyo 1^) through the above points for which the SSE is a minimum (least squares line, regression line, or least squares prediction equation.) xyxy)( xx 2)( xx )( yy ))(( yyxx Σ = Σ= Σ=Now calculate the following using the values from the table:slope: 21xxyyxxby-intercept: b y b xo 1So, the least squares line for these data is:Now using that formula, calculate the following:xyyˆ^yy2^ yyΣ= Σ= Σ=Finally, fill in the above dialogue boxes with the corresponding terms:SSxxSSxy ErrorSum of Errors (SE)Sum of Squared Errors
View Full Document