Home Links Resources Bookshelf Tutorials Sabermetrics Data
DR. JOHN RASP'S STATISTICS WEBSITE
BSAN 179 STAT 301 SPTB 345 STAT 440 STAT 460 Minor

STAT 440 - Forecasting
Lecture Review - Least Squares
SOLUTIONS

This page gives detailed solutions on the lecture review assignment on least squares. You should of course make a diligent effort to obtain these solutions on your own before consulting this solution page. You learn from what you do, far more than from what you read. But this information is presented so you can check the details of your work.

The form of the model now is

Y = beta1*X + epsilon

which means that the error term is

epsilon = Y - beta1*X

and so the Sum of Squares for Error (SSE) is

SSE = SUM:[Y - beta1*X]^2

We want to find the value of β1 that minimizes SSE. To do so, we take the derivative:

deriv = 2*SUM(Y - beta1*X)^1 * (-X)

The least squares estimate of β1 is found by setting this derivative equal to zero:

2*SUM(Y - beta1*X)^1 * (-X) = 0

SUM(XY) - beta1*SUM(X-sq) = 0

SUM(XY) = beta1 * SUM(X-sq)

And hence the slope of an interceptless linear regression model is found by

SUM(XY) / SUM(X-sq)


This website maintained by John Rasp. Contact me via email: jrasp@stetson.edu