ANOVA continued…
Chapter 10
Zettergren (2003)
School adjustment in adolescence for previously rejected, average, and popular children.
Effect of peer reputation on academic performance and school adjustment
IV or Factor = Peer reputation 3 levels: rejected, average, popular (based on…)
3rd and 4th grade students ranked every classmate (same gender) in the order they wanted them to stay with the class if they were to move to a smaller room and not everyone could go
DV = Academic ability (8th grade)
DV = Attitudes toward school (8th grade)
Zettergren (2003) results
ANOVA: Partitions the Variance
Total Variance
Between Treatment Variance
1. Treatment effects
2. Error
Within Treatment Variance
Error
Between variance ---------------------- Within variance
F =
ANOVA: Example summary table
Source df SS MS F
Between
Within
2
12
30
16
15
1.33
11.28*
Total 14 46
F (2, 12) = 11.28, p < .01 * Significant at .01 level
between
betweenbetween
df
SSMS
within
withinwithin
df
SSMS
within
between
MS
MSF
Anova: Definitional formulas
Between groups SS (sums of squares) Sum of squared deviations from each group’s mean from grand mean multiplied by the number of Ss in group
Within groups SS Sum of squared deviations of each score from group mean
Total SS Sum of squared deviations of each score from the grand mean
])[( 2nMM Gg
2)( gMX
2)( GMX
ANOVA formulas: Sum of Squares (SS)
Total SS: sum of squared deviations from grand mean
Within SS = SS = sum of squared deviations from grp
mean
Between SS = sum of squared deviations of grp mean
from grand mean
SStotal = SSbetween + SSwithin
N
GXSSTOTAL
22
N
G
n
TSSbetween
22
)(
Where G = grand (overall) mean
Where N = total number of scores
Where T = sum of scores for group
Where n = number of scores in group
))(
(
2
2
g
g
gwithinn
XXSS
ANOVA formulas: SS
Total SS =
= 106 – 302/15 = 46
Within SS = SS
= 6 + 6 + 4 = 16
Between SS =
= 52/5 + 202/5 + 52/5 – 302/15
= 30
SStotal = SSbetween + SSwithin
46 = 30 + 16
N
GXSS
22 Temp Cond
1 2 3
0 4 1 X2=
1 3 2 106
3 6 2 G=30
1 3 0 N=15
0 4 0 k=3
T1=5 T2=20 T3=5
SS1=6 SS2=6 SS3=4
n1=5 n2=5 n3=5
M1=1 M2=4 M3=1
N
G
n
TSSbetween
22
)(
Vitamin C
Study: Year 1 = # of cold symptoms, Year 2 = # cold
symptoms with treatment
Factor: Group
Placebo
Low dose of Vitamin C
High dose of Vitamin C
Dependent variable: Difference in cold symptoms
from year 1 to year 2
Hypotheses
Boxplot of Vitamin C data
101010N =
Vitamin C Treatment
hilowpl acebo
DIF
F
20
10
0
-10
-20
3
1
Vitamin C: Data
Report
DIFF
3.50 10 4.143 35
-2.10 10 4.067 -21
-2.00 10 5.477 -20
-.20 30 5.182 -6
Vitamin C Treatment
placebo
low
hi
Total
Mean N Std. Dev iation Sum
Report
DIFF2
27.7000 10 47.32406 277.00
19.3000 10 24.23977 193.00
31.0000 10 12.75408 310.00
26.0000 30 30.87014 780.00
Vitamin C Treatment
placebo
low
hi
Total
Mean N Std. Dev iation Sum
X2
T1= T2= T3= G=
SS1= SS2= SS3= x2=
n1= n2= n3= N=
M1= M2= M3= k=
Vitamin C: Data
Report
DIFF
3.50 10 4.143 35
-2.10 10 4.067 -21
-2.00 10 5.477 -20
-.20 30 5.182 -6
Vitamin C Treatment
placebo
low
hi
Total
Mean N Std. Dev iation Sum
Report
DIFF2
27.7000 10 47.32406 277.00
19.3000 10 24.23977 193.00
31.0000 10 12.75408 310.00
26.0000 30 30.87014 780.00
Vitamin C Treatment
placebo
low
hi
Total
Mean N Std. Dev iation Sum
T1= 35 T2= -21 T3= -20 G= -6
SS1= SS2= SS3= x2=
n1= 10 n2= 10 n3= 10 N= 30
M1=
3.5
M2=
-2.1
M3=
-2.0
k= 3
Vitamin C: Data
Report
DIFF
3.50 10 4.143 35
-2.10 10 4.067 -21
-2.00 10 5.477 -20
-.20 30 5.182 -6
Vitamin C Treatment
placebo
low
hi
Total
Mean N Std. Dev iation Sum
Report
DIFF2
27.7000 10 47.32406 277.00
19.3000 10 24.23977 193.00
31.0000 10 12.75408 310.00
26.0000 30 30.87014 780.00
Vitamin C Treatment
placebo
low
hi
Total
Mean N Std. Dev iation Sum
T1= 35 T2= -21 T3= -20 G = -6
SS1=
154.5
SS2=
148.9
SS3=
270
x2=
780
n1= 10 n2= 10 n3= 10 N= 30
M1= 3.5 M2= -2.1 M3= -2.0 k= 3
g
g
gn
XXSS
2
2 )(
10
)35(277
2
SS
10
)21(193
2SS
10
)20(310
2SS
Within SS
Vitamin C: Data
T1= 35 T2= -21 T3= -20 G = -6
SS1= 154.5 SS2= 148.9 SS3= 270 x2= 780
n1= 10 n2= 10 n3= 10 N= 30
M1= 3.5 M2= -2.1 M3= -2.0 k= 3
N
GXSS
22
30
)6(780
2SS
Total SS:
Within SS:
Between SS:
SS: 154.5 + 148.9 + 270 = 573.4
= 778.8
N
G
n
TSSbetween
22
30
6)
10
20
10
21
10
35(
2222
betweenSS = 205.4
Vitamin C: Data
T1= 35 T2= -21 T3= -20 G = -6
SS1= 154.5 SS2= 148.9 SS3= 270 x2= 780
n1= 10 n2= 10 n3= 10 N= 30
M1= 3.5 M2= -2.1 M3= -2.0 k= 3
between
betweenbetween
df
SSMS
within
withinwithin
df
SSMS
within
between
MS
MSF 7.102
2
4.205betweenMS
237.2127
4.573withinMS
836.4237.21
7.102F
dfbetween = k – 1
dfwithin = N - k
Critical F @ .05 = 3.35, @ .01 = 5.49
ANOVA summary table
SPSS v. Write-up
Source df SS MS F
Between
Within
2
27
205.4
573.4
102.7
21.2
4.84*
Total 30 778.8
ONEWAY ANOVA
DIFF
205.400 2 102.700 4.836 .016
573.400 27 21.237
778.800 29
Between Groups
Within Groups
Total
Sum of
Squares df Mean Square F Signif icance
* Significant at the .02 level
Vitamin C: Conclusions
A one-way ANOVA was conducted to
examine the hypothesis that different types of
vitamin C treatment have a differential effect
on cold symptoms compared to prior years
without the treatment.
It was found that the number of colds were
significantly different for the placebo (M =
3.5), low dose (M = -2.1), and high dose (M =
-2.0) groups, F(2, 27) = 4.8, p < .05.
Post Hoc Tests
If find a “significant” F: there is at least 1 mean that is different
Post-tests examine which means are and are not significantly different
Compare 2 means at a time (pair-wise comparisons)
Type I error: divide alpha among all tests need to do Planned comparisons: based on predictions
Tukey’s HSD
Scheffe test (numerator is for MSbetween for only the two treatments you want to compare)
Bonferroni
Effect size
How much of the variability in DV is attributed
to IV?
Effect size for ANOVA: eta-squared (ή2)
Total
Between
SS
SS2
Self-esteem study: Self-Esteem Descriptor (SED) at 5, 7, 9, 11, 13
2525252525N =
Self-esteem at age 1
Self-esteem at age 1
Self-esteem at age 9
Self esteem at age 7
Self-esteem at age 5
160
140
120
100
80
60
40
20
0
-20
6
3
8
115
3
11
3
125
11
Self-esteem: Between subject
ONEWAY Descriptives
SED
25 33.8800 27.91702 5.58340 22.3564 45.4036 2.00 106.00
25 27.6000 35.35180 7.07036 13.0075 42.1925 1.00 138.00
25 29.6000 31.49206 6.29841 16.6007 42.5993 3.00 127.00
25 29.9600 34.86340 6.97268 15.5691 44.3509 1.00 125.00
25 16.0800 16.95071 3.39014 9.0831 23.0769 1.00 66.00
125 27.4240 30.20181 2.70133 22.0773 32.7707 1.00 138.00
1.00
2.00
3.00
4.00
5.00
Total
N Mean Std. Dev iation Std. Error Lower Bound Upper Bound
95% Conf idence Interval for
Mean
Minimum Maximum
ONEWAY ANOVA
SED
4539.088 4 1134.772 1.254 .292
108567.4 120 904.729
113106.5 124
Between Groups
Within Groups
Total
Sum of
Squares df Mean Square F Signif icance
Self-esteem: Within subject
Descriptive Statistics
33.88 27.917 25
27.60 35.352 25
29.60 31.492 25
29.96 34.863 25
16.08 16.951 25
Self -esteem at age 5
Self esteem at age 7
Self -esteem at age 9
Self -esteem at age 11
Self -esteem at age 13
Mean Std. Dev iation N
Tests of Within-Subjects Effects
Measure: MEASURE_1
4539.088 4 1134.772 4.771 .001
4539.088 2.989 1518.796 4.771 .004
4539.088 3.461 1311.589 4.771 .003
4539.088 1.000 4539.088 4.771 .039
22834.512 96 237.859
22834.512 71.727 318.355
22834.512 83.058 274.922
22834.512 24.000 951.438
Sphericity Assumed
Greenhouse-Geisser
Huy nh-Feldt
Lower-bound
Sphericity Assumed
Greenhouse-Geisser
Huy nh-Feldt
Lower-bound
Source
AGE
Error(AGE)
Ty pe III Sum
of Squares df Mean Square F Sig.
Self-esteem: Planned contrasts
Paired Samples Test
6.28 18.311 3.662 -1.28 13.84 1.715 24 .099
4.28 22.868 4.574 -5.16 13.72 .936 24 .359
3.92 22.546 4.509 -5.39 13.23 .869 24 .393
17.80 20.738 4.148 9.24 26.36 4.292 24 .000
Self -esteem at age 5 -
Self esteem at age 7
Pair
1
Self -esteem at age 5 -
Self -esteem at age 9
Pair
2
Self -esteem at age 5 -
Self -esteem at age 11
Pair
3
Self -esteem at age 5 -
Self -esteem at age 13
Pair
4
Mean Std. Dev iation
Std. Error
Mean Lower Upper
95% Conf idence
Interv al of the
Dif f erence
Paired Dif ferences
t df Sig. (2-tailed)
Paired Samples Statistics
33.88 25 27.917 5.583
27.60 25 35.352 7.070
33.88 25 27.917 5.583
29.60 25 31.492 6.298
33.88 25 27.917 5.583
29.96 25 34.863 6.973
33.88 25 27.917 5.583
16.08 25 16.951 3.390
Self -esteem at age 5
Self esteem at age 7
Pair
1
Self -esteem at age 5
Self -esteem at age 9
Pair
2
Self -esteem at age 5
Self -esteem at age 11
Pair
3
Self -esteem at age 5
Self -esteem at age 13
Pair
4
Mean N Std. Dev iation
Std. Error
Mean
Self-esteem write-up
Within-subject design
A longitudinal study was conducted on self-esteem. A repeated-measures ANOVA was conducted over five time periods; five years old (M = 33.88, SD = 27.92), seven years old (M = 27.60, SD = 35.35), nine years old (M = 29.60, SD = 31.49), 11 years old (M = 29.96, SD = 34.86), and 13 years old (M = 16.08, SD = 16.95). A significant effect of age was found, F (4, 96) = 4.77, p = .001.
Post-hoc tests were performed comparing the youngest age (five years old) with each of the other ages (7, 9, 11, and 13 years). One significant result was found. Self-esteem at age five (M = 33.88, SD = 27.92) was significantly different compared to self-esteem at age 13 (M = 16.08, SD = 16.95), t(24) = 4.29, p < .001. This suggests that self-esteem remains stable from age five until age 11, and then declines at age 13.
Repeated-measures ANOVA
gro
up
rating0 5 10 15
1
2
3