Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

52
http://christophe.genolini.free.frLicence Stat-info CM5a : 1 ANOVA : introduction

Transcript of Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

Page 1: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 1

ANOVA : introductionANOVA : introduction

Page 2: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 2

DéfinitionDéfinition

• L’ ANOVA est l’analyse des variances. La comparaison des variances nous dira si les moyennes sont significativement différentes

Page 3: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 3

ProblèmeProblème

• On cherche a détecter d’un phénomène particulier :– Flûtiste exceptionnelle ou moyenne

– Groupe de TD super bon

– Caillou dans la mer

Page 4: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 4

FlûtisteFlûtiste

Silence Cécile seule

Cécile avec les autresLes autres sans Cécile

Page 5: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 5

Quiz : je mélange…Quiz : je mélange…

Page 6: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 6

Quiz : je mélange…Quiz : je mélange…

Trop facile :Cécile seule

Ultra facile :Silence

Heu…

Ben…

Page 7: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 7

Pourquoi ?Pourquoi ?

La variance ici est nulle Ici, la variance est de 0,5

C’est une grosse différence.Elle EST significative

Ici, la variance ici est 17,43 Ici, la variance est de 17,93

Entre 17,43 et 17,93la différence N’EST

PAS significative

Page 8: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 8

IntuitivementIntuitivement

• Vinter (Variance Inter) est la variance que l’on cherche à détecter.

• Vintra (Variance Intra) est le « bruit », la variabilité du au hasard (variabilité biologique)

Page 9: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 9

IntuitivementIntuitivement

Vintra = 0Vinter = 0,5

Vintra = 17,43Vinter = 0,5

On détecte la flûte ou son absence

On détecte l’orchestre mais la flûte seule est impossible à entendre

Page 10: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 10

Formulation du problèmeFormulation du problème

• On dispose de plusieurs groupes de donnée (ici, des bandes sonores). On cherche à détecter quelque chose (ici, la flûte)

• Pour le savoir, on calcule Vintra et Vinter– Vintra mesure la variabilité biologique (ici, le bruit)

– Vinter mesure ce que l’on cherche vraiment (ici, la flûte)

• Si Vinter est grand devant Vintra, on a détecté quelque chose.

• Si Vinter est petit devant Vintra, la variabilité biologique est trop forte, elle empêche toute détection.

Page 11: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 11

La flûteLa flûte

Vintra = 0Vinter = 0,5

Vintra = 17,43Vinter = 0,5

On détecte la présence d’une flûte dans le groupe 2

On ne détecte pas la présence de la flûte dans le groupe 2

Page 12: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 12

Décomposition en facteursDécomposition en facteurs

Page 13: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 13

Autre approche : Mini QCMAutre approche : Mini QCM

La note de l’élève 2 groupe 1 (Yvon) est 19. Pourquoi ?

Groupe 1 Groupe 2 Groupe 3Elève 1 16 16 11Elève 2 19 10 12Elève 3 13 11 5Elève 4 14 14 7Elève 5 17 15 12Elève 6 18 8 6Elève 7 13 10 13Elève 8 13 15 9Elève 9 12 9 6

Moyenne 15,00 12,00 9,00

Moyenne générale 12

Page 14: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 14

Étude de la note d’YvonÉtude de la note d’Yvon

• La moyenne générale est de 12.– Yvon a +7 par rapport à la moyenne générale

• La moyenne de groupe 1 est de 15– Yvon a +4 par rapport à la moyenne du groupe 1

– Le groupe 1 a +3 par rapport à la moyenne générale

Page 15: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 15

Étude de la note d’YvonÉtude de la note d’Yvon

• On peut donc « expliquer » la note d’Yvon comme

19 = 12 + 3 + 4Note d’Yvon

Moyenne générale(contrôle facile)

Effet du groupe 1(super prof)

Particularité d’Yvon(sa variabilité biologique :

Yvon est plutôt bon)

Page 16: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 16

