








































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!









































Chapter 11
Multiple Regression Analysis
The basic ideas are the same as in previous
chapters.
We have one response (dependent) variable, Y.
The response (Y) is a quantitative variable.
There are more than one predictors (independent
variables): X 1
2
p where p = number of
p redictors in the model.
o The predictors can be:
Quantitative (as before)
Categorical (new)
Interaction terms (product of predictors)
Powers of predictors (e.g.
2
4
In this course we will concentrate on
o Reading computer output
o Interpreting coefficients
o Determining the order to interpret things.
STA 6126 Chapter 11 Spring 2008
Some Examples
Example – 1: Suppose we want to predict temperature
for different cities, based on their latitude and
elevation.
In this case, the response and the predictors are
Y = temperature
1 = Latitude
2 = Elevation
Possible models are
With p = 2: 1 1 2 2
(Stiff surface)
With p = 3: 1 1 2 2 3 1 2
(Twisted surface)
Example – 2: We want to predict patients’ “well-
being” from the dosage of medicine they take (mg.)
using a quadratic model:
2
1 2
Here X = Dosage of the active ingredient (in mg’s),
and p = 2.
STA 6126 Chapter 11 Spring 2008
In general terms:
The model:
1 2 2 2 p p
Assumptions:
identically distributed as normal with mean zero
and constant standard deviation ].
every combination of x 1, x 2 , …, x p
. That is, the
response (Y) has a normal distribution with mean
μ Y (that depends on the values of the independent
variables, x’s) and a constant standard deviation,
(that does not depend on the values of X’s).
We use data to find the
Fitted Equation or
Prediction Equation
1 2 2 2
p p
y a b x b x L b x
STA 6126 Chapter 11 Spring 2008
ANOVA F-test:
Overall test of “goodness” of the model
Ho: 1
2
3
p = 0 NOTHING GOOD in model
Ha: at least one of ’s ≠ 0 SOMETHING IS GOOD.
Test Statistic :
MSReg
P-Value from the tables of the F-distribution with
df 1 = p = degrees of freedom of MSReg
df 2 = n – p – 1 = degrees of freedom of MSE
ANOVA for Multiple Regression Model
Source df SS MSE F
Regression
(Model)
p SSReg
SSReg
MSReg
p
MSReg
F
MSE
Residual
(Error)
n – p – 1 SSE
1
SSE
MSE
n p
Total n – 1 SST
STA 6126 Chapter 11 Spring 2008
Example - 1:
Let Y = height of a person,
1 = Length of right arm,
2 = Length of left arm.
ANOVA table with a small p-value. What does
that mean?
of the slopes, 1 and 2 and found that the p-values
for both are large, what does that mean?
STA 6126 Chapter 11 Spring 2008
Example – 2: Suppose we are interesting in predicting
the GPA of students in college (CGPA) using 16
different predictor variables. Data were collected from
a random sample of 59 college students.
ANOVA table?
ANOVA table? What is your conclusion?
Analysis of Variance
Source DF SS MS F P
Regression 16 3.3135 0.2071 1.99 0.
Residual Error 42 4.3601 0.
Total 58 7.
STA 6126 Chapter 11 Spring 2008
Which predictor(s) is/are “good?”
does it tell us?
Unusual Observations
Obs Height CGPA Fit SE Fit Residual St Resid
28 67.0 2.9800 3.5898 0.2442 –0.6098 –2.90R
40 65.0 3.9300 3.3458 0.2176 0.5842 2.46R
59 62.0 2.5000 3.4718 0.1352 –0.9718 –3.32R
R denotes an observation with a large standardized residual.
Although the individual t-tests indicate that the GPA
of the student in high school (HSGPA) and Exercise
have coefficients (i) that are significantly different
from zero, when tested one at a time , with p-values of
0.004 and 0.056, respectively (hence they seem to look
good), we should look at all possible combinations of
the 16 predictors, so as not to miss any combination
that may give better results. It is almost impossible to
do this by hand, but fortunately computers can do it
for us.
In this way, we can find the “best subset” of
predictors that will give the “best” prediction
equation. The Minitab output on the next page gives
“all” possible subsets of regression models.
STA 6126 Chapter 11 Spring 2008
We see that when there are more than 2 predictors in
the regression model, the adjusted R
2
does not change
much from the model that has HGPA and Exercise as
the predictors.
Another consideration in model selection is
“parsimony.” That is, the preferred model is one that is
as simple as possible and with a high adjusted R
2
.
Thus, it seems that “the best combination” of
predictors is HGPA and Exercise.
Now we need to work through the above steps again
and see what we can say for a regression model that
has only HGPA (X 1 ) and Exercise (X 2 ) as predictors.
We obtain the following output from Minitab:
STA 6126 Chapter 11 Spring 2008
Regression Analysis: CGPA versus HSGPA, Exercise
The regression equation is
CGPA = 1.55 + 0.560 HSGPA - 0.0111 Exercise
Predictor Coef SE Coef T P
Constant 1.5489 0.5551 2.79 0.
HSGPA 0.5599 0.1436 3.90 0.
Exercise -0.011138 0.004985 –2.23 0.
S = 0.306126 R-Sq = 31.6% R-Sq(adj) = 29.2%
Analysis of Variance
Source DF SS MS F P
Regression 2 2.4256 1.2128 12.94 0.
Residual
(Error) 56 5.2479 0.
Total 58 7.
First, using ANOVA we test Ho: 1
2 = 0 against
Ha: At least one of 1 and 2 is different from zero.
Since the p-value < 0.0005, we reject Ho. The
observed data give strong evidence that at least one of
the two predictors is good in explaining the variation
in CGPA.
Next we carry out two independent tests :
Ho: 1 = 0 vs. Ha: 1 0 and
Ho: 2 = 0 vs. Ha: 2 0
STA 6126 Chapter 11 Spring 2008
In the first panel (top-left) we see that the all but
one of the residuals are close to the blue line,
indicating that the assumption of the normality of
residuals is supported by the data. The lowest dot
on the LHS of this graph is the outlier or the
influential observation.
The second panel (top-right) shows that the
standardized residuals are randomly scattered
around the horizontal line (residual = 0), and all,
except one (the outlier) are within 3 standard
deviations of the mean, i.e., zero (as expected).
The third panel (Low-left) is a histogram of the
standardized residuals and support that the
residuals have a normal distribution with zero
mean and some constant variance.
Finally, the last graph do not show any funnel
shape, so the assumption of constant variance is
supported. We can still see the outlier(s).
STA 6126 Chapter 11 Spring 2008
Standardized Residual
P
e
r c
e
n
t
99
90
50
10
1
Fitted Value
S
t a
n
d
a
r d
i z
e
d
R
e
s i d
u
a
l
1
0
Standardized Residual
F
r e
q
u
e
n
c
y
16
12
8
4
0
Observation Order
S
t a
n
d
a
r
d
iz
e
d
R
e
s
id
u
a
l
1 5 10152025303540455055
1
0
Normal Probability Plot of the Residuals Residuals Versus the Fitted Values
Histogram of the Residuals Residuals Versus the Order of the Data
Residual Plots for CGPA
In order to see if including a quadratic or higher order
term of one or both of the predictors might improve
the model, we look at a scatter diagram of the
standardized residuals vs. the predictors. These are
given below:
Residual Plots for CGPA
HSGPA
S
t a
n
d
a
r d
iz
e
d
R
e
s id
u
a
l
2
1
0
Residuals Versus HSGPA
(response is CGPA)
Exercise
S
t a
n
d
a
r d
iz
e
d
R
e
s id
u
a
l
0 10 20 30 40 50 60
2
1
0
Residuals Versus Exercise
(response is CGPA)
We do not see any higher order relation between the
residuals and the predictors. So we cannot improve the
model by adding any other predictor.
However, there is at least one observation that needs to
be checked and corrected if possible, or removed from
the data set otherwise.
The question is which one of the observation should
we look at and delete first (if we cannot find the
reason why it has such a large residual)?
[We delete observations one at a time because things
may change after deleting one observation.]
STA 6126 Chapter 11 Spring 2008
Regression Analysis: CGPA versus HSGPA, Exercise
Analysis of Variance
Source DF SS MS F P
Regression 2 1.45009 0.72504 7.69 0.
Residual Error 55 5.18265 0.
Total 57 6.
Looking at the ANOVA table we decide to reject Ho
and conclude that at least one of the two predictors is
“good.” [Note the change in the degrees of freedom in
ANOVA. Why should they change?]
The regression equation is
CGPA = 1.54 + 0.554 HSGPA - 0.00432 Exercise
Predictor Coef SE Coef T P
Constant 1.5388 0.5568 2.76 0.
HSGPA 0.5542 0.1441 3.85 0.
Exercise -0.004320 0.009596 -0.45 0.
S = 0.306969 R-Sq = 21.9% R-Sq(adj) = 19.0%
Test on the ’s one at a time show that the second
predictor (Exercise) is not “good” since the
corresponding p-value = 0.654 > larger than any
reasonable . This means we should try a new model,
without Exercise. Because we are going to change the
model, we do not need to do anything based on the
rest of the output.
Unusual Observations
Obs HSGPA CGPA Fit SE Fit Residual St Resid
3 3.00 3.6000 3.1970 0.1324 0.4030 1.45 X
25 3.50 3.3100 3.3705 0.1974 -0.0605 -0.26 X
26 2.55 3.1400 2.9261 0.1856 0.2139 0.87 X
27 3.80 2.9800 3.6361 0.0497 -0.6561 -2.17R
58 3.60 2.5000 3.5252 0.0594 -1.0252 -3.40R
R denotes an observation with a large standardized residual.
X denotes an observation whose X value gives it large influence.
STA 6126 Chapter 11 Spring 2008
Here is the output for the SLR model with HSGPA as
the predictor:
Regression Analysis: CGPA versus HSGPA
The regression equation is
CGPA = 1.50 + 0.560 HSGPA
Predictor Coef SE Coef T P
Constant 1.4964 0.5448 2.75 0.
HSGPA 0.5596 0.1426 3.92 0.
S = 0.304776 R-Sq = 21.6% R-Sq(adj) = 20.2%
Analysis of Variance
Source DF SS MS F P
Regression 1 1.4310 1.4310 15.41 0.
Residual Error 56 5.2017 0.
Total 57 6.
Both panels show that is significantly different from
zero and hence we have a “reasonably good” model.
[It is not really a good model, why?]
Next we should look at the following panel??? of the
output to see if we want to delete a few more
observations to improve the model.
We may also try to find other predictors so as to
improve R
2
which is around 20%, i.e., only 20% of the
variation in CGPA is explained by changes in
HSGPA, or alternatively we can say that HSGPA has
reduced the error sum of squares only by 20%.
STA 6126 Chapter 11 Spring 2008