Académique Documents
Professionnel Documents
Culture Documents
PPGEP
REGRESSO LINEAR
SIMPLES
PPGEP
UFRGS
PPGEP/UFRGS
PPGEP
PPGEP
PPGEP
PPGEP/UFRGS
PPGEP/UFRGS
PPGEP
PPGEP
PPGEP
S xx =
2
xi
PPGEP
( xi )
n
S xy =
yi2 ( yi ) 2
Covarincia de X,Y:
xi yi ( xi )( yi )
n
Coeficiente de correlao
Para uma interpretao adequada do coeficiente de
Desvio-padro de Y:
S yy =
PPGEP/UFRGS
PPGEP/UFRGS
Correlao
r ( x, y ) =
PPGEP/UFRGS
S xy
S xx S yy
PPGEP/UFRGS
PPGEP
PPGEP/UFRGS
PPGEP
PPGEP
PPGEP/UFRGS
Por exemplo.
PPGEP
10
Rendimento de combustvel
12
Os dados a seguir
1
10,7
7
9,0
2
10,9
8
9,3
PPGEP/UFRGS
3
10,8
9
7,6
4
9,3
10
7,6
5
9,5
11
7,9
6
10,4
12
7,7
11
Co
11
10
9
8
7
0
10 12
12
Clculos iniciais
PPGEP
xi = 78,00 ;
yi = 110,70 ;
X^2
1
4
9
16
25
36
49
64
81
100
121
144
650
Y^2
114,49
118,81
116,64
86,49
90,25
108,16
81
86,49
57,76
57,76
62,41
59,29
1039,55
X*Y
10,7
21,8
32,4
37,2
47,5
62,4
63
74,4
68,4
76
86,9
92,4
673,1
xi2 = 650,00;
yi2 = 1039,55;
PPGEP/UFRGS
PPGEP
PPGEP
46,45
xy
Coeficiente de correlao: r = S S = 143,00 x 18,34 = 0,907
xx
yy
14
PPGEP/UFRGS
H1 : 0
r n2
1 r2
PPGEP/UFRGS
2
Desvio-padro de X: S XX = xi2 ( xi ) n = 650 (78)2 / 12 = 143,00
13
t=
Clculos
Meses(X) Rendimento(Y)
1
10,7
2
10,9
3
10,8
4
9,3
5
9,5
6
10,4
7
9
8
9,3
9
7,6
10
7,6
11
7,9
12
7,7
78
110,7
6,5
9,225
PPGEP
15
t > t / 2,n 2
0,907 12 2
1 ( 0,907)2
16
PPGEP
PPGEP
PPGEP/UFRGS
PPGEP
Y = 0 + 1 X + (1)
Clculos iniciais
xi = 78,00 ; xi2 = 650,00
yi = 110,70 ; yi2 = 1039,55
18
; X = 6,50
; Y = 9 ,225
L = (yi - b0 - b1 xi)2
PPGEP/UFRGS
S XX = xi2 ( xi ) n = 143
bo = Y b1 X
PPGEP/UFRGS
b1 = SXY / SXX
E (Y/X) = 0 + 1 X
17
PPGEP
19
DE NOVO
SXY = xi yi ( xi )( yi ) n = 46,45
Estimativa dos parmetros:
b1 = SXY / SXX = -46,45 / 143,00 = -0,325
b0 = = 9,225 - (-0,325) 6,50 = 11,34
Equao de regresso
Y = 11,34 - 0,325 X
PPGEP/UFRGS
20
PPGEP
PPGEP
n 1
(1 r 2 ) S y2
n2
Se n grande, temos:
S
1 r S 2y
PPGEP/UFRGS
PPGEP
(Yi Y )
(Y$i Y )
Xi
21
PPGEP
no foram investigados
23
22
Y= bo+b1 X
(Yi Y$i )
n S XX
PPGEP/UFRGS
24
PPGEP
(
)
b1 N (1 ,b2 1 )
b0 N 0 ,b2 0
ento calcula-se:
Z = (b1 - 10) / b1
PPGEP/UFRGS
PPGEP/UFRGS
PPGEP
(2)
PPGEP/UFRGS
26
25
t = b1 / Sb1
27
S 2 = SQR /( n 2 ) = 0 ,324 ;
Sb21 = S 2 / S XX = 0 ,00227
1 X2
Sb20 = S 2 +
n S XX
S = 0 ,569
;
= 0 ,123 ;
PPGEP/UFRGS
Sb 1 = 0 ,0476
Sb 0 = 0,351
28
PPGEP
PPGEP
t0,025;10 = 2,228
PPGEP/UFRGS
PPGEP
PPGEP
= S
( x 0 X ) 2
S XX
PPGEP/UFRGS
2 1
PPGEP/UFRGS
29
S Y2 p
Previso de valores de Y
31
( )
PPGEP/UFRGS
32
PPGEP
S XX
n
( )
PPGEP/UFRGS
PPGEP
9
8
7
4
8 10 12
SY
= 0 ,179
SY
= 0 ,597
34
11
10
S XX
12
( x0 X ) 2 = 0,0157
PPGEP/UFRGS
Co
33
35
Ri = yi ( b0 + b1xi )
S
S2 = SQR / n 2
Adequao do ajuste
A adequao do ajuste testada plotando os resduos em
funo de X. Se o ajuste for bom, os resduos seguiro um
padro aleatrio. Caso contrrio, alguma tendncia
curvilnea ser observada.
PPGEP/UFRGS
36
Re 0
Re 0
-1
-1
(a)
12
16
20
12
16
20
(b)
onde X =
PPGEP
3
2
Re 0
Re 0
-1
-1
-2
-2
0
(a)
12
16
20
-3
0
12
16
20
(b)
38
PPGEP/UFRGS
37
Homogeneidade da varincia
PPGEP/UFRGS
-2
-2
Homogeneidade da varincia
PPGEP/UFRGS
PPGEP
PPGEP
PPGEP
39
PPGEP/UFRGS
40
PPGEP
PPGEP
Se o objetivo construir um modelo de regresso, devese coletar dados nos extremos do intervalo de X, ou
seja, nos limites de interesse e viabilidade prticos ou
nos limites em que se supe vlida a relao linear.
PPGEP/UFRGS
(Yi Y ) 2 = [ yi (b0 + b1 X i )] + [ ( b0 + b1 X i ) Y ]
2
42
Tabela ANOVA
A tabela ANOVA, contendo o formulrio prtico para o
MQReg = SQReg / 1
MQR = SQR / (n - 2)
41
PPGEP
(Yi Y ) = [ yi (b0 + b1 X i )] + [ ( b0 + b1 X i ) Y ]
43
Fonte de
Variao
Regresso
Residual
Total
SQ
GDL
MQ
SQReg = b1 SXY
SQR=SYY - b1SXY
SYY
1
n-2
n-1
MQReg
MQR
MQReg/MQR
PPGEP/UFRGS
44
PPGEP
Soluo:
SYY = 18,34
SXY = - 46,45
b1 = - 0,325
SQR = 3,24
Assim
SQReg = b1 SXY = - 0,325 (- 46,45) = 15,10
PPGEP/UFRGS
PPGEP
GDL
MQ
15,10
3,24
18,34
1
10
11
15,10
0,324
46,6
SQ Re g 15,10
=
= 0,82 ou 82%
18,34
SYY
46
PPGEP
SQ
PPGEP/UFRGS
45
Dados Atpicos
Fonte de
Variao
Regresso
Residual
Total
47
PPGEP/UFRGS
48
PPGEP
PPGEP
f(y) = b0 + b1 g(X) +
Y* = b0 + b1 X* +
Os possveis valores de
etc. Igualmente, para
ln x, etc.
X*
y2 ,
PPGEP
Y*
PPGEP/UFRGS
49
50
Exerccios
PPGEP
51
3
3
3
6
6
6
9
9
9
12 12 12
26,0 21,5 33,5 36,0 27,5 37,0 41,5 28,0 39,5 43,0 37,0 50,5
PPGEP/UFRGS
52
PPGEP
PPGEP
PPGEP/UFRGS
Temperatura
Produtividade
21,2 20,3 22,7 22,0 22,3 23,5 24,8 24,2 25,5 25,2 25,5 25,8
Temperatura
Produtividade
27,5 26,3 28,2 28,6 29,0 29,7 30,7 30,3 30,2 31,4 32,5 32,7
142
132
148
131
137
132
124
117
145
122
138
131
124
111
119
133
129
123
128
116
PPGEP/UFRGS
53
54
PPGEP
PPGEP/UFRGS
55
V o l. d e
T r fe g o
V e lo c id .
M d ia
10
10
15
15
20
20
25
25
30
30
9 5 ,6
9 3 ,8
7 4 ,4
7 4 ,8
5 0 ,5
5 1 ,5
4 4 ,6
4 2 ,4
3 5 ,8
3 8 ,7
3 2 ,0
3 ,2
3 0 ,1
2 9 ,1
PPGEP/UFRGS
56
PPGEP
PPGEP/UFRGS
57