39.5. LINEAR REGRESSION 831
above expression is
1σ2
n
∑k=1
(Xk−
(α̂ + β̂ (tk− t̄)
))2
=1
σ2
n
∑k=1
(Xk−
(X̄ +
(∑
nj=1 X j (t j− t̄)
∑ j (t j− t̄)2
)(tk− t̄)
))2
Thus, to find a confidence interval for the variance, do the following.
PROCEDURE 39.5.4 In the above situation, to find a .95 confidence intervalfor the variance which is unknown do this:
1. If there are n observations, n fairly large, certainly larger than 2, find an interval[a,b] such that if V is a X 2 (n−2) random variable P(V ∈ [a,b])≥ .95.
2. Find X̄ the sample mean and t̄ the average of the t values. Then fill in to find
S≡n
∑k=1
(Xk−
(X̄ +
(∑
nj=1 X j (t j− t̄)
∑ j (t j− t̄)2
)(tk− t̄)
))2
3. Then the .95 confidence interval for σ2 is determined by
a≤ Sσ2 ≤ b
In other words, with probability .95, the variance σ2 satisfies
Sb≤ σ
2 ≤ Sa
I think one is even more interested in β , the slope of the line for the mean. To finda confidence interval for β , recall the T test. The T distribution was the distribution of
W√V/r
where V was X 2 (r) and W was n(0,1). Do we have such random variables above?
Recall it was shown above that β̂ is n(
β , σ2
∑i(ti−t̄)2
). Therefore,
β̂ −β(σ/
√∑i (ti− t̄)2
) is n(0,1)
Therefore,β̂−β(
σ/√
∑i(ti−t̄)2)√
1σ2 ∑
nk=1
(Xk−
(α̂ + β̂ (tk− t̄)
))2/(n−2)