Brief Lecture Notes On Simple Linear Regression Regression Analysis
Brief Lecture Notes On Simple Linear Regression Regression Analysis
Regression analysis
It is necessary to develop an equation to express the relationship between two
variables and estimate the value of the dependent variable Y based on a
selected value of the independent variable X . the technique used to develop the
equation for the straight line and make these predictions is called regression
analysis. So, regression is a statistical method to estimate (or predict) the
unknown values of one variable (Y ) for specified values of the other variable
( X ).
Definition
A regression model is a mathematical equation that describes the relationship
between two or more variables. A simple regression model includes only two
variables: one independent and one dependent. The dependent variable is the
one being explained, and the independent variable is the one used to explain the
variation in the dependent variable.
1
SIMPLE LINEAR REGRESSION ANALYSIS cont.
y = A + Bx
Food Expenditure
Linear
Nonlinear
Income Income
(a) (b)
2
Figure_R2 Plotting a linear equation.
y
y = 50 + 5x
150
100 x = 10
y = 100
50 x=0
y = 50
5 10 15 x
6
SS xy
b and a y bx
SS xx
18
3
The Least Squares Line cont.
where
x y x 2
SS xy xy and SS xx x
2
n n
19
Example
Find the least squares regression line for the data on incomes and food
expenditure on the seven households given in the Table_R1, Use income as an
independent variable and food expenditure as a dependent variable.
4
Solution
Table_R2
x 212 y 64
x x / n 212 / 7 30.2857
y y / n 64 / 7 9.1429
22
5
x y (212)(64)
SS xy xy 2150 211 .7143
n 7
x 2
(212) 2
SS xx x
2
7222 801.4286
n 7
23
Solution 13-1
SS xy 211 .7143
b .2642
SS xx 801.4286
a y bx 9.1429 (.2642)(30.2857) 1.1414
Thus,
ŷ = 1.1414 + .2642x
24
6
Multiple Regression:
The simple linear regression model is as:
This model includes one independent variable, which is denoted by x, and one
dependent variable, which is denoted by y, and the term represented by in the
model is called the random error.
Usually a dependent variable is affected by more than one independent variable.
When we include two or more independent variables in a regression model, it is
called a multiple regression model. Remember, whether it is a simple or
multiple regression model, it always includes one and only one dependent
variable.
A multiple regression model with y as a dependent variable and
as independent variables is written as:
7
Example:
A researcher wanted to find out the effect of driving experience and the number of driving
violations on auto insurance premiums. A random sample of 12 drivers insured with the same
company and having similar auto insurance policies was selected from a large city. Table-A,
lists the monthly auto insurance premiums (in dollars) paid by these drivers, their driving
experiences (in years), and the numbers of driving violations committed by them during the
past three years. Find the regression equation of monthly premiums paid by drivers on the
driving experiences and the numbers of driving violations.
Table-A:
Monthly Premium 148 76 100 126 194 110 114 86 198 92 70 120
($)
Driving 5 14 6 10 4 8 11 16 3 9 19 13
Experiences
(years)
# of driving 2 0 1 3 6 2 3 1 5 1 0 3
violations
(past 3 years)
Assignment on lecture 5