0% found this document useful (0 votes)
3 views34 pages

Two Factor ANOVA

The document discusses the concept of factorial designs in experimental research, particularly focusing on two-way ANOVA. It explains how to analyze the effects of multiple independent variables on a dependent variable, including main effects and interaction effects. An example is provided to illustrate the application of a 2x2 factorial design involving sleep and task difficulty.

Uploaded by

7zxp2yxgdw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views34 pages

Two Factor ANOVA

The document discusses the concept of factorial designs in experimental research, particularly focusing on two-way ANOVA. It explains how to analyze the effects of multiple independent variables on a dependent variable, including main effects and interaction effects. An example is provided to illustrate the application of a 2x2 factorial design involving sleep and task difficulty.

Uploaded by

7zxp2yxgdw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 34

More statistics humor

 Patient: Will I survive this risky operation?


 Surgeon: Yes, I'm absolutely sure that you
will survive the operation.
 Patient: How can you be so sure?
 Surgeon: Well, 9 out of 10 patients die in this
operation, and yesterday my ninth patient
died.
 What psychological phenomenon is
represented by the Surgeon’s remarks?
Two-Factor ANOVA

Factorial Designs
Intro to Factorial Designs
 Thus far, we have been looking at rather
simple designs – designs with a single
independent variable.
 However, behavior is often a function of
multiple influences, and we frequently need to
look at multiple causal variables at the same
time.
 We can do this with an analysis of variance,
but we need to design our experiment in the
appropriate way to allow us to do this.
Factorial Designs
 Factorial design – an experimental design
with two or more factors (independent
variables) where the factors are completely
crossed.
 Completely Crossed – each level of one
factor is combined with each level of every
other factor.
Example
 Assume we wanted to look at the effects of
amount of sleep on task performance, and we
thought that amount of sleep would make
very little difference on easy tasks, but less
sleep would impede performance on difficult
tasks.
 Thus, we could create a factorial design with
two factors – Amount of sleep (8 hours vs. 4
hours) and task difficult (easy vs. hard).
2 X 2 Factorial Design
5 people per 4 hours of 8 hours of total
condition sleep sleep

Easy 8 7 7.5
Task

Difficult 3 6 4.5
Task

Total 5.5 6.5 6.0


Grand Mean
2 x 2 factorial
 As you can see, there are four conditions in our
experiment (2 x 2 = 4). This is why we call this a 2 x
2 factorial – there are 2 factors with 2 levels.
 We could actually expand this in different ways – for
example, we could have 4, 6, and 8 hours of sleep –
this would be a 3 x 2 factorial design – with six
conditions (3 x 2 = 6).
 In essence, the number of numbers tells you how
many factors, the actual numbers tell you the number
of levels of each factor.
 So a 3 x 2 x 2 design would have 3 factors, one with
3 levels, a second one with 2 levels, and a third one
with 2 levels – for a total of 12 conditions.
 We will only deal with 2 factors for now.
Main Effects
 When we have two independent variables or
factors and they are crossed – we can look at
the effects of each variable independently –
because if they are crossed (and if sample
sizes are equal), the effect of one factor is
independent of the other in a statistical
sense.
 When we look at the effect of one factor while
ignoring (or collapsing over) the other, this is
called a Main Effect.
2 X 2 Factorial Design
5 people per 4 hours of 8 hours of total
condition sleep sleep

Easy 8 7 7.5
Task

Difficult 3 6 4.5
Task

Total 5.5 6.5 6.0


Grand Mean
Interaction Effects
 In a factorial design, there are actually three
things that can produce variance.
 Main Effect for Factor A – are the means for
difference levels of Factor A significantly
different?
 Main Effect for Factor B – are the means for
different level of Factor B significantly
different.
 Interaction effect – systematic (between
group) variance left over after accounting for
both main effects.
Interaction effects (cont.)
 If an interaction is present – then the effect of one
factor is different depending on the level of the other
factor (or factors).
 Thus, the size of the effect of one factor changes or
