Title: Using ANOVA to test two IVs at once.
1Using ANOVA to test two IVs at once.
2Using ANOVA to testing two IVs at once.
- Why test two IVs at once?
- An example experiment
- Hypotheses that are tested
- Possible outcomes eight graphs that say it all
- What the ANOVA table looks like
3Why test two IVs at once?
- Testing two or more IVs is called a factorial
design - When two factors (IVs) are addressed in a
single experiment it is called a two-factor
design - Several sets of hypotheses are tested with a
two-factor ANOVA - Why design a two-factor experiment?
- Efficiency of time and money test 3 hypotheses
all at once - Test if IV1 influences the DV
- Test if IV2 influences the DV
- Test if the effects of one IV on the DV depend
upon the other. - Power Enhance the sensitivity of your test
relative to two separate one-factor designs
4An example experiment simplified from page 421
- A sleep researcher is interested in whether a
drug marketed as a remedy for insomnia really
does induce sleep. She is also interested in
whether tolerance to the drugs putative
sleep-inducing effects develops with repeated use
of the drug. She knows that she could test these
ideas using separate one-factor studies, but only
has time to do one study. She decides to give
either placebo or active drug (IV1 2 levels) to
people with different experience with this drug,
either people who have never used it or people
who use it every night (IV2 2 levels). 32
people are recruited for a one night study 16
people who have never used the drug and 16 people
who use it every night. These two groups are
split 8 in each group get placebo and 8 get the
active drug. The DV is the number of minutes it
takes for these folks to get to sleep.
5Diagram of sleep study 2 by 2 matrix
6Diagram of sleep study 2 by 2 matrix
Drug (columns)
Placebo
Active
8 people who have never used are given placebo
medication.
8 people who have never used are given active
medication.
Never used
Experience (rows)
8 people who use nightly are given Placebo
medication.
8 people who use nightly are given active
medication.
Use nightly
7Diagram of sleep study 2 by 2 matrix
Drug (columns)
Placebo
Active
Row mean (16 scores)
Cell mean (mean of 8 scores)
Cell mean (mean of 8 scores)
Never used
Experience (rows)
Row mean ( 16 scores)
Cell mean (mean of 8 scores)
Cell mean (mean of 8 scores)
Use nightly
Column mean (16 scores)
Column mean (16 scores)
8Diagram of sleep study 2 by 2 matrix
Used to test effect of row IV.
Drug (columns)
Placebo
Active
Row mean (16 scores)
Cell mean (mean of 8 scores)
Cell mean (mean of 8 scores)
Never used
Used to test interaction of 2 IVs
Experience (rows)
Row mean ( 16 scores)
Cell mean (mean of 8 scores)
Cell mean (mean of 8 scores)
Use nightly
Used to test effect of column IV.
Column mean (16 scores)
Column mean (16 scores)
9Questions to be answered in sleep study
- Does the drug influence the time it takes to get
to sleep? - (main effect of drug)
- Does experience with the drug influence time it
takes to get to sleep? - (main effect of experience)
- Does the drugs effect on time it takes to get to
sleep depend upon the users experience with it? - (interaction of effect of drug and experience)
10Null and alternative hypotheses 3 sets!
Main effect of column IV1 (Drug) H0 The column
means are equal HA The column means are not
equal Main effect of row IV2 (Experience) H0
The row means are equal HA The row means are
not equal Main effect of interaction of the two
IVs H0 The cell means are equal HA The cell
means are not equal
The drug produced an effect!
Experience produced an effect!
The effect of the drug depends On how much
experience people have with it!
11There are eight possible outcomes
- For each possible outcome, Ill show you
- Some sample means that are consistent with that
outcome. - A graph of those means.
- A partially completed ANOVA table.
- On the test you will need to
- Know how to produce graphs from means and/or
sample data. - Know how to interpret graphs.
- Understand two-factor ANOVA tables.
- You will NOT have to understand two-factor df.
12No main effects and no interaction
Drug (columns)
Placebo
Active
35.5
34.5
35.0
Never
Experience (rows)
35.5
36.5
36.0
Nightly
35.5
35.5
13No main effects and no interaction
Drug (columns)
Placebo
Active
35.5
34.5
35.0
Never
Experience (rows)
35.5
36.5
36.0
Nightly
35.5
35.5
Source SS df S2 Fobt p Rows (Exp.) XX.X
1 XX.X XX.X n.s. Columns (Drug) XX.X
1 XX.X XX.X n.s. Interaction (EC) XX.X
1 XX.X XX.X n.s. Within (Error) XX.X 28 XX.X XX.X
Total XX.X 31
14No main effects and no interaction
Placebo
Drug (columns)
70
Placebo
Active
Active
35.5
34.5
35.0
35
Never
Time to sleep
Experience (rows)
0
35.5
36.5
36.0
Nightly
Never
Nightly
Experience
35.5
35.5
Source SS df S2 Fobt p Rows (Exp.) XX.X
1 XX.X XX.X n.s. Columns (Drug) XX.X
1 XX.X XX.X n.s. Interaction (EC) XX.X
1 XX.X XX.X n.s. Within (Error) XX.X 28 XX.X XX.X
Total XX.X 31
15No main effects and no interaction
Placebo
Drug (columns)
70
Placebo
Active
Active
35.5
34.5
35.0
35
Never
Time to sleep
Experience (rows)
0
35.5
36.5
36.0
Nightly
Never
Nightly
Experience
35.5
35.5
Source SS df S2 Fobt p Rows (Exp.) XX.X
1 XX.X XX.X n.s. Columns (Drug) XX.X
1 XX.X XX.X n.s. Interaction (EC) XX.X
1 XX.X XX.X n.s. Within (Error) XX.X 28 XX.X XX.X
Total XX.X 31
16No main effects and no interaction
Placebo
Drug (columns)
70
Placebo
Active
Active
35.5
34.5
35.0
35
Never
Time to sleep
Experience (rows)
0
35.5
36.5
36.0
Nightly
Never
Nightly
Experience
35.5
35.5
Source SS df S2 Fobt p Rows (Exp.) XX.X
1 XX.X XX.X n.s. Columns (Drug) XX.X
1 XX.X XX.X n.s. Interaction (EC) XX.X
1 XX.X XX.X n.s. Within (Error) XX.X 28 XX.X XX.X
Total XX.X 31
17No main effects and no interaction
Placebo
Drug (columns)
70
Placebo
Active
Active
35.5
34.5
35.0
35
Never
Time to sleep
Experience (rows)
0
35.5
36.5
36.0
Nightly
Never
Nightly
Experience
35.5
35.5
Source SS df S2 Fobt p Rows (Exp.) XX.X
1 XX.X XX.X n.s. Columns (Drug) XX.X
1 XX.X XX.X n.s. Interaction (EC) XX.X
1 XX.X XX.X n.s. Within (Error) XX.X 28 XX.X XX.X
Total XX.X 31
18No main effects and no interaction
Drug (columns)
Placebo
70
Placebo
Active
Active
35.5
34.5
35.0
35
Never
Time to sleep
Experience (rows)
0
35.5
36.5
36.0
Nightly
Never
Nightly
Experience
35.5
35.5
Source SS df S2 Fobt p Rows (Exp.) XX.X
1 XX.X XX.X n.s. Columns (Drug) XX.X
1 XX.X XX.X n.s. Interaction (EC) XX.X
1 XX.X XX.X n.s. Within (Error) XX.X 28 XX.X XX.X
Total XX.X 31
19No main effects and no interaction
Drug (columns)
Placebo
70
Placebo
Active
Active
35.5
34.5
35.0
35
Never
Time to sleep
Experience (rows)
0
35.5
36.5
36.0
Nightly
Never
Nightly
Experience
35.5
35.5
Source SS df S2 Fobt p Rows (Exp.) XX.X
1 XX.X XX.X n.s. Columns (Drug) XX.X
1 XX.X XX.X n.s. Interaction (EC) XX.X
1 XX.X XX.X n.s. Within (Error) XX.X 28 XX.X XX.X
Total XX.X 31
20No main effects and no interaction
Drug (columns)
Placebo
70
Placebo
Active
Active
35.5
34.5
35.0
35
Never
Time to sleep
Experience (rows)
0
35.5
36.5
36.0
Nightly
Never
Nightly
Experience
35.5
35.5
Source SS df S2 Fobt p Rows (Exp.) XX.X
1 XX.X XX.X n.s. Columns (Drug) XX.X
1 XX.X XX.X n.s. Interaction (EC) XX.X
1 XX.X XX.X n.s. Within (Error) XX.X 28 XX.X XX.X
Total XX.X 31
21No main effects and no interaction
Drug (columns)
Placebo
70
Placebo
Active
Active
35.5
34.5
35.0
35
Never
Time to sleep
Experience (rows)
0
35.5
36.0
36.5
Nightly
Never
Nightly
Experience
35.5
35.5
Source SS df S2 Fobt p Rows (Exp.) XX.X
1 XX.X XX.X n.s. Columns (Drug) XX.X
1 XX.X XX.X n.s. Interaction (EC) XX.X
1 XX.X XX.X n.s. Within (Error) XX.X 28 XX.X Tota
l XX.X 31
22Main effect of Drug, no effect of Exp. or
interaction
Placebo
Drug (columns)
70
Active
Placebo
Active
35.5
25.5
15.5
Never
35
Time to sleep
Experience (rows)
0
35.5
15.5
25.5
Nightly
Never
Nightly
Experience
35.5
15.5
Source SS df S2 Fobt p Rows (Exp.) XX.X
1 XX.X XX.X n.s. Columns (Drug) XX.X
1 XX.X XX.X lt.05 Interaction (EC) XX.X
1 XX.X XX.X n.s. Within (Error) XX.X 28 XX.X XX.X
Total XX.X 31
23Main effect of Exp., no effect of Drug or
interaction
Placebo
Drug (columns)
70
Active
Placebo
Active
35.5
35.0
34.5
35
Never
Time to sleep
Experience (rows)
0
55.5
54.5
55.0
Nightly
Never
Nightly
Experience
45.5
44.5
Source SS df S2 Fobt p Rows (Exp.) XX.X
1 XX.X XX.X lt.05 Columns (Drug) XX.X
1 XX.X XX.X n.s. Interaction (EC) XX.X
1 XX.X XX.X n.s. Within (Error) XX.X 28 XX.X Tota
l XX.X 31
24Interaction and no main effects
Drug (columns)
Placebo
70
Placebo
Active
Active
40.0
20.0
30.0
35
Never
Time to sleep
Experience (rows)
0
20.0
30.0
40.0
Nightly
Never
Nightly
Experience
30.0
30.0
Source SS df S2 Fobt p Rows (Exp.) XX.X
1 XX.X XX.X n.s. Columns (Drug) XX.X
1 XX.X XX.X n.s. Interaction (EC) XX.X
1 XX.X XX.X lt.05 Within (Error) XX.X 28 XX.X Tota
l XX.X 31
25Main effects of Drug and Exp., no interaction
Placebo
Drug (columns)
70
Active
Placebo
Active
35.5
15.5
25.5
Never
35
Time to sleep
Experience (rows)
55.5
0
35.5
45.5
Nightly
Never
Nightly
Experience
45.5
25.5
Source SS df S2 Fobt p Rows (Exp.) XX.X
1 XX.X XX.X lt.05 Columns (Drug) XX.X
1 XX.X XX.X lt.05 Interaction (EC) XX.X
1 XX.X XX.X n.s. Within (Error) XX.X 28 XX.X Total
XX.X 31
26Main effect of Drug and Interaction, no Exp. Drug
Placebo
Drug (columns)
70
Active
Placebo
Active
37.5
31.5
25.5
Never
35
Time to sleep
Experience (rows)
0
35.5
30.5
33.0
Nightly
Never
Nightly
Experience
36.5
28.0
Source SS df S2 Fobt p Rows (Exp.) XX.X
1 XX.X XX.X n.s. Columns (Drug) XX.X
1 XX.X XX.X Interaction (EC) XX.X
1 XX.X XX.X lt.05 Within (Error) XX.X 28 XX.X Tota
l XX.X 31
27Main effect of Exp. and Interaction, no Drug
effect.
Drug (columns)
Placebo
70
Placebo
Active
Active
28.5
29.0
29.5
Never
35
Time to sleep
Experience (rows)
40.5
35.5
38.0
0
Nightly
Never
Nightly
Experience
34.5
32.5
Source SS df S2 Fobt p Rows (Exp.) XX.X
1 XX.X XX.X lt.05 Columns (Drug) XX.X
1 XX.X XX.X n.s. Interaction (EC) XX.X
1 XX.X XX.X lt.05 Within (Error) XX.X 28 XX.X Tota
l XX.X 31
28Both main effects and interaction are significant
Drug (columns)
Placebo
70
Placebo
Active
Active
35.5
23.0
10.5
Never
35
Time to sleep
Experience (rows)
40.5
30.5
35.5
0
Nightly
Never
Nightly
Experience
38.5
20.5
Source SS df S2 Fobt p Rows (Exp.) XX.X
1 XX.X XX.X lt.05 Columns (Drug) XX.X
1 XX.X XX.X lt.05 Interaction (EC) XX.X
1 XX.X XX.X lt.05 Within (Error) XX.X 28 XX.X XX.X
Total XX.X 31
29An example test problem.
- Most people believe that repetition aids recall
and some people feel that the learning of new
material interferes with the recall of previously
learned material, especially if the new material
is very much like the previously learned
material. A cognitive scientist tests the
separate and combined influence of these two
variables by asking 36 subjects to recall 16
nonsense syllable (e.g., RET). The effects of
repetition are assessed by presenting the
nonsense syllable pairs to groups of subjects (12
each) 4, 8, or 12 times. Before testing each
subject for recall all subjects are required to
learn some intervening material, either
dissimilar to the syllables (i.e., number n
18) or similar to syllables (i.e., more
syllables n 18). There are 6 cells in this 2
factor experiment, and 6 subjects are in each
cell. Diagram the experiment, identify all
hypotheses, and, using the data (number of
syllables recalled) and ANOVA table on the next
slide, graph the results and identify any
significant effects.
30Diagram of recall study 2 by 3 matrix
Number of repetitions
4
8
12
16 14 16 13 15 16
16 12 11 15 13 14
10 11 12 15 14 10
Numbers
Similarity of material
8 7 4 5 5 6
11 13 9 10 8 9
14 12 16 15 12 13
Syllables
Source SS df S2 Fobt p Rows 121
1 Columns 176 2 Interaction (RC) 35
2 Within (Error) 88 30 Total 420 35
31Diagram of recall study 2 by 3 matrix
Number of repetitions
4
8
12
- Need to
- Identify hypotheses
- Calculate cell means
- Calculate row and
- column means
- Complete ANOVA
- table
- 4) Make graph
16 12 11 15 13 14
16 14 16 13 15 16
10 11 12 15 14 10
Numbers
Similarity of material
8 7 4 5 5 6
11 13 9 10 8 9
14 12 16 15 12 13
Syllables
Source SS df S2 Fobt p Rows 121
1 Columns 176 2 Interaction (RC) 35
2 Within (Error) 88 30 Total 420 35
32Hypotheses for recall study
Main effect of column IV1 (repetitions) H0 The
column means are equal HA The column means are
not equal Main effect of row IV2 (similarity of
other material) H0 The row means are equal HA
The row means are not equal Interaction of the
two IVs H0 The cell means are equal HA The
cell means are not equal
33Diagram of recall study 2 by 3 matrix
Number of repetitions
4
8
12
Numbers
12.0
13.5
15.0
13.5
Similarity of material
5.8
9.8
10.0
13.7
Syllables
8.9
14.4
11.8
Source SS df S2 Fobt p Rows 121
1 Columns 176 2 Interaction (RC) 35
2 Within (Error) 88 30 Total 420 35
34Diagram of recall study 2 by 3 matrix
Number of repetitions
4
8
12
Numbers
12.0
13.5
15.0
13.5
Similarity of material
5.8
9.8
10.0
13.7
Syllables
8.9
14.4
11.8
Source SS df S2 Fobt p Rows 121
1 121.0 Columns 176 2 88.0 Interaction
(RC) 35 2 17.5 Within (Error) 88 30
2.9 Total 420 35
35Diagram of recall study 2 by 3 matrix
Number of repetitions
4
8
12
Numbers
12.0
13.5
15.0
13.5
Similarity to syllables
5.8
9.8
10.0
13.7
Syllables
8.9
14.4
11.8
Source SS df S2 Fobt Fcrit p Rows 121
1 121.0 41.7 4.17 lt.05 Columns 176 2
88.0 30.3 3.32 lt.05 Interaction (RC) 35 2
17.5 6.0 3.32 lt.05 Within (Error) 88 30
2.9 Total 420 35
36Both main effects and the interaction are
significant.
Numbers
Syllables
16
Both the number of repetitions and the
similarity of learned material influence
recall, and these two factors also interact to
influence recall.
8
Syllables recalled
0
4
12
8
Repetitions