Étude de la note de JustinÉtude de la note de Justin

• Justin, élève 4 groupe 1 à 14

• On peut donc « expliquer » la note de Justin :

14 = 12 + 3 - 1Note de Justin

Moyenne générale(contrôle facile)

Effet du groupe 1(super prof)

Particularité de Justin

Page 17: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 17

Étude de la note de GastonÉtude de la note de Gaston

• Gaston, élève 7 groupe 3 à 13

• On peut donc « expliquer » la note de Gaston :

13 = 12 - 3 + 4Note de Gaston

Moyenne générale(contrôle facile)

Effet du groupe 3(prof pas terrible)

Particularité de Gaston

Page 18: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 18

FormalisationFormalisation

• On peut donc « expliquer » la note d’Yvon comme

19 = 12 + 3 + 4Note

Moyenne générale Variabilité entre les groupes

Variabilité personnelle, à l’intérieur du groupe

Page 19: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 19

Que cherche-t-on ?Que cherche-t-on ?

• La variabilité personnelle dépend de nombreux facteurs– On ne peut pas l’expliquer.

• C’est la variabilité entre groupes qui nous intéresse ici– Si les groupes ont des moyennes significativement différentes, on

pourra ensuite examiner des causes éventuelles : différences entre les profs, meilleur matériel, meilleur emploi du temps…

Page 20: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 20

FormellementFormellement

Page 21: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 21

H0H0

• Hypothèse H0 : il n’y a pas de différence entre les groupes. Ils ont même moyenne et même variance

• On ne s’intéresse pas au groupe mais aux populations qu’ils représentent : on travaille avec

Page 22: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 22

Calcul de VintraCalcul de Vintra

• Notations – k est le nombre de groupe (ici, k=3)– n est le nombre d’élève dans chaque groupe (n=9)– N est le nombre total d’élève (N=27) i

2 est la variance du groupe i (12=1,5)

– Xi est la moyenne du groupe i (X1=15)– X est la moyenne générale (X=12)

Groupe 1 Groupe 2 Groupe 3Elève 1 16 12 12Elève 2 15 10 9Elève 3 14 11 7Elève 4 16 14 7Elève 5 17 13 10Elève 6 15 12 9Elève 7 14 10 10Elève 8 13 15 9Elève 9 15 11 8

Moyenne 15,0 12,0 9,0Variance 1,5 3,0 2,5

Page 23: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 23

Calcul de VintraCalcul de Vintra

• La variance d’un groupe représente son hétérogénéité ou sa variabilité biologique interne.

• Vintra est la variabilité biologique interne de tous les groupe (le « bruit » global). Pour l’évaluer, on prend simplement la moyenne des variances des groupes :

2,33

2,531,5kσ

Vintra2

i

Groupe 1 Groupe 2 Groupe 3Elève 1 16 12 12Elève 2 15 10 9Elève 3 14 11 7Elève 4 16 14 7Elève 5 17 13 10Elève 6 15 12 9Elève 7 14 10 10Elève 8 13 15 9Elève 9 15 11 8

Moyenne 15,0 12,0 9,0Variance 1,5 3,0 2,5

Page 24: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 24

Les clones sont parmi nous…Les clones sont parmi nous…

• Si on travaillait sur des « clones » (aucune différence entre les individus d’un groupe), il n’y aurait aucune variance à l’intérieur des groupes :

Groupe 1 Groupe 2 Groupe 3Clone 1 15 12 9Clone 2 15 12 9Clone 3 15 12 9Clone 4 15 12 9Clone 5 15 12 9Clone 6 15 12 9Clone 7 15 12 9Clone 8 15 12 9Clone 9 15 12 9

Moyenne 15,0 12,0 9,0Variance 0,0 0,0 0,0

03

000kσ

Vintra2

i

Page 25: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 25

Calcul de VinterCalcul de Vinter

• La moyenne d’un groupe est une mesure du niveau moyen du groupe.