varies as a function of the other variable or factor.
 In our example, the effect of amount of sleep differs
depending on whether we are looking at an easy or
difficult task.
 Effect of amount of sleep (8 vs. 4 hours) is -1 for an
easy task (probably no real difference), but is +3 for
the difficult task – more sleep leads to better
performance, but only for the difficult task.
 This is an interaction effect.
2 X 2 Factorial Design
5 people per 4 hours of 8 hours of total
condition sleep sleep

Easy 8 7 7.5
Task

Difficult 3 6 4.5
Task

Total 5.5 6.5 6.0


Grand Mean
Example – from one-way to two-way
None Lecture Workbook Both

3 4 4 8

5 5 6 7

4 4 7 9

3 6 5 9

5 3 4 8

X 4.0 X 4.4 X 5.2 X 8.2

Overall Mean (aka Grand Mean) = 5. 45


Factorial Design - 2 x 2
Workbook Workbook Total
Absent Present

Lecture 4.0 5.2 4.6


Absent

Lecture 4.4 8.2 6.3


Present

Total 4.2 6.7 5.45


One-Way ANOVA Model
J n J J n

 ( X
j 1 i 1
ij  X T )  n j ( X j  X T )   ( X ij  X j )
2

j 1
2

j 1 i 1
2

SStotal SSbetween  SS within

In the above model, SS between groups looks at the degree to


which each condition mean differs from the grand mean. When
we move to the two-way anova model, SS between groups gets
divided up into three meaningful parts.
One-Way ANOVA Model to a
Two-Way ANOVA Model
J n J J n

 ( X
j 1 i 1
ij  X T )  n j ( X j  X T )   ( X ij  X j )
2

j 1
2

j 1 i 1
2

SStotal SSbetween  SS within

SS A  SS B  SS AxB
Two Way Anova Model & Hypotheses

X ijk    j   k   jk  eijk

FactorA :H 0 :1  2 0


H1 :NotH 0
FactorB :H 0 :1  2 0
H1 :NotH 0
Interaction :H 0 :11 12  21  22 0
H1 :NotH 0
Df, MSs, and F
SSbetween 54.15,df J  1 3
54.15
MSbetween  18.05
3
SS within 18.8,df N  J 20  4 16
18.8
MS within  1.175
16
MSbetween 18.05
 
F (3,16)  15.36
MS within 1.175
Critical F (alpha = .05) with 3 and 16 df (p. 476) = 3.24, thus we reject the null
hypothesis.
Two-way ANOVA Model
K J n

   ijk
( X  X
k 1 j 1 i 1
.. ) 2
SStotal X ..  X T

J
n j .  ( X j .  X .. ) 2 SS A
j 1
K
n.k  ( X .k  X .. ) 2 SS B
k 1
K J
n jk   ( X jk  X j .  X .k  X .. ) 2 SS AB
k 1 j 1
K J n

   ijk
( X  X
k 1 j 1 i 1
jk ) 2
SS within

SStotal SS A  SS B  SS AB  SS within


SS AB SSbetween  SS A  SS B
Numeric Example – Table of Totals

B1 B2 Row Totals

A1 20 26 46

A2 22 41 63

Column
42 67 109
Totals
Example continued
T..2 (109) 2 11881
(I )    594.05
N 20 20
n J K
( II )    X i2 667
i 1 j 1 k 1
J

T
j 1
2
j.
(46) 2  (63) 2 2116  3969 6085
( III )     608.5
nJ (5)(2) 10 10
K

T 2
.k
(42) 2  (67) 2 1764  4489 6253
( IV )  k 1
   625.3
nK (5)(2) 10 10
J K

 T
j 1 k 1
2
jk
202  262  222  412 3241
(V )    648.2
n 5 5
Example Continued

SS A III  I 608.5  594.05 14.45


