Unit 11 Outline
Stat 101
Analysis of Variance (ANOVA)
General format and ANOVAs F-test
Unit 11: Analysis of Variance Link to binary regression
Contrast testing
Textbook Chapter 12
Multiple comparisons (& the Bonferroni correction)
Two-way ANOVA (and Multi-way ANOVA)
22
1
11/21/2013
55 66
One-way ANOVA the model Model for one-way ANOVA with g = 3 groups
The one-way ANOVA model for a quantitative variable X is
xij = i + ij
for i = 1, 2, . . . , g groups (subpopulations)for a specific factor
and j = 1, 2, . . . , ni individuals sampled in each group
The ij are assumed to be ~ N(0, )
Model parameters are 1, 2, . . . , g and (one common SD!)
Model can be written as (just like regression!)
Note: we used the symbol x here to represent the measured Residuals ij are assumed to be ~ N(0, )
variable, but we could have chosen y instead (to mimic
regressions response variable) So only difference among the groups are differing means
77 88
2
11/21/2013
ng ng
W
3
11/21/2013
SS Sum of Squares
Reject H0: for large values of F; if F > F*, g 1, N - g or the MS
corresponding p-value is less than . df degrees of freedom
13 1414
13
Solution:
One-way ANOVA table H0: 1= 2 = 3
Source SS DF MS F HA: at least one i is
Groups different
(Between)
SSG g1 s B2 = SSG/DFG F = MSG/MSE
g
Error 2 SSG ni ( xi x ) 2
(Within) SSE ng sW = SSE/DFE i 1
MSE is still our estimate of 2: the variance of the residuals F = 3716.9 / 465.9 = 7.978
or the average variance of the observations from their group F* = 3.35. Since our F > F*, we reject H0. The rats have
means (sometime called the pooled variance estimate). differing mean bone densities in the different treatment groups.
15 1616
4
11/21/2013
17 1818
17
19 19 2020
5
11/21/2013
21 2222
21
ai2
n
3 groups involved (no jump, low jump, high jump)?
sp
For example, consider the bone density study.
i
To compare control (group 1) versus treatment (groups 2 and 3) use.
= 1 (2 + 3)/2 = (1)1 +(-1/2)2 + (-1/2)3 This t-test has a t distribution with degrees of freedom
associated with sp under H0 (test can be 1-sided or 2-sided)
To compare levels of jumping (group 2 versus group 3) use
= 2 3 = (0)1 +(1)2 + (1)3
23
23 2424
6
11/21/2013
t
a x i i
(1)601.1 (0.5)612.5 (0.5)638.7
Reject H0: 1 = 2 = 3 if our calculated F > F*0.05,df=2,27 = 3.35 a 2
12 (0.5) 2 (0.5) 2
Omnibus test: P = 0.002, reject H0 and conclude there is a
sp n i
465.91
10
10
10
i
difference in bone density among the three groups.
24.5
Where does that difference lie? Lets look at the comparisons (via 2.93
8.36
contrasts): Calculate the p-value: df = N I = 30 3 = 27.
(Group 1) versus (Groups 2 and 3) p-value = 2*P(t<-2.93) < 2(0.005) = 0.01.
(Group 2) versus (Group 3) So reject H0 and conclude any kind of jumping improves bone density
25 over no jumping at all. 26
25 26
7
11/21/2013
8
11/21/2013
33 3434
9
11/21/2013
39
39 4040
10