You are on page 1of 17

LINEAR REGRESSION

Apa itu Regresi Linier ?


• Regresi merupakan alat ukur yg digunakan untuk
mengetahui ada tidaknya korelasi antarvariabel.
• Analisis regresi lebih akurat dlm analisis korelasi
karena tingkat perubahan suatu variabel terhdp
variabel lainnya dpt ditentukan). Jadi pada
regresi, peramalan atau perkiraan nilai variabel
terikat pada nilai variabel bebas lebih akurat pula.
• Regresi linier adalah regresi yang variabel
bebasnya (variabel X) berpangkat paling tinggi
satu. Utk regresi sederhana, yaitu regresi linier yg
hanya melibatkan dua variabel (variabel X dan Y).
LINEAR REGRESSION?
• Regression is a measuring tool that is used to determine
whether there is a correlation between the variables.
• Regression analysis is more accurate within a correlation
analysis because the rate of change of a variable to accuse
other undetermined variables). So in the regression,
forecasting or estimated value of the dependent variable on
the value of the independent variable is more accurate.
• Linear regression is a regression of the independent variables
(variables X) highest ranking one. For simple regression, is a
linear regression that only involves two variables (variables X
and Y).
Linear Regression Variable
Y = a + bX

Y = dependent variable
X = independent variable
a = intercept / Constanta
b = coefficient regression / slope
 xy 
Y   2 x
 x 
How to find the value of a and b
• Formula 1 a
(Y )(X 2 )  (X )(XY )
(n)(X 2 )  (X ) 2
(n)(XY )  (X )(Y )
b
(n)(X 2 )  (X ) 2

• Formula 2: (Matrix)
 n X  a   Y 
    
2  

 X X  b   XY 
det A1 det A2
a b
det A det A
 n X   Y X   n Y 
A   
2
A   
2
A   
 X X   XY X   X XY 
1 2

det A  (n)(X 2 )  (X )(X )


det A1  (Y )(X 2 )  (X )(XY )
det A2  (n)(XY )  (Y )(X )
• Formula 3
(n)(XY )  (X )(Y )
b
(n)(X )  (X )
2 2

__ ___
a  Y  b. X
• Formula 4:
(Deviation) (  X ) 2

 x  X  n
2 2

( Y ) 2

 y  Y  n
2 2

X .Y
 xy  XY  n
1   xy
 x 2

__ ___
 0  Y  1. X
Example:
• The following data show: Work experience and sales
• X = work experience (years)
Y = sales (thousands)

X 2 3 2 5 6 1 4 1
Y 5 8 8 7 11 3 10 4

• Determine the value of a and b (using all Formula)?


• Generate the regression equation! How many sales
turnover of an employee who works 3.5 years
experience
X Y X2 Y2 XY (8)(198)  (24)(56)
2 5 4 25 10 b
3 8 9 64 24
(8)(96)  (24) 2
2 8 4 64 16 1.584  1.344
5 7 25 49 35 b  1,25
6 11 36 121 66 768  576
1 3 1 9 3
4 10 16 100 40
Formula 2.
1 4 1 16 4
24 56 96 448 198  8 24  a   56 
     
___
24 ___
56  24 96  b  198 
X  3 Y  7
8 8  8 24   56 24   8 56 
A    A1    A2   
Formula 1:  24 96  198 96   24 198 
det A  (8)(96)  (24)(24)  192
(56)(96)  (24)(198)
a det A1  (56)(96)  (24)(198)  624
(8)(96)  (24) 2
det A2  (8)(198)  (56)(24)  240
5.376  4.752
a  3,25 a
624
 3,25 b
240
 1,25
768  576 192 192
Formula 3: (8)(198)  (24)(56)
b
(8)(96)  (24) 2
1.548  1.344
b  1,25
768  576
a  7  1,25(3)
a  3,25
• Of the three ways work is derived values ​a = 3.25
and b = 1.25 value
• Linear regression equation is Y = 3.25 +1.25 X
• Expected value of Y, if X = 3.5 is Y = 3.25 +1.25 X

Y = 3.25 +1.25 (3.5)


Y = 7.625
Coefficient Determination (R2)
((n)(XY )  (X )(Y )) 2
R 
2

( n ( X 2 )  (  X ) 2 ( n (  Y 2 )  ( Y ) 2 )
((8)(198)  (24)(56)) 2
R 
2

(8(96)  (24) 2 (8(448)  (56) 2 )


(1.584  1.344) 2
R 
2

(768  576) (3.584  3.136)


(240) 2 57.600
R 
2
  0,6696
(192)(448) 86.016

Value of determination (R2) of 0.6696, meaning that the contribution or effect


of work experience on the ups and downs of sales turnover amounted to
66.96%.
The rest is 33.04% Caused by other factors not included in the model.
STANDARD DEVIATION
• Angka indeks yg digunakan utk mengukur ketepatan
suatu penduga atau mengukur jumlah variasi titik-
titik observasi di sekitar garis regresi.
• Jika semua titik observasi berada tepat pada garis
regresi, selisih taksir standar sama dengan nol.
Menunjukkan pencaran data.
• Selisih taksir standar berguna mengetahui batasan
seberapa jauh melesetnya perkiraan dalam meramal
data.
STANDARD DEVIATION
• Index numbers that are used for measuring the
accuracy of an estimate or measure the amount of
variation in observation points around the regression
line.
• If all observation points are right on the regression
line, the difference in the standard estimate is equal
to zero. Indicates the data scatter.
• Difference in standards appraiser useful to know how
far the limits of failing to predict the estimated data.
Formula
(Y  Y ' ) 2
S y / x  S x. y  Se 
n2
or :
( X  Y ' ) 2
S x / y  S y. x  Se 
n2

Sy / x = Sx / y = Difference appraiser standards


Y = X = the actual value of the variable
Y '= X' = the expected value of the variable
n = number of frequency
Example:
• The relationship between variables X and Y
X 1 2 3 4 5 6
Y 6 4 3 5 4 2
• Generate the regression equation
• Determine the expected value of Y, if X = 8
• Determine the difference in the standard
estimate
X Y X2 Y2 XY n( XY )  ( X )( Y )
b
1 6 1 36 6 n(  X 2 )  (  X ) 2
2 4 4 16 8 6(75)  (21)(24)
3 3 9 9 9 b
6(91)  (21) 2
4 5 16 25 20
25 16 20  54
5 4 b  0,5
6 2 36 4 12 105
21 24 91 106 75 a  Y  b. X
24  21 
a  (0,5) 
6 6
• Regression equation:
Y’ = 5,75 – 0,5 X
• Expected value of Y 'when X = 8
Y’ = 5,75 – 0,5 (8)
Y’ = 1,75
• Standard Deviation:
2
X Y Y' Y-Y' (Y-Y')
(Y  Y ' ) 2
1 6 5.25 0.75 0.5625
Sy/x 
2 4 4.75 -0.8 0.5625 n2
3 3 4.25 -1.3 1.5625
4 5 3.75 1.25 1.5625 5,375
5 4 3.25 0.75 0.5625 Sy/x  1,2
6 2 2.75 -0.8 0.5625 62
5.375

You might also like