Professional Documents
Culture Documents
14 Test Hypothèse Attribue 2 PDF
14 Test Hypothèse Attribue 2 PDF
Jan-16
Fethi Derbeli
Hypothesis Testing
Attribute Data (2 factors only)
Non Normal
Ho: s1 = s2 = s3 = ...
Ha: at least one is different
Minitab:
Stat - Anova Test for Equal Variances
For only two ss this is similar to an FTest: F=(S1)2 / (S2)2
If F calc > F table, then reject null.
(Use Chi-Squared for one sample)
Normality Test
Contingency
Table
Normal
Two or More
Samples
Levenes Test
Ho: M1 = M target
1 Sample
Ha: M1 M target
Minitab:
Stat - Nonparametric - 1 Sample-Sign (OR)
Stat - Nonparametric - 1 Sample-Wilcoxon
(This is also used for paired comparisons:
Ho: M1 - M2 = 0)
M1 = Median of sample 1
M target = Target Median
One
Ho: 1 = target
Sample
Ha: 1 target
Minitab:
Chi-Squared
Stat Basic Stats Display Descriptive
Statistics
Graphs: Graphical Summary
If s target falls with CI, then fail to
Two or More
Samples
Ho: 1 = 2 = 3 = ...
Ha: at leastone is different
Minitab:
Stat - Anova Test for Equal Variance
(For only two ss this is the same as an
F-Test: F=(S1)2 / (S2)2
If F calc > F table, then reject null.
Bartletts Test
reject Ho.
Ho: 1 = target
Ha: 1 target
1 Sample
Minitab:
Stat - Basic Stats - 1 Sample-T
Stat Basic Stats Display Descriptive
Statistics
Graphs: Graphical Summary
2 or More
Ho: M1 = M2 = M3 = ...
Samples
Ha: at least one is different
Minitab:
Stat - Nonparametric - Mann-Whitney (OR)
Stat - Nonparametric - Kruskal-Wallis (OR)
Stat - Nonparametric - Moods Median (OR)
Stat - Nonparametric - Friedmans
M1 = Median of sample 1, etc...
Jan-16
T Test
Two
Samples
Two or More
Samples
One Way
Anova
CI, then
Ho: 1 = 2
2 Sample T Test
( Variances Equal)
Ha: 1 2
Minitab:
Stat - Basic Stats - 2-Sample T
(Compares Means using pooled Std Dev)
Assume equal variances
Fethi
Ho: 1 = 2
2 Sample T Test
(Variances Not Equal)
Ha: 1 2
Minitab:
Stat - Basic Stats - 2-Sample T
(Compares Means using each sample Std Dev)
Derbeli
Ho: 1 = 2 = 3 = ...
Ha: at least one is different
Minitab:
Stat - Anova- One-way (or
one-way unstacked)
Assumes Equal Variances
(Bartletts test must fail to
reject that variances are =.
Jan-16
Fethi Derbeli
Distribution Chi-carre
100
90
80
70
Frequency
60
50
40
30
20
10
0
0
10
20
30
C1
Jan-16
Fethi Derbeli
Mthode Chi-carre
Step 1: Statuer le problme pratique
Step 2: Statuer lhypothse nule (supposition de
indpendance) et lhypothse alternative (supposition de
dpendance)
Step 3: Decider le test appropri (Chi-carre test)
Step 4: Dfinir le niveau level (habituellement 0.05)
Steps 5-6: Determiner la taille appropri des chantillons
et le plan dchantillonage. Combien dchantillons vont
tre tests pour dfinir la frquence dinformation?
Step 7: Effectuer le test et collecter les data
Jan-16
Fethi Derbeli
Mthode Chi-carre
Step 8: Determiner le test statistique utilisant la formule suivante ou
Minitab (Stat > Tables > Chisquare Test)
2 (calc)
df (r 1)( c 1)
Ou: O = la valeur des observations (donnes experimentales)
E = La valeur attendue (Fr*Fc)/Ftotal
r = Le nombre des lignes
c = nombre des colonnes
Fr = frquence total des lignes
Fc = frquence total des colonnes
Ftotal = frquence total du table
Fethi Derbeli
Bad Coils
First Shift
O11 = 20
O12 = 50
Total = 70
Second Shift
O21 = 40
O22 = 70
Total = 110
Total = 60
Total = 120
First Shift
Second Shift
Good Coils
Bad Coils
E11 = 70 * 60 / 180
=
E12 = ( ) * ( ) / ( )
E21 = ( ) * ( ) / ( )
= 46.6
E22 = ( ) * ( ) / ( )
2 (calc)
Jan-16
Fethi Derbeli
Fr * Fc
Ftotal
Bad Coils
First Shift
O11 = 20
O12 = 5o
Second Shift
E11 = 23.3
O21 = 40
E12 = 46.6
O22 = 70
E21 = 36.6
E22 = 73.3
2 (calc)
First Shift
Good Coils
Bad Coils
2 = (O11-E11)2 / E11
2 = (O12-E12)2 / E12
2 (calc) = (
Jan-16
2 = ( - )2 / ( )
2 = ( - )2 / ( )
)+(
)+(
)+(
) = ________
Fethi Derbeli
47
Hosp B
Hosp C
Hosp D
Hosp E
Total
21
43
90
2 (calc) = _____________
10
36
56
29
149
16
35
51
10
128
2 (critical) = ___________
NI = No damlioration
PFR = Restauration
fonctionnelle partielle
31
79
128
82
367
CFR =Restauration
fonctionnelle complte
Note: Example from: Statistics for Experimenters, George E.P. Box, William G. Hunter, and J. Stuart
Hunter, 1978, p.145.
Jan-16
Fethi Derbeli
Hosp B
Hosp C
Hosp D
Hosp E
Total
21
43
90
7,60218
0,89071
PFR
18
10
36
observed
expected 19,08174 12,58583 32,07357
chi-sq
0,061324 0,531274 0,480672
56
51,9673
0,31294
29
149
33,29155
0,553216 1,939426
CFR
16
16
35
51
10
128
Observed
Expected 16,39237 10,81199 27,55313 44,64305 28,59946
chi-Sq 0,009392 2,489408 2,012687 0,905198 12,09603 17,51271
Total
47
31
79
128
82
367
2 (calc) = ___56,705________
2 (critical) = __15,51_____
Expected counts are printed below observed
counts
Chi-Square contributions are printed below
expected counts
Hosp A Hosp B Hosp C Hosp D Hosp E
Total
1
13
5
8
21
43 90
11,53 7,60 19,37 31,39 20,11
0,189 0,891 6,677 3,439 26,058
2
18
10
36
56
29 149
19,08 12,59 32,07 51,97 33,29
0,061 0,531 0,481 0,313 0,553
16
16
35
51
10 128
16,39 10,81 27,55 44,64 28,60
0,009 2,489 2,013 0,905 12,096
Total
47
31
79
128
82
367
Jan-16
Fethi Derbeli
10
Fethi Derbeli
11
P-Chart - Minitab
Stat > Control Charts > P
Hospital.mtw
Jan-16
Fethi Derbeli
12
The Resulting
P Chart for Chart
counts by Hospital
A
0.6
NI
Proportion
0.5
UCL=0.4895
0.4
P=0.3333
0.3
0.2
LCL=0.1772
Points hors
contrle nous
montre qui cause
la dpendance.
A quel hopital tu
prfre aller?
NI
0.1
CFR
NI
0.0
0
10
15
Sample Number
Jan-16
Fethi Derbeli
13
Type
1 Cut/Drill
2 Cut/Drill
4 Cut/Drill
Tooke
DJH Borer
37
35
41
72
44
71
Step 1:
Problme pratique: Est ce que lun des outils dtecte difframent
les dfauts selon la mthode utilise?
Step 2:
Ho: La thode du test indpendente de loutil de mesure
Ha: La mthode du test dpend de loutil de mesure
Step 3-4:
On va utiliser le chi-square test et alpha 0.05
Steps 5-6:
Echantillonage: On utilise les donnes mensuelles pour chaque
outil qui nous donnent 122 valeurspour Tooke et 178 valeurs pour DJH
Borer.
Jan-16
Fethi Derbeli
14
Cont Tables.mtw)
Step 8: Determiner le test
statistique 2(calc)
On utilise Minitab
Total
Chi-Sq =
37
41
44
29.28
45.95
46.77
35
72
71
42.72
67.05
68.23
72
113
115
Total
122
178
300
2.035 +
0.534 +
0.164 +
1.395 +
0.366 +
0.112 = 4.606
DF = 2, P-Value = 0.100
Jan-16
Fethi Derbeli
15
Jan-16
Fethi Derbeli
16
Test de 02 Proportions
Lorsquon a seulement deux catgories (2X2 table), on
peut utiliser le test de proportions pour avoir les mmes
rsultats avec Minitab.
Avec ce test, on prend la proportion des occurrences au
lieu du nombre des occurrences
La valeur attendue est gale la proportion de
lchantillon vs. total
Lhypothse nulle est que la proportion du facteur A =
proportion du facteur B (Ho: p1 - p2 = 0, ou p1 et p2 sont
les proportions du succ dans la populations 1 et 2).
Prenant un exemple
Jan-16
Fethi Derbeli
17
Jan-16
Fethi Derbeli
18
Test de 2 Proportions
A Minitab, choisir Stat >
Basic Stats > 2
proportions
In First Sample, under
Trials, enter 50. Under
Successes, enter 44
In Second Sample,
under Trials, enter 50.
Under Successes, enter
42. Click OK.
Sample p
44
50
0.880000
42
50
0.840000
0.04
(-0.0957903, 0.175790)
Fethi Derbeli
Z = 0.58
P-Value = 0.564
19
Questions?
Jan-16
Fethi Derbeli
20