Comparing Mean20
Comparing Mean20
Comparing Mean20
Mean changes
Variance changes
Two Sample Problems
Is A B ?
A B
Is A B ?
2 2
Probability distribution
Probability distribution of population B
of population A
Comparison of the variance of
two prob. dists.
A B
8
Example: Vitamin C for Common Cold
• Outcome: Number of Colds During Study Period
for Each Student
• Group 1: Given Placebo
y1 2.2 s1 0.12 n1 155
( y1 y 2 ) 0 ( n 1) S 2
( n 1) S 2
tobs S p2 1 1 2 2
1 1 n1 n2 2
S p2
n1 n2
Test for
Normal Populations
• Decision Rule: (Based on t-distribution with n=n1+n2-2 df)
– 1-sided alternative
• If tobs ta,n ==> Conclude 0
• If tobs < ta,n ==> Do not reject 0
– 2-sided alternative
• If tobs ta/ ,n ==> Conclude 0
• If tobs ≤ -ta/,n ==> Conclude < 0
• If -ta/,n < tobs < ta/,n ==> Do not reject 0
Test for
Normal Populations
• Observed Significance Level (P-Value)
• If P-Value a, then reject the null hypothesis
Inference for
Normal Populations
n n
1
2
n* 1 2
S2
2
2
2
S
n1 n2
1 2
n 1 n2 1
1
Output SPss
Output Spss
Post hoc
Equal variance Unequal variance
– Bonferroni • Games-Howell
– LSD • Dunnett C, T3
– Tukey
• Tamhane
– Duncan
– dll
Mann Whitney U Test
• Nonparametric equivalent of
the independent t test
Test Statisticsb
13
12
11
10
days
A B P
treatment
What does ANOVA do?
At its simplest ANOVA tests the following
hypotheses:
H0: The means of all the groups are equal.
Ha: Not all the means are equal
• doesn’t say how or which ones differ.
• Can follow up with “multiple comparisons”
Between MSG
F
Within MSE
A large F is evidence against H0, since it indicates that there is more
difference between groups than within groups.
How are these computations made?
SUMMARY
Groups Count Sum Average Variance
Column 1 3 18 6 0.49
Column 2 4 23.8 5.95 0.176667
Column 3 3 22.6 7.533333 0.123333
Excel ANOVA Output
ANOVA
Source of Variation SS df MS F P-value F crit
Between Groups 5.127333 2 2.563667 10.21575 0.008394 4.737416
Within Groups 1.756667 7 0.250952
Total 6.884 9
(x xi ) 2
(x x) 2
(x
ij
obs
ij x) 2
obs
i
obs
SS stands for sum of squares
• ANOVA splits this into 3 parts
Minitab ANOVA Output
Analysis of Variance for days
Source DF SS MS F P
treatment 2 34.74 17.37 6.45 0.006
Error 22 59.26 2.69
Total 24 94.00
= MSG / MSE
obs
SSE (x ij x i ) si (df i )
2 2
obs groups
SSG (x i x) 2
n (x i i x) 2
obs groups
SS MSG
SSE SSG SST; MS ; F
DF MSE
Understanding Anova visually
http://www.psych.utah.edu/stat/in
trostats/anovaflash.html
Kruskal- Wallis (extended Mann
Whitney test)
• Dependent : Ordinal, interval /ratio tidak
memenuhi syarat
• Independent : katagori lebih dari 2.
bebas antar pengamatan..
Clinical important and statistically
important