SS B IV  I 625.3  594.05 31.25
SS AxB V  I  III  IV 648.2  594.05  608.5  625.3
8.45
SS within II  V 667  648.2 18.8
SSTotal II  I 667  594.05 72.95
Example
SSbetween 54.15df  JK  1 3
SS A 14.45df J  1 1
SS B 31.25df K  1 1
SS AB 8.45df ( J  1)( K  1) 11 1
SS within 18.8df N  ( JK ) 16
14.45  31.25  8.45 54.15
Summary Table
Source df SS MS F p<.05

Lecture 1 14.45 14.45 12.30 Yes

Workbook 1 31.25 31.25 26.60 Yes

Interaction 1 8.45 8.45 7.19 Yes

Within Gps 16 18.80 1.175

Total 19 72.95

Critical F (1, 16) = 4.49


Comparisons – Same as with one-way

( X1  X 2 )2 (5.2  8.2) 2
Fcomp (1, N  JK ) 
1 1
(  ) MS within
F3,4  19.15
n1 n2 .47
(4.0  5.2) 2 1.44
F1,3   3.06
2
( )(1.175) .47
5
CriticalF (1,16) 4.49
Thus, we know that the only mean that differs from the others is the mean
for both – 5.2 doesn’t differ from 4.0 but it does differ from 8.2 – the other
comparisons we can infer from this. Our conclusion – both lecture and
workbook are necessary to get any significant learning.
Effect Sizes

2 SS A  ( J  1) MS within 14.45  1.175


est. 
A  .179
MS within  SStotal 1.175  72.950
2 SS B  ( K  1) MS within 31.25  1.175
est. 
B  .406
MS within  SStotal 74.125
2 SS AB  ( J  1)( K  1) MSwithin 8.45  1.175
est. 
AB  .098
MS within  SStotal 74.125
More than 2 factors?
 Works exactly the same way, only the SS between
groups gets broken up into more parts – A, B, C, A x
B, A x C, B x C, A x B x C
 Obviously, the more factors you have, the more
complex interpreting your data becomes.
 In essence, as long as you have factors that are
completely crossed, you can partition the data in
meaningful ways.
 Partitioning the variance is key – virtually all of the
things we have been doing are based on the notion
of partitioning variance into systematic variance vs.
error variance. This is the crucial component of
parametric statistics.
Practice Items for Final Exam
 Assume a researcher wanted to assess
whether training in statistics helped high
school students make better decisions. She
randomly sampled 20 HS students, and
randomly assigned 10 to the statistics training
group and the other 10 to a control group.
After the training, all 20 students were given a
decision making skill assessment task.
Scores ranged from 1(poor) to 10 (great).
What statistical test would you use to test this
hypothesis?
Example 2
 Suppose the same researcher ran the
experiment a different way – she randomly
sampled 10 students and then gave them the
decision skills assessment. Then, she gave
all 10 the statistics training and following the
training, gave them the decision skills
assessment again. What test should she use
to test her hypothesis?
Example 3
 Assume the researcher wanted to distinguish
between a little statistics training vs. a lot.
Thus, she randomly selected 30 students and
gave 10 extensive statistics training, 10
others basic statistics training, and the last 10
students received no training. Then she gave
them the decision skills assessment. What
statistical procedure should she use to
answer her question?
Example 4
 Assume the same researcher tried to answer
the question by giving each of 10 randomly
sampled students a measure of their statistics
knowledge (a test ranging from 0 to 100 –
higher scores mean more knowledge) and
also the decision skills assessment. She
wanted to assess whether higher statistics
knowledge scores would be associated with
better decision making. How should she test
this?
Summary
 Independent vs. dependent or correlated groups
(different people or same/matched people).
 Number of groups – 2 use t tests, 3 or more, ANOVA.
 If there are no groups – just two continuous
measures of something, it is a correlation problem.
 Know how to do appropriate confidence intervals for
each test.
 Your final exam will give you data and then ask you
to use it to answer questions. You will need to
choose the right test, so make sure you know the
differences and when they are useful.

You might also like