The Essentials of Biostatistics for Physicians, Nurses, and Clinicians

(Ann) #1
7.3 Simple Linear Regression and Least Squares Estimation 101

Figure 7.2. Scatter plot for six observations illustrating regression line and residuals.

Y


Y Intercept

X


Y- Y

(X,Y )

7.3 SIMPLE LINEAR REGRESSION AND


LEAST SQUARES ESTIMATION


A scatter plot of six points with a line fi t through it is illustrated in
Figure 7.2 , taken from fi gure 12.3 from Chernick and Friis ( 2003 )
The least squares solution for the slope and intercept is the one (the
solution is not always unique) that picks a value for “ b , ” the slope
estimate, and “ a , ” the intercept estimate, so that. Now b is related to r
as we shall show. The least squares estimate of b is


bXXYY XXi ii


n
i i

n
=−∑∑== 1 ()ˆˆ()− ()−ˆ.

2
1

Let

(^) SYYn S XXnyi
i
n
yii
n
=−∑∑==()ˆˆ()− =−()()−.
2
1
2
11 and 1
Then
bSSr=(/).yx
The least squares estimate of “ a ” is obtained by solving

Free download pdf