statistics for the social sciences psychology 340 fall 2006 anova: book vs. instructor
Post on 20-Dec-2015
213 views
TRANSCRIPT
Statistics for the Social Sciences
Psychology 340Fall 2006
ANOVA: Book vs. instructor
Statistics for the Social Sciences
Outline
• Comparing how the book computes ANOVA and how I compute ANOVA
Statistics for the Social Sciences
Partitioning the variance
Total variance
Stage 1
Between groups variance Within groups variance
Stage 2Between subjects varianceError variance
Statistics for the Social Sciences
Partitioning: Stage 1
Placebo
Drug A
Drug B Drug C
3 4 6 7
0 3 3 6
2 1 4 5
0 1 3 4
0 1 4 3
Total varianceStage 1
Between groups variance
Within groups variance
Statistics for the Social Sciences
Total variance
Stage 1SSTotal = X−GM( )∑ 2
dfTotal =N−1
Between groups variance
SSBetween = n X−GM( )∑ 2
dfbetween =#groups−1
MSBetween =SSBetweendfBetween
Within groups varianceSSWithin = SSeach group∑
dfWithin = dfeach group∑
MSWithin =SSWithindfWithin
SM2 =
∑(M −GM )2
dfbetween
SBetween2 =SM
2 * nin each group
SWithin2 =
∑Sgroups2
ngroups
Partitioning: Stage 1
Statistics for the Social Sciences
The Between groups variance
SSBetween = n X−GM( )∑ 2
dfbetween =#groups−1
MSBetween =SSBetweendfBetween
SM2 =
∑(M −GM )2
dfbetween
SBetween2 =SM
2 * nin each group
Assumes equal numbersof participants in each group
Can use unequal numbersof participants in each group
Variance of the distribution of means
SBetween2 =MSBetweenM =X Sums of Squares
for Between
Statistics for the Social Sciences
The Within groups variance
SSWithin = SSeach group∑
dfWithin = dfeach group∑
MSWithin =SSWithindfWithin
SWithin2 =
∑Sgroups2
ngroups
SWithin2 =MSWithin
Adding Sums of Squares of each group
Adding Variances ofEach group
Statistics for the Social Sciences
SSWithin = SSeach group∑ =SSP +SSA +SSB +SSC =32
dfWithin = dfeach group∑ =4 + 4 + 4 + 4 =16
MSWithin =SSWithindfWithin
=3216
=2.0
SSBetween = n X−GM( )∑ 2
dfbetween =#groups−1=4 −1=3
=5 1 − 3( )2
+ 5 2 − 3( )2
+ 5 4 − 3( )2
+ 5 5 − 3( )2
=50.0
MSBetween =SSBetweendfBetween
=503
=16.65
Partitioning: Stage 1
Placebo Drug A Drug B Drug C
3 4 6 7
0 3 3 6
2 1 4 5
0 1 3 4
0 1 4 3
XA =2.0SSA =8.0
XB =4.0SSB =6.0
XC =5.0SSC =10.0
XP =1.0SSP =8.0
GM =3.0SP
2 =2.0 SA2 =2.0 SB
2 =1.5 SC2 =2.5
Statistics for the Social Sciences
Placebo Drug A Drug B Drug C
3 4 6 7
0 3 3 6
2 1 4 5
0 1 3 4
0 1 4 3
XA =2.0SSA =8.0
XB =4.0SSB =6.0
XC =5.0SSC =10.0
XP =1.0SSP =8.0
GM =3.0SP
2 =2.0 SA2 =2.0 SB
2 =1.5 SC2 =2.5
dfbetween =#groups−1=4 −1=3
=3.33* 5 = 16.65
SM2 =
∑(M −GM )2
dfbetween
SBetween2 =SM
2 * nin each group
=(1− 3)2 + (2 − 3)2 + (4 − 3)2 + (5 − 3)2
3=3.33
SWithin2 =
∑Sgroups2
ngroups=2 + 2 +1.5 + 2.5
4=2.0
Partitioning: Stage 1
Statistics for the Social Sciences
SSBetween = n X−GM( )∑ 2
dfbetween =#groups−1=4 −1=3
=5 1 − 3( )2
+ 5 2 − 3( )2
+ 5 4 − 3( )2
+ 5 5 − 3( )2
=50.0
MSBetween =SSBetweendfBetween
=503
=16.65
dfbetween =#groups−1=4 −1=3
=3.33* 5 = 16.65
SM2 =
∑(M −GM )2
dfbetween
SBetween2 =SM
2 * nin each group
=(1− 3)2 + (2 − 3)2 + (4 − 3)2 + (5 − 3)2
3=3.33
SWithin2 =
∑Sgroups2
ngroups=2 + 2 +1.5 + 2.5
4=2.0
SSWithin = SSeach group∑ =SSP +SSA +SSB +SSC =32
dfWithin = dfeach group∑ =4 + 4 + 4 + 4 =16
MSWithin =SSWithindfWithin
=3216
=2.0
Partitioning: Stage 1
Statistics for the Social Sciences
Partitioning the variance
Total variance
Stage 1
Between groups variance Within groups variance
Stage 2Between subjects varianceError variance
Statistics for the Social Sciences
Partitioning the variance
Placebo Drug A Drug B Drug C
3 4 6 7
0 3 3 6
2 1 4 5
0 1 3 4
0 1 4 3
XA =2.0
SSA =8.0
XB =4.0
SSB =6.0
XC =5.0
SSC =10.0
XP =1.0
SSP =8.0
PWhat is ?The average score for each person
P20
4 =5.012
4 =3.012
4 =3.08
4 =2.08
4 =2.0
GM =3.0 SSBetweenSubs = ngroups P −GM( )∑ 2
dfbetweenSubs =nsubjects−1=5−1=4
=4 5 − 3( )2
+ 4 3 − 3( )2
+ 4 3 − 3( )2
+
4 2 −3( )2 + 4 2 −3( )2
=24
Between subjects variance
Statistics for the Social Sciences
Partitioning the variance
Placebo Drug A Drug B Drug C
3 4 6 7
0 3 3 6
2 1 4 5
0 1 3 4
0 1 4 3
XA =2.0
SSA =8.0
XB =4.0
SSB =6.0
XC =5.0
SSC =10.0
XP =1.0
SSP =8.0SSRows =ngroups Mrow−GM( )∑ 2
dfbetweenSubs =nsubjects−1=5−1=4
Row M20
4 =5.012
4 =3.012
4 =3.08
4 =2.08
4 =2.0
GM =3.0
=4 5 − 3( )2
+ 3 − 3( )2
+ 3 − 3( )2
+⎡⎣
2 −3( )2 + 2 −3( )2 ⎤⎦=24
Between subjects variance
M row =P
Statistics for the Social Sciences
Partitioning the variance
SSRows =ngroups Mrow−GM( )∑ 2
dfbetweenSubs =nsubjects−1=5−1=4
=4 5 − 3( )2
+ 3 − 3( )2
+ 3 − 3( )2
+⎡⎣
2 −3( )2 + 2 −3( )2 ⎤⎦=24
Between subjects variance
SSBetweenSubs = ngroups P −GM( )∑ 2
dfbetweenSubs =nsubjects−1=5−1=4
=4 5 − 3( )2
+ 4 3 − 3( )2
+ 4 3 − 3( )2
+
4 2 −3( )2 + 4 2 −3( )2
=24
Between subjects variance
M row =P
Statistics for the Social Sciences
Partitioning the variance
Placebo Drug A Drug B Drug C
3 4 6 7
0 3 3 6
2 1 4 5
0 1 3 4
0 1 4 3
SSError =SSWithin−SSBetweenSubs
Error variance
SSError =32 −24 =8
dferror = Nscores−ngroups( )− nsubjects−1( )
dferror = 20 −4( )− 5 −1( ) =12
SSBetweenSubs =24SSWithin =32
Statistics for the Social Sciences
Partitioning the variance
SSInteraction =
Error variancedferror = Nscores−ngroups( )− nsubjects−1( )
dferror = 20 −4( )− 5 −1( ) =12
X −GM( )− Mrow−GM( )− Mcolumn−GM( )⎡⎣ ⎤⎦∑ 2
3−3( )− 5 −3( )− 1−3( )⎡⎣ ⎤⎦2+ ...+ 3−3( )− 2 −3( )− 5 −3( )⎡⎣ ⎤⎦
2
Do this for each score (so here you do it 20 times)=8
Placebo
Drug A
Drug B
Drug C
3 4 6 7
0 3 3 6
2 1 4 5
0 1 3 4
0 1 4 3
MRow
5.0
3.0
3.0
2.0
2.0
XA =2.0 XB =4.0 XC =5.0XP =1.0
GM =3.0
Statistics for the Social Sciences
Reporting your results
• 1 Factor ANOVA– The observed difference– Kind of test – Degrees of freedom for the test– Computed F-ratio– The “p-value” of the test– Any post-hoc or planned comparison results
• “The mean score of Group A was 12, Group B was 25, and Group C was 27. A 1-way between groups ANOVA was conducted and the results yielded a significant difference, F(2,25) = 5.67, p < 0.05. Post hoc tests revealed that the differences between groups A and B and A and C were statistically reliable (respectively t(1) = 5.67, p < 0.05 & t(1) = 6.02, p <0.05). Groups B and C did not differ significantly from one another”
“within”