Next: More on Simple Regression Up: Linear Regression Previous: Simple Linear Regression

# Calculating the Least Squares Regression Line

One way to calculate the regression line is to use the five summary statistics , , , , and r (i.e. the mean and SD of X, the mean and SD of Y, and the Pearson correlation between X and Y.) The least squares regression line is represented by the equation

PREDICTED Y = a + b X

where the slope b and intercept a are calculated in the following order:

Consider the Saturn Price data. We let Y=Price and X=Miles since we want to estimate Price given a value of Miles (not vice versa). Calculate and present the summary statistics with the proper X and Y notation, as follows:

                 Car      Miles     Price
(X)       (Y)

1       9300      7100
2      10565     15500
3      15000      4400
4      15000      4400
5      17764      5900
6      57000      4600
7      65940      8800
8      73676      2000
9      77006      2750
10      93739      2550
11     146088       960
12     153260      1025


Using the formulas for slope and intercept of the LS line, we get

so that the regression line is

In terms of the original variable names, we may write the regression line as
PREDICTED PRICE = 8136 -.05127 (MILES)

Next: More on Simple Regression Up: Linear Regression Previous: Simple Linear Regression

2003-09-08