Two Way ANOVA

Download Report

Transcript Two Way ANOVA

STAT 3130
Statistical Methods I
Session 4
Two Way Analysis of Variance
(ANOVA)
Two Way ANOVA
From previous notes, we understand the following about ANOVA:
 It allows us to determine if significant differences of a
quantitative variable exist across 3 or more levels of a
qualitative variable.
 What the hypothesis statements look like.
 The assumptions which need to be met.
 How to read the ANOVA table.
 The test statistic and the F-distribution.
 How to make a decision with the results.
 If the results allow us to reject the null, we know to run a post
hoc test and how to find the differences.
Two Way ANOVA
But the notes on ANOVA so far, only allow us to evaluate a single
qualitative variable (with 3+ levels) with a quantitative variable.
What if we have a two qualitative variables and a single
quantitative variable?
For example, what if we wanted to examine how music affects the
productivity of our employees? Specifically, we want to examine
the type of music (rock, country, jazz) as well as the loudness of the
music (soft or loud).
To do this, we would need to run a two way ANOVA.
Two Way ANOVA
Two Way ANOVA will provide us with not only the main effects (the
results of each qualitative variable individually) but it will also
provide us with the interaction effects BETWEEN the qualitative
variables.
Interaction effects are commonly present, so you need to look for
them. Here are some examples:
 Diet Plan A resulted in a greater weight loss for women than for
men, but Diet Plan B resulted in a greater weight loss for men than
for women.
 Fertilizer A was best in high sunlight areas but Fertilizer B was best
in low light areas.
Two Way ANOVA
As we saw with the One Way ANOVA, we have some important
assumptions which need to be checked prior to executing a Two
Way ANOVA:
1. The samples must have been randomly drawn and must be
independent of each other.
2. The variances of the samples must be approximately equal.
3. The groups should all have approximately the same sample size.
Two Way ANOVA
In a Two Way ANOVA, we actually test three sets of hypothesis
statements simultaneously:
H1a: The population means of the first factor are not equal.
H1b: The population means of the second factor are not equal.
H1c: There is an interaction effect between the first and second
factors.
Two Way ANOVA
In a Two Way ANOVA we are working to ascertain the following:
1. What is the variability in the data attributable to Factor A?
2. What is the variability in the data attributable to Factor B?
3. What is the variability in the data attributable to the interaction
between Factors A and B?
4. What is the variability in the data which is random and cannot
be attributed to A, B or A and B?
Two Way ANOVA
There are three possible outcomes from your analysis…
1. Significant main effects but no significant interaction
2. One significant main effect, one nonsignificant main
effect, and significant interaction
3. Significant main effects and significant interaction
Lets look at these outcomes using SAS…