• Vinter est la variabilité entre les groupes. Pour l’évaluer, on prend simplement la variance des moyennes multipliés par l’effectif :

81

2

129121212159

1k

XXn Vinter

2222i

Groupe 1 Groupe 2 Groupe 3Elève 1 16 12 12Elève 2 15 10 9Elève 3 14 11 7Elève 4 16 14 7Elève 5 17 13 10Elève 6 15 12 9Elève 7 14 10 10Elève 8 13 15 9Elève 9 15 11 8

Moyenne 15,0 12,0 9,0Variance 1,5 3,0 2,5

Page 26: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 26

Calcul pratique (réveil !!!)Calcul pratique (réveil !!!)

Groupe 1 Groupe 2 Groupe 3Elève 1 16 12 12Elève 2 15 10 9Elève 3 14 11 7Elève 4 16 14 7Elève 5 17 13 10Elève 6 15 12 9Elève 7 14 10 10Elève 8 13 15 9Elève 9 15 11 8

Moyenne 15,0 12,0 9,0 Vinter = 9 x variance(B12:D12) = 81,0Variance 1,5 3,0 2,5 Vintra = Moyenne(B13:D13) = 2,3

Page 27: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 27

Des clones partoutDes clones partoutG1 G2 G3

C1 12 12 12C2 12 12 12C3 12 12 12C4 12 12 12

Moy 12 12 12 Vinter 0Var 0 0 0 Vintra 0

G1 G2 G3C1 14 12 10C2 14 12 10C3 14 12 10C4 14 12 10

Moy 14 12 10 Vinter 16Var 0 0 0 Vintra 0

G1 G2 G3C1 17 14 18C2 13 17 12C3 11 5 6C4 7 12 12

Moy 12 12 12 Vinter 0Var 17,333 26 24 Vintra 22,4

G1 G2 G3C1 19 14 16C2 15 17 10C3 13 5 4C4 9 12 10

Moy 14 12 10 Vinter 16Var 17,333 26 24 Vintra 22,4

Les profs et les élèves sont des clones :Pas de variabilité du tout

Les profs sont des clones :Variabilité à l’intérieur des groupes,

mais pas entre les groupes

Les élèves sont des clones :Variabilité entre les groupes,

mais pas à l’intérieur

Situation réelle :Variabilité à l’intérieur des groupes

et également entre les groupes

Page 28: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 28

Retour au problèmeRetour au problème

• Y a-t-il des différences entre les groupes ?

Page 29: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 29

Retour au problèmeRetour au problème

• Y a-t-il des différences entre les groupes ?

Vinter = 0

La réponse est trivialement non !

Page 30: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 30

Retour au problèmeRetour au problème

• Y a-t-il des différences entre les groupes ?

G1 G2 G3C1 12 12 12C2 12 12 12C3 12 12 12C4 12 12 12

Moy 12 12 12 Vinter 0Var 0 0 0 Vintra 0

Les profs et les élèves sont des clones :Pas de variabilité du tout

Vinter = 0

La réponse est trivialement non car Vinter=0 indiquel’égalité entre les moyennes des groupes

G1 G2 G3C1 17 14 18C2 13 17 12C3 11 5 6C4 7 12 12

Moy 12 12 12 Vinter 0Var 17,333 26 24 Vintra 22,4

Les profs sont des clones :Variabilité à l’intérieur des groupes,

mais pas entre les groupes

Page 31: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 31

Retour au problèmeRetour au problème

• Y a-t-il des différences entre les groupes ?

Page 32: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 32

Retour au problèmeRetour au problème

• Y a-t-il des différences entre les groupes ?

Vinter = 16 Vintra = 0

La réponse est oui car on détecte une différence entre les moyennes sans que des variations internes (bruit) gênent cette détection…

Page 33: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 33

Retour au problèmeRetour au problème

• Y a-t-il des différences entre les groupes ?

Vinter = 16 Vintra = 0

La réponse est oui car on détecte une différence entre les moyennes sans que des variations internes (bruit) gênent cette détection…

