Escolar Documentos
Profissional Documentos
Cultura Documentos
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
__ ___
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
( n ( X 2 ) ( X ) 2 ( n ( Y 2 ) ( Y ) 2 )
((8)(198) (24)(56)) 2
R
2