



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!




Eric Slud, Stat 430 Fall 2008
The purpose of this handout is to serve as a reference for some stan-
dard theoretical material in simple linear regression. As a text reference,
you should consult either the Simple Linear Regression chapter of your Stat
400/401 (eg the currently used book of Devore) or other calculus-based statis-
tics textbook (e.g., anything titled ‘Engineering Statistics’), or a standard
book on Linear Regression like
Draper, N. and Smith, H. (1981) Applied Linear Regression,
2nd edition. John Wiley: New York.
The model is
Yi = a 0 + b 0 Xi + i, 1 ≤ i ≤ n, i
iid
∼ N (0, σ
2
) (1)
where the constant real parameters (a 0
, b 0
, σ
2
0
) are unknown. The pa-
rameters (a, b) are estimated by maximum likelihood, which in the case
of normally distributed iid errors as assumed here is equivalent to choos-
ing a, b in terms of {(X i
i
n
i=
by least squares, i.e. to minimize
∑ n
i=
(Yi − a − bXi)
2
, which results in:
b =
s.cov(X, Y )
s.var(X)
s XY
s
2
X
, ˆa =
b
where
n
n ∑
i=
i
n
n ∑
i=
i
, s
2
X
n − 1
n ∑
i=
i
2
and
s
2
Y
n − 1
n ∑
i=
i
2 , s XY
n − 1
n ∑
i=
i
i
The predictors and residuals for the observed responses Y i
are given
respectively by
Predictor i
i
= ˆa +
bX i
, Residual i
i
i
i
The standard (unbiased) estimator of σ
2
is the Mean Residual Sum of
Squares (per degree of freedom) given by
σˆ
2
= MRSS =
n − 2
n ∑
i=
(Yi −
Yi)
2
Confidence intervals for estimated parameters are all based on the fact
that the least squares estimates ˆa,
b and the corresponding predictors of (the
mean of) Yi are linear combinations of the independent normally distributed
variables j
, j = 1,... , n, and the general formula for any sequence of
constants u j
, j = 1,... , n,
n ∑
j=
u j
j
∼ N (0 , σ
2
n ∑
j=
u
2
j
We use this formula below with various choices for the vector u = {uj }
n
j=
Under the model (1), with true parameters (a 0
, b 0
, σ
2
0
), we first calculate
from (2) that
b − b 0
∑ n
j=
j
Y − b 0
j
j
∑ n
j=
j
2
(n − 1) s
2
X
n ∑
j=
j
a 0
b 0
j
n ∑
j=
c j
j
(since
∑ n
j=
j
X) = 0), where
c j
j
(n − 1)s
2
X
with sum of squares
∑ n
j=
(Xj −
2
(n − 1)
2 s
4
X
(n − 1)s
2
X
Therefore, by (3), we have
b − b 0
n ∑
j=
j
(n − 1) s
2
X
j
(
σ
2
(n − 1)s
2
X
)
Next, using
aˆ − a 0 =
b
X − a 0 =
n
n ∑
j=
(j − (
b − b 0 )
n ∑
j=
uj j
Continuing with the formula (8) for SSE, we find via (4) that with uj = cj =
j
X)/((n − 1)s
2
X
n ∑
j=
(j − ¯ − (
b − b 0 )(Xj −
2
n ∑
j=
(
j
j
n ∑
k=
k
(n − 1)s
2
X
k
) 2
n ∑
j=
j
2
−
(n − 1) s
2
X
( n ∑
j=
j
j
) 2
= e
′
(
n
′
− (n − 1)s
2
X
cc
′
)
e (9)
where ¯ = n
− 1
∑ n
j=
j and e denotes the n-vector with components j.
Since the (jointly) normally distributed variables c
′ e and ¯ = 1
′ e/n and
the components of (I −
1
n
′ − (n − 1)s
2
X
cc
′ )e are uncorrelated, they are
actually independent, and the quadratic form (9) can be proved to have the
property
σ
2
0
= (n − 2)
σˆ
2
σ
2
0
∼ χ
2
n− 2
An important aspect of this proof is the observation that the matrix
1
n
′
− (n−1)s
2
X
cc
′
is a projection matrix, that is, is symmetric
and idempotent, which means that M
2 = M, and the quadratic form (9) is
equal to (Me)
′ (Me). The independence of (ˆa,
b) and Me is confirmed
by checking that the covariances are 0:
Cov(Me, 1
′
e) = σ
2
0
M1 = 0 , Cov(Me, c
′
e) = σ
2
0
Mc = 0
The independence of (ˆa,
b) and ˆσ
2
then immediately implies, by definition
of the t-distribution, that
b − b 0
n − 1
s X
σ ˆ
∼ t n− 2
ˆa − a 0
σ ˆ
{ 1
n
2
(n − 1) s
2
X
} − 1 / 2
∼ t n− 2
Finally, we turn to the definitions of confidence intervals and the CLM
and CLI confidence and prediction intervals constructed and plotted by SAS.
The main ingredient needed in the justification of these is the result (11)
just proved. The confidence and prediction intervals say that each of the
following statements has probability 1 − α under the model (1):
b 0
b ± t n− 2 ,α/ 2
σ ˆ
s X
n − 1
a 0
∈ aˆ ± t n− 2 ,α/ 2
σˆ
( 1
n
(n − 1)s
2
X
) 1 / 2
a 0
0
∈ aˆ +
bX 0
± t n− 2 ,α/ 2
σˆ
( 1
n
0
2
(n − 1)s
2
X
) 1 / 2
i
∈ aˆ +
bX i
± t n− 2 ,α/ 2
σˆ
(
n
i
2
(n − 1)s
2
X
) 1 / 2
The confidence intervals (12) and (13) are exactly as used by SAS in
determining p-values for the significance of coefficients a, b (in testing the
respective null hyptheses that b = 0 or that a = 0.) The interval (14) is
what SAS calculates in generating the CLM upper and lower confidence limits
that it calculates and plots at location X i
either within PROC GPLOT or PROC
REG. The interval (15) is only a retrospective prediction interval within which
we should have found Yi with respect to its predictor
Yi but it is NOT what
SAS calculates in generating the CLI upper and lower individual-observation
prediction limits at location Xi either within PROC GPLOT or PROC REG.
Prediction intervals are meant to capture not the observations
already seen but rather any new observations Y
′
i
which would be
collected at the previous locations X i
or at brand-new locations
0
. So we discuss next the corrected formula for prediction
interval which SAS actually calculates.
We are interested sometimes, especially as part of diagnostic checking
and model-building, in making prediction intervals for values Y 0
(not yet
observed) corresponding to values X 0
which were not in fact part of the
dataset. The thing to understand is that formula (15) is not applicable to
this situation because it refers to observations Y i
which were already used
as part of the model-fitting that resulted in ˆa,
b. If Y 0
= a 0
0
0
with a 0
, b 0
the same as before but with 0
∼ N (0, σ
2
0
) independent of all