

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!


The data consist of n pairs of observations (X 1 , Y 1 ), ..., (Xn, Yn). The model is
Yi = β 0 + β 1 Xi + εi, i = 1, ..., n,
where ε 1 , ..., εn are independent, E(εi) = 0 and V ar(εi) = σ^2. From this it follows that E(Yi) = β 0 + β 1 Xi, V ar(Yi) = σ^2 and that Y 1 , ..., Yn are independent.
For this method we find the straight line (equivalent to finding its intercept b 0 and its slope β 1 ) which fits the data the closest. Let
Q =
1 ≤i≤n
(Yi − b 0 − b 1 Xi)^2.
The least squares method minimizes Q with respect to b 0 and b 1. Calculus tells us this is achieved by setting the derivatives of Q with respect to b 0 and b 1 to zero and then solving the simultaneous equations, i.e., solve
∂Q ∂b 0 = 0,
∂b 1 = 0.
It can be shown these lead to the equations
nb 0 +
Xib 1 =
Yi ∑ Xib 0 +
X^2 i b 1 =
XiYi.
These equations are called the normal equations and the solutions are given by
b 1 =
∑i^ −^ X)(Yi^ −^ Y^ ) (Xi − X)^2 , b 0 = Y − b 1 X.
Note that b 0 estimates β 0 and b 1 estimates β 1. So the fitted regression line is Yˆ = b 0 + b 1 X. For the Housing data, we have n = 19, X = 15. 719 , Y = 75. 211 ,
(Xi − X)^2 = 40. 805 ,
(Yi − Y )^2 = 556. 078 ,
(Xi − X)(Yi − Y ) = 120. 001. So b 1 = (^12040) .. 805001 = 2. 941 and b 1 = 75. 211 − (2.941)(15.719) = 28. 981.
So the fitted line is Yˆ = 28.981 + 2. 941 X. So when X = 18. 3 , estimated selling price is Yˆ = 28 .981 + (2.941)(18.3) = 83. 39.
Before we can estimate the variance σ^2 , we need concepts of fitted Y -values and residuals. The fitted Y values are Yˆi = b 0 + b 1 Xi, i = 1, ..., n. The residuals are defined by ei = Yi − Yˆi = Yi − (b 0 + b 1 Xi). Note that εi = Yi − (β 0 + β 1 Xi). Now εi is unknown since we do not know β 0 and β 1. However, if we substitute β 0 and β 1 by its estimates b 0 and b 1 we get the residual ei = Yi − (b 0 + b 1 Xi). So ei is an estimate of εi. The fact that {ei} estimate {εi} is a very useful fact and we will see this again in chapter 3. Here are some properties of the estimated regression line and the residuals: i)
ei = 0 ii) ∑^ e^2 i ≤ ∑(Yi − u 0 − u 1 Xi)^2 for any real numbers u 0 and u 1 , iii) ∑^ Yi = ∑^ Yˆi, iv)
Xiei = 0, v) ∑^ Yˆiei = 0, vi) the regression line passes thorough the point of averages (X, Y ).
The residual sum of squares is defined to be SSE = ∑^ e^2 i. Here are two important computing formulas
SSE =
(Yi − Y )^2 − b^21
(Xi − X)^2 , SSE =
Y i 2 − b 0
Yi − b 1
XiYi.
Here is an important fact
E(SSE) = (n − 2)σ^2.
Define MSE = SSE n− 2. Then E(MSE) = σ^2. So MSE is an estimate of σ^2. For the Housing data, using the computing formula, we have SSE = ∑(Yi − Y )^2 − b^21 ∑(Xi − X)^2 = 203. 17 and MSE = SSE n− 2 = (^20319) −.^172 = 11. 95. So an estimate of σ^2 here is 11.95.
This normal regression model is Yi = β 0 + β 1 Xi + εi, i = 1, ..., n, where ε 1 , ..., εn are assumed to be independent N(0, σ^2 ). This means Y 1 , ..., Yn are independent and, for each i, Yi is normally distributed with mean β 0 + β 1 Xi and variance σ^2.