23
http://christophe.genolini.free.frLicence Stat-info CM4a : 1 Changement de groupe TD Lebossé Olivier 8h00 : M105 Charbonnier Guillaume ? 8h00 : M105 Missoup Nadege 9h30 : DD407 Neila Frédéric 9h30 : DD407

Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier 8h00 : M105 Charbonnier Guillaume ? 8h00 : M105

Embed Size (px)

Citation preview

Page 1: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

Changement de groupe TDChangement de groupe TD

• Lebossé Olivier 8h00 : M105

• Charbonnier Guillaume ? 8h00 : M105

• Missoup Nadege 9h30 : DD407

• Neila Frédéric 9h30 : DD407

Page 2: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

Comparaison de deux groupesComparaison de deux groupes

Page 3: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

Comparaison de moyennesComparaison de moyennes

• On sait comparer la moyenne d’un groupe à la moyenne d’une population.

• Maintenant, on veut comparer deux groupes entre eux :

• Exemple : – licence APA : XAPA = 12, nombre d’étudiant NAPA=25

– Licence MS : XMS = 11, nombre d’étudiant NMS=36

– Au niveau national : APA = 0,8 , MS = 1,1

A-t-on 12≠S11 ?

Page 4: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

Première difficultéPremière difficulté

APA = moyenne nationale des APA

MS = moyenne nationale des MS

Problème : on ne connaît pas les moyennes nationales

• On ne peut donc pas comparer – XAPA à APA

– XMS à MS

Page 5: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

SolutionSolution

Solution : H0 : les moyennes sont les mêmes

• On suppose que les moyennes nationales sont les mêmes APA = MS

• On connaît donc la différence des moyennes : APA – MS = 0

• Ensuite, on compare XAPA – XMS à APA – MS

c’est-à-dire on compare XAPA – XMS à 0

Page 6: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

ConclusionConclusion

• On compare donc XAPA – XMS avec la distribution des différence des moyennes d’échantillonnage (DDEX)

Moyenne : DDEX = XAPA – XAPA = 0

Écart type :

• Puis on conclut avec la loi normale :

MS

MS

APA

APADDEX

