Linear Regression
Linear Regression
REGRESSION
INTRODUCTION
a Y bX
TYPES OF RELATIONSHIPS
X X
Y Y
X X
TYPES OF RELATIONSHIPS
Strong relationships Weak relationships
Y Y
X X
Y Y
X X
EXAMPLE:
Find the equation of the regression line of the following:
Hours Spent in Score in the
Student
Studying Exam
1 2 60
2 3 63
3 4 69
4 4 78
5 4 79
6 6 80
7 6 85
8 7 91
9 7 93
10 7 96
Total
50 794
SOLUTION:
The regression equation:
Compute the needed summations and means.
∑X = 50 ∑X2 = 280 ∑XY = 4163
∑Y = 794 = 5X = 79.4 Y
Solve for a and b.
b = [n∑XY – ∑X∑Y] / [n∑x2 –(∑x)2 ]
b = [10(4163) – 50(794)] / [10(280) – (50) 2]
b = 6.43
a Y bX
= 79.4 – 6.43(5)
a = 47.25
Having calculated the values of a and b, the equation of
the regression line is
Y = a+ bX
Y = 6.43 x + 47.25
The graph of the regression line and the scatter points are
shown below.
REGRESSION LINE
120
Y-Values
100
80
60
40
20
0
1 2 3 4 5 6 7 8
Trend line is a line passing through the
series of points such that the total
vertical measurement of the points
below this line is more or less equal to
the total measurements of the points
above the line.
LINEAR REGRESSION
Example 2:
The table below shows the advertisement expense per month, expressed in
thousand pesos, and the net profit, expressed as a percentage of total
sales, of a random sample of seven stores:
Advertisement
Store Net Profit, Y
Expense, X
1 45 6.2
2 62 8.0
3 49 6.0
4 61 7.2
5 67 8.7
6 82 9.1
7 70 8.2
LINEAR REGRESSION
a) Construct the scatter diagram for the given
data.
b) Find the regression equation
Net Profit
10
9
8
7
6
5
4
3
2
1
0
40 45 50 55 60 65 70 75 80 85
SOLUTION:
b) The regression equation:
Compute the needed summations and means.
∑X = 436 ∑X2 = 28,104 ∑XY = 3411.3
∑Y = 53.4 ∑Y2 = 416.02
X= 62.29 Y = 7.63
Solve for a and b.
b = [n∑XY – ∑X∑Y] / [n∑x2 –(∑x)2 ]
b = [7(3411.3) – 436(53.4)] / [7(28,104) – (436) 2]
b = 0.09
a = Y – bX
a = 7.63 – 0.09(62.29) = 2.02
Thus, the regression equation is
Y = 2.02 + 0.09X.
LINEAR REGRESSION
Example 3:
The section head of 8 medical representatives believes that there is a
relationship between the number of contacts a medical representative
has and his sales. To prove his claim, he gathered the ff information from
his group and the results are tabulated below.
Sales (in
Medical Number of
thousand
Representative Contacts
pesos)
A 48 84
B 25 34
C 18 34
D 50 94
E 22 32
F 52 89
G 14 18
H 57 124
LINEAR REGRESSION
a) Construct the scatter diagram for the given
data.
b) Find the regression equation
Y-Values
140
120
100
80 Y-Values
60
40
20
0
10 15 20 25 30 35 40 45 50 55 60