You are on page 1of 17

‫‪Simple linear Regression analysis‬‬

‫‪The Regression equation :‬‬


‫‪Y^ = a + b x‬‬

‫) ‪∑( X – X ) ( Y – Y‬‬
‫ـــــــــــــــــــــــــــــــــــــــــــــــــــ = ‪b‬‬
‫‪∑( X – X )2‬‬

‫‪a=Y–bX‬‬

‫‪∑Y‬‬ ‫‪∑X‬‬
‫ــــــــــــــــ = ‪Where : Y‬‬ ‫ــــــــــــــــ = ‪X‬‬
‫‪n‬‬ ‫‪n‬‬
Where :
Y The dependent variable

X The independent variable

n No. of observations

a,b Constants

The slope of the Regression line


Test the significance of Regression “ F ” test
analysis of variance “ANOVA” table
(1) Sum squares of Regression S.S.R. = b2 [∑ (X-X )2 ]

(2) Sum squares of Total S.S.T. = ∑( Y – Y ) 2

(3) Sum squares of Error S.S.E. = Total – Regression


= S.S.T – S.S.R
(4) ANOVA table

1 2 3 4 5
Source of Sum of Degrees of Mean sum Calculated
variation squares freedom of squares F
S.S D.F M.S.S. FC
S.S.R
‫ــــــــــــــــــــ‬
Regression S.S.R (1) 1 M.S.S.R
1
÷ ‫ـــــــــــــــــــــ‬
S.S.E M.S.S.E
‫ــــــــــــــــــ‬
Error S.S.E (3) n–2
n–2
Total S.S.T (2)
(5) Tabled F ( Ft )
at α = 0.05
Column = 1 , Row = n – 2 ( given )
(6) Decision rule

Fc > Ft FC < Ft

The Regression The Regression


equation is equation is not
significant significant

Can be used for Can’t be used for


N.B
Coefficient of determination ( R2 )
( from ANOVA table )

S.S.R
R2 = ‫ــــــــــــــــــــــ‬
S.S.T
OR
S.S.E
R2 = 1– ‫ــــــــــــــــــــــ‬
S.S.T
Coefficient of determination ( R2 )
( % ) of the total variation in the
dependent variable (Y) that is explained
by the variation in the independent
variable (x)
( 100% – % ) is explained by the
other wise.
Ex.
X 0 1 2 3 4
Y 3 5 10 12 15
(1) Find the Regression equation.
(2) Test of significance
Given F(1.3) = 10.1, F(1,5) = 6.61, F(2,5) =
5.79
(3) Estimate Y when x = 5
(4) Find coefficient of determination ( R 2 ),and
coefficient of correlation ( r ).
‫‪Sol. (1) The Regression equation‬‬
‫‪X‬‬ ‫‪Y‬‬ ‫‪X–X‬‬ ‫‪Y-Y‬‬ ‫)‪(X-X) (Y-Y‬‬ ‫‪(X-X)2‬‬ ‫‪(Y-Y)2‬‬
‫‪X–2‬‬ ‫‪Y-9‬‬
‫‪0‬‬ ‫‪3‬‬ ‫‪-2‬‬ ‫‪-6‬‬ ‫‪12‬‬ ‫‪4‬‬ ‫‪36‬‬
‫‪1‬‬ ‫‪5‬‬ ‫‪-1‬‬ ‫‪-4‬‬ ‫‪4‬‬ ‫‪1‬‬ ‫‪16‬‬
‫‪2‬‬ ‫‪10‬‬ ‫‪0‬‬ ‫‪1‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪1‬‬
‫‪3‬‬ ‫‪12‬‬ ‫‪1‬‬ ‫‪3‬‬ ‫‪3‬‬ ‫‪1‬‬ ‫‪9‬‬
‫‪4‬‬ ‫‪15‬‬ ‫‪2‬‬ ‫‪6‬‬ ‫‪12‬‬ ‫‪4‬‬ ‫‪36‬‬
‫‪10‬‬ ‫‪45‬‬ ‫‪Zero‬‬ ‫‪Zero‬‬ ‫‪31‬‬ ‫‪10‬‬ ‫‪98‬‬
‫‪∑X‬‬ ‫‪10‬‬ ‫‪∑Y‬‬ ‫‪45‬‬
‫ــــــــــــــ = ــــــــــ = ‪X = 2‬‬ ‫ــــــــــــــ = ــــــــــ = ‪Y = 9‬‬
‫‪n‬‬ ‫‪5‬‬ ‫‪n‬‬ ‫‪5‬‬

‫)‪∑(X–X)(Y–Y‬‬ ‫‪31‬‬
‫ـــــــــــــــــــــــــــــــــــــــــــــــــــــ = ــــــــــــــــــ = ‪b = 3.1‬‬
‫‪∑ ( X – X )2‬‬ ‫‪10‬‬
‫‪a = Y – b X = 9 – ( 3.1 x 2 ) = 9 – 6.2 = 2.8‬‬
‫‪The Regression equation Y^ = 2.8 + 3.1 X‬‬
(2) Test of significance ( F ) test
(1) S.S.R = b2 ∑ ( X – X )2 = (3.1)2 x 10 = 96.1
(2) S.S.T = ∑ ( Y – Y )2 = 98
(3) S.S.E = S.S.T – S.S.R = 98 – 96.1 = 1.9
(4) ANOVA table.
Source of variation S.S D.F M.S.S. FC
1 96.1
Regression (R) 96.1
(5-2) ( 151.8 )
Error (E) 1.9 0.633
3
Total (T) 98

(5) Ft ( 1,3 ) = 10.1

(6) Fc 151.8 > Ft 10.1 the Regression equation is


significance, can be used for prediction.
(3) Estimate ( Y ) when x = 5
Y = 2.8 + 3.1 (5) = 2.8 + 15.5 = 18.3
S.S.R 96.1
(4) R2 = 0.98 = ‫ــــــــــــــــــــــ = ـــــــــــــــــ‬
S .S.T 98
98% of the total variation in ( Y ) is explained by the
variation in (x), 2% (%100 - %98) is explained by the
other wise.

r= R2 = 0.98 = + 0.99 (+) such as sign of (b) direct, strong


Ex.
X 10 8 5 9 8
Y 3 2 1 3 1
(1) Find the Regression equation.
(2) Estimate “ Y ” when x = 5
Given that : F (1,3) = 10.1, F (1,6) = 5.99, F (2,5) = 5.79
(3) Calculate R2 , r .
‫‪Sol.‬‬
‫‪X‬‬ ‫‪Y‬‬ ‫‪X–X‬‬ ‫‪Y-Y‬‬ ‫)‪(X-X) (Y-Y‬‬ ‫‪(X-X)2‬‬ ‫‪(Y-Y)2‬‬
‫‪X–8‬‬ ‫‪Y-2‬‬
‫‪10‬‬ ‫‪3‬‬ ‫‪2‬‬ ‫‪1‬‬ ‫‪2‬‬ ‫‪4‬‬ ‫‪1‬‬
‫‪8‬‬ ‫‪2‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪0‬‬
‫‪5‬‬ ‫‪1‬‬ ‫‪-3‬‬ ‫‪-1‬‬ ‫‪3‬‬ ‫‪9‬‬ ‫‪1‬‬
‫‪9‬‬ ‫‪3‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪1‬‬ ‫‪1‬‬
‫‪8‬‬ ‫‪1‬‬ ‫‪0‬‬ ‫‪-1‬‬ ‫‪0‬‬ ‫‪0‬‬ ‫‪1‬‬
‫‪40‬‬ ‫‪10‬‬ ‫‪Zero‬‬ ‫‪Zero‬‬ ‫‪6‬‬ ‫‪14‬‬ ‫‪4‬‬
‫‪∑X‬‬ ‫‪40‬‬ ‫‪∑Y‬‬ ‫‪10‬‬
‫ــــــــــــــ = ــــــــــ = ‪X = 8‬‬ ‫ــــــــــــــ = ــــــــــ = ‪Y = 2‬‬
‫‪n‬‬ ‫‪5‬‬ ‫‪n‬‬ ‫‪5‬‬
‫)‪∑(X–X)(Y–Y‬‬ ‫‪6‬‬
‫ـــــــــــــــــــــــــــــــــــــــــــــــــــــ = ــــــــــــــــــ = ‪b = 0.43‬‬
‫‪∑ ( X – X )2‬‬ ‫‪14‬‬
‫=) ‪a = Y – b X = 2 – (0.43 x 8‬‬ ‫‪- 1.44‬‬
‫‪The Regression equation‬‬ ‫‪Y^ = - 1.44 + 0.43 X‬‬
(F) Test
(1) S.S.R = ( 0.43 )2 x 14 = 2.6
(2) S.S.T = 4
(3) S.S.E = 4 – 2.6 = 1.4
(4) ANOVA table.
Source of variation S.S D.F M.S.S. FC

R 2.6 1 2.6
5.5
E 1.4 3 0.47
T 4

(5) Ft ( 1.3 ) = 10.1


Fc < Ft
5.5 10.1  Not significance  No prediction
*No Estimation
2.6
R2 = 0.65 = ‫ــــــــــــ‬
4

65% of the total variation in “ Y ” is explained by the


variation in “ X ”, 35% is explained by the other wise

r = 0.65 = + (0.81) (+) such as sign “b” direct, strong


Exercises
Find the Regression equation, test the significance of
Regression equation , estimate (y) when x=10 then Find
coefficient of correlation & coefficient of determination
by SPSS:
a- X 10 8 5 9 8
Y 3 2 1 3 1

b- X 2 3 4 5 6
Y 11 19 31 34 35
c- X 4 5 9 10 17 10 8 15 7
Y 5 6 15 25 28 22 12 24 7

d- X 14 35 22 29 6 15 17 20 12 29

Y 28 66 38 70 22 27 28 47 14 68

You might also like