G1 G2 G3C1 14 12 10C2 14 12 10C3 14 12 10C4 14 12 10

Moy 14 12 10 Vinter 16Var 0 0 0 Vintra 0

Les élèves sont des clones :Variabilité entre les groupes,

mais pas à l’intérieurPas de bruit

Détection possible

Page 34: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 34

Retour au problèmeRetour au problème

• Y a-t-il des différences entre les groupes ?

Page 35: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 35

Retour au problèmeRetour au problème

• Y a-t-il des différences entre les groupes ?

Vinter = 16 Vintra = 22,4

La réponse est moins nette. Peut-être qu’une différence existe mais le bruit nous empêche de la détecter. On ne rejette pas H0

Page 36: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 36

Retour au problèmeRetour au problème

• Y a-t-il des différences entre les groupes ?

Vinter = 16 Vintra = 22,4

G1 G2 G3C1 19 14 16C2 15 17 10C3 13 5 4C4 9 12 10

Moy 14 12 10 Vinter 16Var 17,333 26 24 Vintra 22,4

Situation réelle :Variabilité à l’intérieur des groupes

et également entre les groupes

La réponse est moins nette. Peut-être qu’une différence existe mais le bruit nous empêche de la détecter. On ne rejette pas H0

Trop de bruitDétection impossible

Page 37: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 37

Comment conclure ?Comment conclure ?

• Si Vinter=16 et Vintra=0 : on rejette H0

• Si Vinter=0 et Vintra=22,4 : on rejette H0

• Entre les deux, si Vinter=18 et Vintra=7 ?

On utilise le test pour comparer les variances :

le F de Fisher

Page 38: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 38

F de FisherF de Fisher

Page 39: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 39

F de Fisher : comme d’habF de Fisher : comme d’hab

• On calcule le F observé

• On calcule la probabilité de F

• Autre méthode : lecture du F théorique sur une table

– Si FObs > FTh, la différence est significative, on rejette H0

– Si FObs < FTh, la différence n’est pas significative, on ne rejette pas H0

Page 40: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 40

Calcul du F observéCalcul du F observé

VintraVinterFObs

• Puis la probabilité d’obtenir un tel F si SEULEMENT la variabilité biologique est en jeu est :

Loi.F(Fobs,DDL dessous,DDL dessus)

Page 41: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 41

Calcul des DDLCalcul des DDL

• V inter est une variance– Son DDL est de le nombre de groupe moins 1

– DDL inter=k-1

• Vintra est la moyenne des variances– Son DDL est la somme des DDL de chacun des groupes

– Chaque groupe a un DDL de n-1

– DDL intra = n-1 + n-1 + … + n-1 = N-k

Page 42: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 42

ExempleExemple

• DDL inter = k-1 = 3-1 = 2

• DDL intra = N-k = 27 – 3 = 24

Groupe 1 Groupe 2 Groupe 3Elève 1 16 12 12Elève 2 15 10 9Elève 3 14 11 7Elève 4 16 14 7Elève 5 17 13 10Elève 6 15 12 9Elève 7 14 10 10Elève 8 13 15 9Elève 9 15 11 8

Moyenne 15,0 12,0 9,0 Vinter = 9 x variance(B12:D12) = 81,0Variance 1,5 3,0 2,5 Vintra = Moyenne(B13:D13) = 2,3

35,22,381

VintraVinterFObs

Page 43: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 43

Lecture du F théoriqueLecture du F théorique

