EstimationTheory Lecture 03 (1)
EstimationTheory Lecture 03 (1)
estimation - I
Odoi Makuru
September 7, 2023
Introduction
• Let (x1 , y1 ), (x2 , y2 ), ... , (xn , yn ) be the n observed data points, with corresponding
errors εi , i = 1, ... , n. That is,
Yi = β0 + β1 xi + εi , i = 1, ... , n
• The three unknown parameters, the intercept parameter β0 , the slope parameter
β, and the error variance σ 2 , are estimated from the data set
• We assume that the errors εi , i = 1, ... , n are independent and identically
distributed with E(εi ) = 0, i = 1, ... , n, and Var(εi ) = σ 2 , i = 1, ... , n - N 0, σ 2
• The straight line model for the response Y for a given x is
Y = β0 + β1 x + ε
E[Y ] = β0 + β1 x
• The estimator of the E(Y ), denoted by Ŷ , can be obtained by using the estimators
β̂0 and β̂1 of the parameters β0 and β1 , respectively
• Then, the fitted regression line we are looking for is given by
Ŷ = β0 + β1 x
Definition
For observed values (xi , yi ), we obtain the estimated value of yi as
The deviation of observed yi from its predicted value ŷi , called the ith residual,
is defined by h i
εi = yi − ŷi = yi − β̂0 + β̂1 xi
The residuals, or errors εi , are the vertical distances between observed and
predicted values of yi ‘s
Definition
The sum of squares of deviations to be minimized is
n
X n h
X i2
2
SSE = (yi − ŷi ) = yi − β̂0 + β̂1 xi
i=1 i=1
The quantity SSE is also called the sum of squares for error
Remark
The quantities β̂0 and β̂1 that make the SSE a minimum are called the
least-squares estimates of the parameters β0 and β0 , and the corresponding
line ŷ = β̂0 + β̂1 x is called the least-squares line
Remark
SSE in some texts is referred to as Residual Sum of Squares (RSS)
Definition
The least-squares line ŷ = β̂0 + β̂1 x is one that satisfies the following property:
n
X
SSE = (yi − ŷi )2
i=1
Thus, the least-squares line is a line of the form y = β0 + β1 x for which the error
n
(yi − β0 − β1 x)2 is a minimum. The minimum is taken over
P
sum of squares
i=1
all values of β0 and β1 , and (x1 , y1 ), (x2 , y2 ), ... , (xn , yn ) are observed data pairs
Derivation of β̂0 and β̂1
If SSE attains a minimum, then the partial derivatives of SSE with respect to β0 and β1
are zeros. That is,
n
P 2
∂ [yi − (β0 + β1 xi )]
∂ SSE i=1
=
∂β0 ∂β0
Xn
=− 2 [yi − (β0 + β1 xi )] (1)
i=1
n n
!
X X
=−2 yi − nβ0 − β1 xi =0
i=1 i=1
and
n
X n
X n
X
xi yi = β0 xi + β1 xi2 (4)
i=1 i=1 i=1
Solving for β0 and β1 from Equations (3) and (4), we obtain
n
P n
P
n
P n
P n
P n
P n
P xi yi
i=1 i=1
(xi − x) (yi − y) n xi y i − xi yi xi yi − n
i=1 i=1 i=1 i=1 i=1
β̂1 = n = n 2 = n
2 (5)
P 2 n
(xi − x)
P
xi
xi2 n
P P
n − xi
xi2 −
P i=1
i=1 i=1 i=1 n
i=1
and
β̂0 = y − β̂1 x (6)
To simplify the formula for β̂1 , set
n
2 n n
P P P
n xi n xi yi
i=1 i=1 i=1
X X
sxx = xi2 − and sxy = xi yi −
n n
i=1 i=1
so
sxy
β̂1 =
sxx
Procedure for fitting a least-squares line
a) Form the n data points (x1 , y1 ), (x2 , y2 ), ... , (xn , yn ), and compute the following
quantities:
X n X n X n X n X n
xi , xi2 , yi , yi2 , xi yi , x and y
i=1 i=1 i=1 i=1 i=1
which is shown together with the data points in the figure below. If a production level
of MWK5.5 million worth of cars is planned for next month, then the plant manager can
predict that the
ŷ |5.5 = 0.409 + (0.499 × 5.5) = 3.1535
With β̂1 = 0.499, this model predicts that the electricity usage increases by about half
a million kilowatt-hours for every additional MWK 1 million of production
The error variance
so
√
σ̂ = 0.0299 = 0.1729
Reading assignment
Read and do all examples in Section 8.2 and do Exercise 8.2 of Kandethody
M.Ramachandran & Chris P.Tsokos, (2009) Mathematical Statistics with
Applications, ISBN 13: 978-0-12-374848-5
A. Hayter.
Probability and Statistics for Engineers and Scientists.
Brooks/Cole, Cengage Learning, 2012.
K. M. Ramachandran and C. P. Tsokos.
Mathematical Statistics with Applications:.
Elsevier Academic Press, 2009.
D. D. Wackerly, W. Mendenhall, and R. L. . Scheaffer.
Mathematical Statistics with Applications.
Brooks/Cole, Cengage Learning, 2008.