Professional Documents
Culture Documents
M. A. BOATENG
REGRESSION
M. A. BOATENG
M. A. BOATENG
M. A. BOATENG
For a simple linear regression, using the method of least squares, the
estimates of the parameters, 0 and 1 are given as;
0 = 1
1 =
=1
OR
1 =
=1
=1
=1
=1
=1
2
2
(
)
=1
M. A. BOATENG
COEFFICIENT OF DETERMINATION
The coefficient of determination, R-squared measures the proportion
of variation in the dependent variable that can be explained by the
independent variable.
2
Where
( )2
=
=1
=1(
M. A. BOATENG
)2
6
DEGREES OF SUM OF
FREEDOM
SQUARES
MEAN SUM
OF SQUARES
Regression
SSR
=
1
Error or
Residual
n-2
SSE
=
2
Total
n-1
SST
M. A. BOATENG
F-RATIO
P-VALUE
( )
MULTIPLE REGRESSION
The general multiple linear regression model with response Y and
terms 1 , 2 , , will have the form;
= 0 + 1 1 + 2 2 + +
= 2
The symbol X in means that we are conditioning on all the
terms on the right side of the equation.
Both the and 2 are unknown parameters that need to be
estimated.
M. A. BOATENG
1
2
.
.
.
1
1
.
.
.
1
11
21
.
.
.
1
.
.
.
1
2
.
.
.
M. A. BOATENG
0
1
.
.
.
and
1
2
.
.
.
M. A. BOATENG
10
The matrix gives all the observed values of the terms. The ith row of
will be defined by the symbol , which is a ( + 1) 1 vector for
mean functions that include an intercept.
Even though is a row of , we use the convention that all vectors are
column vectors and therefore need to write to represent a row.
An equation for the mean function evaluated at is:
= =
= 0 + 1 1 + 2 2 + +
Multiple linear regression model is written in matrix notation as:
= +
M. A. BOATENG
11
VARIANCE-COVARIANCE MATRIX OF
The assumptions concerning the errors, s are summarized in matrix
form as;
=
= 2
12
13
.
.
.
1
2
.
.
.
This matrix consists of the original matrix , but with the first column
removed and the column mean subtracted from each of the remaining
columns.
M. A. BOATENG
14
15
= =
M. A. BOATENG
16
is compared with the mean function that includes only the intercept:
= = 0
M. A. BOATENG
17
ANOVA TABLE
SOURCE
df
REGRESSION
RESIDUAL
TOTAL
SS
MSS
n-(p+1)
=
( + 1)
n-1
P-VALUE
18
0 : = = 0
1 : = = 0 + 1 1 + 2 2 + +
M. A. BOATENG
19
=
=1
M. A. BOATENG
20
M. A. BOATENG
21
EXAMPLE:
Calculate the regression coefficients and write the regression model of
the data below;
X
12
66
38
70
22
27
28
47
14
68
14
35
22
29
15
17
20
12
29
ANSWER:
M. A. BOATENG
22
23
The ANOVA table provides an F-test for the statistical model. If the Ftest is significant, then the model as a whole predicts significantly
more variability.
NB: This test is affected by the number of independent variables
M. A. BOATENG
24
25