Beruflich Dokumente
Kultur Dokumente
Ricco Rakotomalala
Ricco.Rakotomalala@univ-lyon2.fr
Position du problme
Identifiant
(Pas utilis pour les calculs, mais peut
tre utilis pour les commentaires :
points atypiques, etc.)
N de parcelle
1
2
3
4
5
6
7
8
9
10
Variables prdictive
Descripteur
Variable exogne
Quantitative ou binaire
Y
16
18
23
24
28
29
26
31
32
34
20
24
28
22
32
28
32
36
41
41
yi = a xi + b + i
Nous disposons donc dun chantillon de n couples de points (xi,yi) i.i.d (indpendants et identiquement
distribus), et on veut expliquer (prdire) les valeurs de Y en fonction des valeurs prises par X.
Le terme alatoire permet de rsumer toute linformation qui nest pas prise en compte dans la
relation linaire entre Y et X (problmes de spcifications, approximation de la linarit, rsumer les
variables qui sont absentes, etc.)
quipe de recherche en Ingnierie des Connaissances
Laboratoire ERIC
Hypothses
Permettent de dterminer les proprits des estimateurs
Et de mettre en place les outils de statistique infrentielle (tests dhypothses, intervalle de confiance)
H1 : Hypothses sur X et Y. Ce sont des grandeurs numriques mesures sans erreur. X est une donne
(exogne) dans le modle, Y est alatoire par lintermdiaire de (c.--d. la seule erreur que lon a sur Y
provient des insuffisances de X expliquer ses valeurs dans le modle).
H2 : Hypothses sur le terme alatoire . Les i sont i.i.d. (indpendants et identiquement distribus)
E ( i ) = 0
V ( i ) = 2
COV ( xi , i ) = 0
(H2.d) Indpendance des erreurs, les erreurs relatives 2 observations sont indpendantes (on dit aussi que
les erreurs ne sont pas corrles )
(H2.e) Loi normale
COV ( i , j ) = 0
i N (0, )
yi
a xi + b
i =1
S =
2
i
[y
i =1
S =
xi
SOLUTION
S
a = 0
S = 0
b
( ax i + b )] 2
ax i b ] 2
[y
i =1
xi y i a xi 2 bx = 0
i
i
y ax b = 0
( yi y )(xi x )
a = i
i (xi x )
b = y ax
Remarque : Pourquoi
pas la somme des
erreurs ? Ou la somme
des carts absolus ?
Equations normales
(Y-YB)
X
16
18
23
24
28
29
26
31
32
34
26.1
20
24
28
22
32
28
32
36
41
41
30.4
(X-XB)
-10.1
-8.1
-3.1
-2.1
1.9
2.9
-0.1
4.9
5.9
7.9
-10.4
-6.4
-2.4
-8.4
1.6
-2.4
1.6
5.6
10.6
10.6
Somme
(Y-YB)(X-XB) (X-XB)^2
105.04
108.160
51.84
40.960
7.44
5.760
17.64
70.560
3.04
2.560
-6.96
5.760
-0.16
2.560
27.44
31.360
62.54
112.360
83.74
112.360
351.6
492.4
351.6
= 0.714
a =
492.4
35
y = 0.7141x + 4.3928
33
31
29
27
25
23
21
19
17
15
15
20
25
30
35
40
45
Quelques commentaires
a =
C O V ( X , Y )
=
r
X2
Y
X
y i = y ( x i )
i = yi y i
= a x i + b
Rsidus de la rgression
Pour la rgression
avec constante !
=0
y ( x ) = ax + b
= ax + ( y ax )
=y
35
33y
= 0.7141x + 4.3928
31
29
27
25
23
21
19
17
15
15
20
25
30
35
40
45
(y
S = ( y i y i )
i =1
y ) = ( y i y i + y i y )
2
= ( y i y i ) + ( y i y ) + 2 ( y i y i )( y i y )
2
=0
Voir dtail des calculs
2
2
2
(
y
y
)
=
(
y
y
)
+
(
y
y
)
i
i i i
Dcomposition
de la variance
10
Coefficient de dtermination
Et coefficient de corrlation linaire multiple
R2
Coefficient de dtermination.
Exprime la part de variabilit de Y explique par le modle.
R 1, le modle est excellent
R 0, le modle ne sert rien
( y
SCE
=
=
SCT ( y
y)
y)
R2 = 1
R2 = 1
SCR
SCT
2
( yi yi )
i
(y
y)
Coefficient de corrlation
linaire multiple R
On montre que
R = R2
rY , X = sgn(a ) R
Lien entre le coefficient de corrlation linaire (de Pearson) et le coefficient de
corrlation linaire multiple de la rgression linaire simple
11
i = yi y i
= 0.714 xi + 4.39
Y
1
2
3
4
5
6
7
8
9
10
Moyenne
(Y-YB)
X
16
18
23
24
28
29
26
31
32
34
26.1
20
24
28
22
32
28
32
36
41
41
30.4
(X-XB)
-10.1
-8.1
-3.1
-2.1
1.9
2.9
-0.1
4.9
5.9
7.9
-10.4
-6.4
-2.4
-8.4
1.6
-2.4
1.6
5.6
10.6
10.6
Somme
(Y-YB)(X-XB) (X-XB)^2
(Y-YB)^2
Y^
105.04
108.160
102.010
51.84
40.960
65.610
7.44
5.760
9.610
17.64
70.560
4.410
3.04
2.560
3.610
-6.96
5.760
8.410
-0.16
2.560
0.010
27.44
31.360
24.010
62.54
112.360
34.810
83.74
112.360
62.410
351.6
492.4
314.9
SCT
ESTIMATION
a
0.714053615
b
4.392770106
18.674
21.530
24.386
20.102
27.242
24.386
27.242
30.099
33.669
33.669
i2
Rsidus
Rsidus^2
-2.674
7.149
-3.530
12.461
-1.386
1.922
3.898
15.195
0.758
0.574
4.614
21.286
-1.242
1.544
0.901
0.812
-1.669
2.785
0.331
0.110
Somme
63.838749
SCR
12
13
Biais
E [a ] = a
E b = b
[]
= a + i i
i
i =
(xi x )
(x
x)
E ( ) = a + E i i
i
E ( ) = a + i E ( i )
Etape 3 : Identifier sous quelles
conditions E() = a
E ( ) = a
14
Biais (suite)
Pour b
b = b + (a a )x
Avec les mmes hypothses, on aboutit
()
E b = b
15
Variance
V (a ) = E[(a a ) ]
2
puisque
= E i i
i
= E i2 i2 + 2 ii ' i i '
i <i '
i
= i2 E i2 + 2 ii ' E ( i i ' )
2
( )
( )
Homoscdasticit
avec
(xi x )
(x
x)
i <i '
V ( i ) = E i2 = 2
i =
= a + i i
E ( i i ' ) = 0
Non-autocorrlation des rsidus
V (a ) =
2
(
)
x
x
i
i
16
Convergence
V (a ) =
2
(
)
x
x
i
i
est convergent
De mme, pour b
Est une valeur qui ne dpend pas des effectifs (variance de lerreur
thorique)
2
(
)
x
x
n
+
i
+
i
V (a ) n
0
+
2
x
1
V b = 2 +
n (xi x )2
()
()
V b n
0
+
17
Caractrisation graphique
o
o
o
o
o
(1)
o o
o
( )
E i =
2
o o
o
o o
o
( )
E i =
2
est faible
V (a )
est lev
la valeur leve de
i
(2)
( )
E i =
2
(x x )
est faible
est faible
Ladjonction dun point suppl mentaire dans la rgression fait bouger la droite
Le mod le est instable galeme nt
18
Thorme de GAUSS-MARKOV
Parmi les estimateurs sans biais, ils sont variance minimale c.--d. il est
impossible de trouver un autre estimateur sans biais plus petite variance
19
On montre que
Giraud & Chaix (1994), page 31
On en dduit un
estimateur sans biais
i = yi y i = axi + b + i axi + b
( )
= i (a a )xi b b
E i2 = (n 2 ) 2
i
2 =
2
i
n2
SCR
n2
xi i = 0
i
i = 0
i
20
Rendements agricoles
(X-XB)
Y
X (Y-YB)
1
16
20
-10.1
2
18
24
-8.1
3
23
28
-3.1
4
24
22
-2.1
5
28
32
1.9
6
29
28
2.9
7
26
32
-0.1
8
31
36
4.9
9
32
41
5.9
10
34
41
7.9
Somme
Moyenne 26.1 30.4
-10.4
-6.4
-2.4
-8.4
1.6
-2.4
1.6
5.6
10.6
10.6
(Y-YB)(X-XB)
105.04
51.84
7.44
17.64
3.04
-6.96
-0.16
27.44
62.54
83.74
351.6
(X-XB)^2 (Y-YB)^2
Y^
108.160
102.010
40.960
65.610
5.760
9.610
70.560
4.410
2.560
3.610
5.760
8.410
2.560
0.010
31.360
24.010
112.360
34.810
112.360
62.410
492.4
314.9
SCT
Rsidus
18.674
21.530
24.386
20.102
27.242
24.386
27.242
30.099
33.669
33.669
-2.674
-3.530
-1.386
3.898
0.758
4.614
-1.242
0.901
-1.669
0.331
Somme
Rsidus^2
7.149
12.461
1.922
15.195
0.574
21.286
1.544
0.812
2.785
0.110
63.83874898
SCR
sigma(epsilon) 7.979843623
ESTIMATION
a
0.714053615
b
4.392770106
V (a ) = =
2
a
(x x )
sigma(a^) 0.01620602
sigma(b^) 15.7749386
SCR (n 2 )
492.4
sigma(a^) 0.127302862
sigma(b^) 3.971767696
a = a2 = 0.0162 = 0.127
7.9798
= 0.0162
492.4
21
22
N (0, )
a a
combinaison linaire de Y
N (0,1)
2
(xi x )
i
Par hypothse
N (0, )
a =
2
2
(xi x )
i
N (0,1)
2
i
i
= i 2 2 (n 2 )
(n 2) 2 2 (n 2)
2
23
On en dduit
ds lors que
a 2
2
(n 2) 2 = (n 2) 2
a
a a
(n 2 )
a
a 2
(n 2) 2 2 (n 2)
a
De la mme
manire, on
montre
b b
(n 2)
b
A partir de ces
lments, on peut
mettre en place
linfrence statistique
[a t
1 2
H 0 : a = a0
H 1 : a a0
H 0 : a = 0
H1 : a 0
24
-10.4
-6.4
-2.4
-8.4
1.6
-2.4
1.6
5.6
10.6
10.6
(Y-YB)(X-XB)
105.04
51.84
7.44
17.64
3.04
-6.96
-0.16
27.44
62.54
83.74
351.6
(X-XB)^2 (Y-YB)^2
Y^
108.160
102.010
40.960
65.610
5.760
9.610
70.560
4.410
2.560
3.610
5.760
8.410
2.560
0.010
31.360
24.010
112.360
34.810
112.360
62.410
492.4
314.9
SCT
ESTIMATION
a
0.714053615
b
4.392770106
Rsidus
7.149
12.461
1.922
15.195
0.574
21.286
1.544
0.812
2.785
0.110
63.83874898
SCR
sigma(epsilon)
7.979843623
0.016206019
15.77493863
sigma(a^)
sigma(b^)
0.127302862
3.971767696
ddl
2.306004133
Somme
t(a^)
t(b^)
t a =
a 0.714
=
= 5.609
a 0.127
Rsidus^2
-2.674
-3.530
-1.386
3.898
0.758
4.614
-1.242
0.901
-1.669
0.331
sigma(a^)
sigma(b^)
18.674
21.530
24.386
20.102
27.242
24.386
27.242
30.099
33.669
33.669
Puisque
5.609093169
rejet H0
1.10599875 acceptation H0
t a > t1 2
Rejet de H0 : a = 0
25
Tableau danalyse
de variance
Statistique de test
Rgion critique au
risque
SCE
F = 1 F (1, n 2)
SCR
n2
F=
R2
1 R2
(n 2)
F > F1 (1, n 2)
Remarque : Tester la significativit de la
rgression et tester la significativit de la pente
sont quivalents dans la rgression simple.
26
-10.4
-6.4
-2.4
-8.4
1.6
-2.4
1.6
5.6
10.6
10.6
(Y-YB)(X-XB)
105.04
51.84
7.44
17.64
3.04
-6.96
-0.16
27.44
62.54
83.74
351.6
(X-XB)^2 (Y-YB)^2
108.160
40.960
5.760
70.560
2.560
5.760
2.560
31.360
112.360
112.360
492.4
Y^
102.010
65.610
9.610
4.410
3.610
8.410
0.010
24.010
34.810
62.410
314.9
Rsidus
18.674
21.530
24.386
20.102
27.242
24.386
27.242
30.099
33.669
33.669
Rsidus^2
-2.674
-3.530
-1.386
3.898
0.758
4.614
-1.242
0.901
-1.669
0.331
Somme
SCT
Tableau d'analyse de variance
Source de variation
SC
DDL
Expliqus (Rgression)
251.061251
Rsidus
63.83874898
Total
314.9
ESTIMATION
a
0.714053615
b
4.392770106
SCE
251.06
F= 1 =
= 31.4619
SCR 7.9798
n2
Puisque
F calcul
31.46192618
DDL1
DDL2
F thorique ( 5%)
1
8
5.317655063
F > F1
1
8
9
7.149
12.461
1.922
15.195
0.574
21.286
1.544
0.812
2.785
0.110
63.83874898
SCR
CM
251.061251
7.979843623
rejet de H0
Remarque :
F = 31.4619 = 5.609 = t a
27
X
16
18
23
24
28
29
26
31
32
34
20
24
28
22
32
28
32
36
41
41
DROITEREG
a 0.71405361 4.392770106 b
b
a 0.12730286 3.971767696
2.8248617
R 2 0.79727295
8 n2
F 31.4619262
SCE 251.061251 63.83874898 SCR
Intervalle
t thorique
Borne basse
Borne haute
de confiance 5%
2.30600413 2.306004133
0.42049269 -4.76614262
1.00761454 13.55168283
28
29
Prvision ponctuelle
y i* = y ( xi* ) = axi* + b
E ( y i* ) = yi*
En effet,
i* = y i* yi*
= axi* + b (axi* + b + i* )
= (a a )x + b b
i*
( )
( ) ]
( )
E (i* ) = E (a a )xi* + b b i*
= x E (a a ) + E b b E (
i*
i*
i*
0
Les EMCO sont sans biais
0
Lerreur du modle est
nulle par hypothse
30
Puisque
i* = y i* yi*
E (i* ) = 0
2
(
)
x
x
1
i*
= 2i*
V (i* ) = E i2* = 2 1 + +
2
n (xi x )
( )
On montre
Giraud & Chaix (1994), page 30
Remarque :
Do la variance estime
de lerreur de prvision
i*
2
(xi* x )
1
= 2 1 + +
n ( xi x )2
(xi* x )
1
hi* = +
n ( xi x )2
2
SCR
n2
(1) 2 =
La variance de
lerreur sera dautant
plus faible que :
2
(2) ( xi* x )
(3)
(x x )
(4) n
est grand c.--d. le nombre dobservations ayant servi la construction du modle est lev.
31
Puisque
i* = y i* yi* N 0, 1 + hi*
N (0, )
(n 2) 2 2 (n 2)
2
y i* yi*
(n 2 )
i*
y i* t1 2 i*
32
Rendements agricoles x* = 38
Y
1
2
3
4
5
6
7
8
9
10
Moyenne
(Y-YB)
X
16
18
23
24
28
29
26
31
32
34
26.1
20
24
28
22
32
28
32
36
41
41
30.4
(X-XB)
-10.1
-8.1
-3.1
-2.1
1.9
2.9
-0.1
4.9
5.9
7.9
-10.4
-6.4
-2.4
-8.4
1.6
-2.4
1.6
5.6
10.6
10.6
Somme
Prdiction ponctuelle
(Y-YB)(X-XB) (X-XB)^2
Y^
105.04
108.160
51.84
40.960
7.44
5.760
17.64
70.560
3.04
2.560
-6.96
5.760
-0.16
2.560
27.44
31.360
62.54
112.360
83.74
112.360
351.6
492.4
2
xi* x )
(
1
2
2
= 1 + +
n (xi x )2
i
i*
1 57.76
= 7.9798 1 + +
10 492.4
= 9.71389
Rsidus
-2.674
-3.530
-1.386
3.898
0.758
4.614
-1.242
0.901
-1.669
0.331
Rsidus^2
7.149
12.461
1.922
15.195
0.574
21.286
1.544
0.812
2.785
0.110
63.838749
sigma(erreur)
7.97984362
18.674
21.530
24.386
20.102
27.242
24.386
27.242
30.099
33.669
33.669
Somme
y i* = axi* + b
= 0.714 38 + 4.39
= 31.5268
ESTIMATION
a
b
0.714053615
4.392770106
x*
y^
38
31.52680747
(x*-xb)^2
57.76
sigma(epsilon^)
9.71389
t (0.975)
2.306004133
borne.basse
borne.haute
24.33965896
38.71395598
35
y = 0.7141x + 4.3928
30
25
20
15
20
25
30
35
40
45
33
34
Modle linaire
Lecture de la pente
Y = aX + b
40
35
30
25
Y
20
Linaire
15
10
a = 3; b = 5
5
0
0
10
15
dy
a=
dx
Y = bX
Modle log-linaire
6000
Log-linaire
5000
4000
3000
2000
1000
a = 3; b = 5
10
12
dy
a=
y
dx
35
Modle exponentiel
(gomtrique)
Y =e
180000
aX + b
160000
Exponentiel
140000
120000
100000
80000
60000
40000
20000
0
a =8 0.7; 10
b = 5 12
6
X
dy
y
a=
dx
Modle logarithmique
12
Y = a ln( X ) + b
Logarithmique
10
a = 2; b = 5
10
12
dy
a=
dx
x
36
Un modle particulier
Le modle logistique
Equation
Linarisation
quipe de recherche en Ingnierie des Connaissances
Laboratoire ERIC
Croissance acclre
large diffusion
y = ymin +
ln(
Freinage
saturation du march
concurrence
ymax ymin
1 + e ax + b
ymax y
) = a x+b
y ymin
37
38
y i = yi y
o
x i = xi x
o
b = y a x = 0
Moyenne
(Y-YB)
X
16
18
23
24
28
29
26
31
32
34
26.1
20
24
28
22
32
28
32
36
41
41
30.4
y=x=0
10
(X-XB)
-10.1
-8.1
-3.1
-2.1
1.9
2.9
-0.1
4.9
5.9
7.9
-10.4
-6.4
-2.4
-8.4
1.6
-2.4
1.6
5.6
10.6
10.6
y = 0.7141x - 2E-15
R = 0.7973
5
0
-15
-10
-5
10
15
-5
-10
-15
39
yi = a xi + i
On veut minimiser
Estimation de la pente
2
S = = ( yi a xi )
S
=0
a
x y
a =
x
2
i
2
i
X
16
18
23
24
28
29
26
31
32
34
20
24
28
22
32
28
32
36
41
41
0
50
Y^.1
18.6738424
21.5300569
24.3862713
20.1019496
27.2424858
24.3862713
27.2424858
30.0987002
33.6689683
33.6689683
4.39277011
40.0954509
Y^.2
17.0248613
20.4298336
23.8348058
18.7273474
27.2397781
23.8348058
27.2397781
30.6447504
34.9009657
34.9009657
0
42.5621533
45
40
35
30
25
20
15
10
5
0
0
10
20
30
40
50
40
A propos du R
A propos des
degrs de libert
2 =
a =
2
SCR
n 1
(x )
a a
(n 1)
a
A propos des
performances
41
Sal.Homme Sal.Femme
7.43
7.20
6.83
7.06
6.97
7.10
7.85
7.39
7.48
6.97
7.86
7.50
7.44
7.16
7.83
7.77
7.36
7.78
7.28
7.47
7.53
7.51
8.40
8.07
7.48
7.25
7.46
6.79
7.33
7.14
7.80
7.38
7.57
7.53
6.02
6.03
7.28
7.05
8.42
8.01
7.42
7.25
7.47
7.59
7.14
7.20
7.29
6.93
8.28
7.85
6.98
7.29
8.03
7.94
7.69
7.11
6.67
6.76
7.92
7.72
yi = a xi + i
Test dhypothses
(Attention : test unilatral ) !
a^
sigma(a)
0
1.021323921
#N/A
0.006821202
0.998708093 0.27418841
22418.42983
29 ddl
1685.401501 2.18019923
a^-1
0.021323921
t calcul
3.126123666
t-thorique (95%)
1.699126996
Conclusion
Rejet de H0
H 0 : a = 1
H1 : a > 1
t =
a 1 1 . 0213 1
=
a
0 . 00682
Bibliographique
43