N)²(σ

N)²(σσ

DDEX

MSAPA

σ

DDEX XXZ

DDEX

MSAPA

σ

XXZ

Page 7: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

ExempleExemple• On compare donc 12 – 11 avec la distribution des

différence des moyennes d’échantillonnage (DDEX)

Moyenne : DDEX = APA – MS = 0

Écart type :

• Puis on conclut avec la loi normale :

P = 0,006%

On rejette H0

0,2436

1,1² 25

0,8²σDDEX

4,110,24

11 12Z

Page 8: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

T de StudentT de Student

Page 9: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

Deuxième problème (petit air de déjà vu)Deuxième problème (petit air de déjà vu)

Généralement, on connaît ni APA ni MS

• On remplace APA par sAPA et MS par sMS

• Si NAPA et NMS sont grands (>30) : pas de problème, APA et MS sont presque égaux à sAPA et à sMS

• Si N est petit (N<30 ) : sAPA et sMS sont des sous estimations de APA et MS – Donc le Z obtenu serait trop grand (par rapport à celui qu’on

obtiendrait si on connaissait APA et MS)

Dans ce cas, on remplace Z par le T de Student

Page 10: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

Variances combinéesVariances combinées

Problème : le T de Student s’utilise si les variances sont égales

APA = MS

On triche : si elles sont « raisonnablement » proches

APA MS

alors on les remplace par la variance commune, qui est la moyenne pondéré de (sAPA)² et (sMS)²

1)(N1)(N)²(s1)(N)²(s1)(N)²(σ

MSAPA

MSMSAPAAPACom

Page 11: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

BilanBilan

1)(N1)(N)²(s1)(N)²(s1)(N)²(σ

MSAPA

MSMSAPAAPACom

DDEX

MSAPA

σXXT

MS

Com

APA

ComDDEX

N)²(σ

N)²(σσ

que l’on résume en

MSAPACom

MSAPA

N1

N1σ

XXT

2NN

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

MSMSGAPAAPACom

Page 12: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

DDLDDL

• Le DDL de deux groupes est la somme des DDL des groupes– DDL Groupe 1 = (Taille du groupe 1) - 1

– DDL Groupe 2 = (Taille du groupe 2) - 1

Le DDL de deux groupes = (Taille du groupe 1) + (Taille du groupe 2) - 2

Page 13: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

ExempleExemple

• Groupe A : – 10, 12, 13, 9, 12

– Moyenne : 11,2

– Écart type : 1,47

• Groupe B : – 8, 10, 14, 9, 10

– Moyenne : 10,2

– Écart type : 2,04

78,18

²04,24²47,14 Com

T observé=0,89 DDL=5+5-2 P=19,72%

On ne rejette pas H0

89,0

51

5178,1

2,102,11

T

Page 14: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

Récapitulatif (petit air de déjà vu, bis)Récapitulatif (petit air de déjà vu, bis)

• On connaît

APA et MS

On conclut grâce à la table de la loi normale

• On ne connaît pas

APA et MS

• NXAPA et NXMS sont

grands (N>30)

On conclut grâce à la table de la loi normale

• On ne connaît pas

APA et MS

• NXAPA et NXMS sont

grands (N<30)

On conclut grâce à la table du T de Student

MS

MS

APA

APA

MSAPA

N)²(σ

N)²(σ

XXZ

MS

MS

APA

APA

MSAPA

N)²(

N)²(

XXZss

MSAPACom

MSAPA

N1

N1σ

XXT

Page 15: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

F de FisherF de Fisher

Page 16: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

Égalité des variancesÉgalité des variances

• Une des conditions pour utiliser T est l’égalité des variances

sAPA sMS

• On va chercher à savoir si les variances sont significativement différentes ou non.

• Comment le détermine-t-on ? Grâce au F de Fisher.

Page 17: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

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

• H0 : les variances sont égales

• Données : les variances

• Test : F de Fisher

• Probabilité

• Conclusion

Page 18: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

F observéF observé

• On divise la plus grande variance par la plus petite

ou2MS

2APA

ObsSSF 2

APA

2MS

ObsSSF

Page 19: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

Probabilité sur tableProbabilité sur table

• On lit F sur une table. La table est fonction des DDL des deux variances.– Le DDL d’une variance est le nombre de personne du groupe moins 1

2Dessous

2Dessus

ObsSSF

Risque 2,5%1 2 3 4 5 6

1 647,80 799,50 864,20 899,60 921,80 …2 38,51 39,00 39,17 39,25 39,30 …3 17,44 16,04 15,44 15,10 14,88 …4 12,22 10,65 9,98 9,60 9,36 …5 10,01 8,43 7,76 7,39 7,15 …6 … … … … … …

DDL de la variance du DESSUS

DDL de la variance du DESSOUS

Page 20: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

Probabilité ExcelProbabilité Excel

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

Page 21: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

F théoriqueF théorique

• On lit F sur une table. La table est fonction du DDL de sAPA et du DDL de sMS

• Le DDL de sAPA est le nombre de personne du groupe moins 1

• Le DDL de sMS est le nombre de personne du groupe moins 1

Page 22: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

ExempleExemple

• Groupe A : – 10, 12, 13, 9

– Moyenne : 11

– Variance : 2,5

– DDL=3

• Groupe B : – 8, 10, 14, 9, 10

– Moyenne : 10,2

– Variance : 4,16

– DDL=4

1,72,5

4,16FObs

P=30,38%On ne rejette pas H0

Les variances ne sont pas significativement différentes

Page 23: Http://christophe.genolini.free.frLicence Stat-infoCM4a : 1 Changement de groupe TD Lebossé Olivier  8h00 : M105 Charbonnier Guillaume ?  8h00 : M105

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

Attention : pour le F, le seuil est 2,5%Attention : pour le F, le seuil est 2,5%

• Formellement, si on teste l’égalité des variances s1 et s2 au risque 5%, on doit :– vérifier que s1/s2 n’est pas trop grand (pas dans le top 2,5%)– vérifier que s1/s2 n’est pas trop petit (pas dans le down 2,5%)

• Or, on triche : au lieu de tester s1/s2, – on teste s1/s2 si s1 est plus grand que s2 – on teste s2/s1 si s2 est plus grand que s1

• Donc, on économise le test avec les 2,5% les plus bas.• Il faut simplement faire le test avec le top 2,5% pour être

sur que les variances ne sont pas différentes au risque 5%