Week 5 Lecture Q A
Week 5 Lecture Q A
Week 5 – Lecture
Shafiq Ur Rehman
Lecturer (Statistics)
Department of Mathematics & Statistics
University of Central Punjab, Lahore.
WHAT IS “LINEARITY”?
The term "linear" refers to the relationship between the predictor variable(s) and the response variable.
A linear relationship means that the change in the response variable is directly proportional to the change in
the predictor variable. Mathematically, this can be represented by a straight line when the predictor variable
is plotted on the x-axis and the response variable is plotted on the y-axis.
For instance, if we are trying to predict the price of a house based on its size, a linear relationship would
mean that as the size of the house increases, the price of the house also increases at a constant rate. In other
words, a linear regression model would assume that the relationship between the size of the house and its
price can be expressed by a straight line.
The difference between the actual value of the Y and the conditional/ expected value of the Y on the given
X-variable. i.e., Error (for ith observation) 𝜇𝑖 = 𝑌𝑖 − 𝐸(𝑌 / 𝑋𝑖 ) = 𝑌𝑖 − 𝐸(𝑌𝑖 )
The difference between the actual observed value of Y and “estimate” of the expected value of the response
ε𝑖 = 𝑌𝑖 − 𝐸(𝑌 / 𝑋𝑖 ) = 𝑌𝑖 − 𝑌𝑖
Suppose that the yield in pounds of conversion in a chemical process depends on temperature and the
catalyst concentration. A multiple regression model that might describe this relationship is
𝑦 = 𝛽0 + 𝛽1 𝑥1 + 𝛽2 𝑥2
where y denotes the yield, x 1 denotes the temperature, and x 2 denotes the catalyst concentration. This is a
multiple linear regression model with two regressor variables.
(Cont.) MULTIPLE LINEAR REGRESSION MODEL
Multiple linear regression models are often used as empirical models or approximating functions. That is,
the true functional relationship between y and x1 , x2 , . . . , xk is unknown, but over certain ranges of the
regressor variables the linear regression model is an adequate approximation to the true unknown function.
SOME IMPORTANT POINTS
1. Models that are more Complex In Structure than previous example may often still be analyzed by
multiple linear regression techniques. For example, consider the cubic polynomial model
∑𝑋2 2
∑𝑥22 = ∑𝑋22 −
𝑛
∑𝑋1 ∑𝑋2
∑𝑥1 𝑥2 = ∑𝑋1 𝑋2 −
𝑛
∑𝑌 ∑𝑋1
∑𝑦𝑥1 = ∑𝑌𝑋1 −
𝑛
∑𝑌 ∑𝑋2
∑𝑦𝑥2 = ∑𝑌𝑋2 −
𝑛
EXAMPLE
The following data relate to radio advertising expenditures, newspaper advertising expenditures and sales.
Fit a regression 𝑌 = 𝑎 + 𝑏1 𝑋1 + 𝑏2 𝑋2.
Table
EXAMPLE
Putting the values into the formulas we get
∑𝑋1 2 322
∑𝑥12 = ∑𝑋12 − = 290 − = 34
𝑛 4
∑𝑋2 2 162
∑𝑥22 = ∑𝑋22 − = 94 − = 30
𝑛 4
∑𝑌 ∑𝑋1 56∗32
∑𝑦𝑥1 = ∑𝑌𝑋1 − = 505 − = 57
𝑛 4
∑𝑌 ∑𝑋2 56∗16
∑𝑦𝑥2 = ∑𝑌𝑋2 − = 276 − = 52
𝑛 4
Table
EXAMPLE
Putting the values into the formulas we get
∑𝑥12 = 34; ∑𝑥22 =30; ∑𝑥1 𝑥2 =31; ∑𝑦𝑥1 = 57; ∑𝑦𝑥2 = 52
Note that there are p = k + 1 normal equations, one for each of the unknown regression coefficients. The
solution to the normal equations will be the least – squares estimators 𝛽0 , 𝛽1 , … , 𝛽𝑘 .
It is more convenient to deal with multiple regression models if they are expressed in matrix notation. This
allows a very compact display of the model, data, and results.
𝒚 = 𝑿𝜷 + 𝜺
Where
ESTIMATION OF THE MODEL PARAMETERS
𝒚 = 𝑿𝜷 + 𝜺
Where,