• Cette fois-ci, on lit le F sur la table 5% (parce ce que on doit tester Vinter/Vintra, mais pas Vintra/Vinter

• FTh=3,40

FObs étant plus grand que FTh, on peut rejeter H0 :

il existe une différence significative entre les moyennes

Risque 5%1 2 3 4 5 6

1 161,40 199,50 215,70 224,60 234,20 …2 18,51 19,00 19,16 19,25 19,30 …3 10,13 9,55 9,28 9,12 9,01 …

… … … … … … …24 4,26 3,40 3,01 2,78 2,62 …

… … … … … … …

DDL de la variance du DESSUS

DDL de la variance du DESSOUS

Page 44: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 44

Risque 5%Risque 5%

• On veut savoir si Vinter/Vintra est grand– On teste donc au risque 5%

• Pour la comparaison des variances, on voulait savoir si V1/V2 était grand OU si V2/V1 était grand.– On devait donc tester V1/V2 au risque 2,5% et V2/V1 au risque 2,5%

– Grâce a une astuce, on avait qu’un seul des deux tests à faire, mais ca ne changeait rien au seuil

Page 45: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 45

Groupes de taille variableGroupes de taille variable

Page 46: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 46

Vintra : Groupes de taille variableVintra : Groupes de taille variable

• Rappel : pour les groupes de même taille :

– Vintra = moyenne des variances =

• Pour des groupes de taille variable :

– Vintra = moyenne des variances PONDEREE par les DDL :

• Si les k groupes ont la même taille n, les formules coïncident

kσ 2

i

DDLi

σDDLiVintra

2i

knσn

nσn

DDLiσDDLi 2

i2

i2

i2

i

Page 47: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 47

Vinter : Groupes de taille variableVinter : Groupes de taille variable

• Rappel : pour les groupes de même taille :

– Vinter = n x variances des moyennes =

• Pour des groupes de taille variable :– Vinter = variances des moyennes PONDEREE par les tailles :

• Si les groupes ont la même taille n, les formules coïncident

1k

XXn

1kXX

n

2i

2i

1k

XXnVinter

2ii

1kXX

n1k

XXn1k

XXn2

i2

i2

ii

Page 48: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 48

Exemple : mini QCMExemple : mini QCMGr 1 Gr 2 Gr 320 20 2015 20 2015 20 2015 16,7 20

11,2 16,7 16,710 15 156,7 15 155 105 0

4,55

TotalMoyenne Xi 10,2 17,6 15,2 13,8Variance si 29,2 5,4 44,1Nombre ni 11 7 9 27DDLi 10 6 8 24

ni x (Xi-X)² 140,8 102,6 17,5 Vinter = somme[ni x (Xi-X)²] / (k-1) (140,8+102,6+17,5)/2= 130,5DDLi x si 292,2 32,5 352,5 Vintra = somme(DDLi x si) / somme(DDLi) (292,2+32,5+352,5)/(10+6+8)= 28,2

Fobs=Vinter/Vintra= 4,624Fth= 3,40

Page 49: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 49

ConclusionConclusion

• L’hypothèse « toutes les moyennes sont les mêmes » est rejetée.

toutes les moyennes ne sont pas les mêmes MAIS on ne sait pas ou sont les différences

Page 50: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 50

ConclusionConclusion

• Les moyennes sont 10,2 ; 15,2 et 17,6

• On sait qu’il existe au moins une différence significative.– Entre 10,2 et 15,2 ?

– Entre 10,6 et 17,6 ?

– Entre 15,2 et 17,6 ?

Page 51: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 51

Pour le savoir : T de Student…Pour le savoir : T de Student…

• Rappel : pour comparer deux moyennes :

• Ici, au lieu de calculer la variance commune, on va utiliser Vintra

MSAPACom

MSAPA

N1

N1σ

XXT

2NN

)²(s1)(N)²(s1)(NσMSAPA

MSMSGAPAAPACom

G2G1

G2G1

N1

N1Vintra

XXT

Page 52: Http://christophe.genolini.free.frLicence Stat-infoCM5a : 1 ANOVA : introduction.

http://christophe.genolini.free.fr Licence Stat-info CM5a : 52

Pour le savoir : T de Student…Pour le savoir : T de Student…

1,947

71

11128,2

15,210,2T

• DDL des 2 groupes = (11-1) + (7-1) = 16

• T th = 2,120

La différence entre 10,2 et 15,2 N’est PAS significative