Professional Documents
Culture Documents
30 April 2008
Categorical data: comparing multiple sets of categorical responses
Similar chi-square tests for r × c tables
1 / 34 2 / 34
3 / 34 4 / 34
Types of ANOVA Emphasis
One-way ANOVA
One-way ANOVA is an extension of the t-test to 3 or more
One factor — e.g. smoking status samples
(never, former, current)
focus analysis on group differences
Two-way ANOVA
Two-way ANOVA (and higher) focuses on the interaction of
Two factors — e.g. gender and smoking status factors
Does the effect due to one factor change as the level of
Three-way ANOVA another factor changes?
Three factors — e.g. gender, smoking and beer consumption
5 / 34 6 / 34
Sample variance: Pn
2 i (Xi − X̄ )2 Variation Variation
s =
n−1 Variation between each between each
in all = observation + group mean
observations and its group and the overall
mean mean
The distance from any data point to the mean is the deviation
from this point to the mean:
(Xi − X̄ ) In other words,
9 / 34 10 / 34
11 / 34 12 / 34
Between groups mean square: MSB An ANOVA table
13 / 34 14 / 34
17 / 34 18 / 34
23 / 34 24 / 34
HDL ANOVA results & conclusions Which groups are different?
F-test
H0 : µc = µd = µde (or H0 : β1 = β2 = 0)
Ha : at least one mean is different from the others We might proceed to make individual comparisons
Conduct two-sample t-tests to test for a difference in means
Test statistic for each pair of groups (assuming equal variance):
Fobs = 13.0
(X̄1 − X̄2 ) − µ0
df1 = k − 1 = 3 − 1 = 2 tobs = q 2
sp sp2
df2 = N − k = 116 n1 + n2
Rejection region: F > F0.05;2,116 = 3.07
Recall: sp2 is the ‘pooled’ sample estimate of the common
variance
Conclusions
df = n1 + n2 − 2
Since Fobs = 13.0 > 3.07, we reject H0
We conclude that at least one of the group means is different
from the others (p< 0.05)
25 / 34 26 / 34
27 / 34 28 / 34
Multiple comparisons α HDL: Pairwise comparisons I
29 / 34 30 / 34
Control and Diet + exercise groups Diet and Diet + exercise groups
H0 : µc = µde (or β2 = 0) H0 : µd = µde (or β1 − β2 = 0)
t= −0.05−0.14
q
0.028
= 5.05 t= −0.02−0.14
q = −3.19
40
+ 0.028
39
0.028
40
+ 0.028
39
31 / 34 32 / 34
Bonferroni corrected p-values Summary of Lecture 7
33 / 34 34 / 34