9. basic concepts of one way analysis of variance (anova)
TRANSCRIPT
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
1/38
1
Basic Concepts of One-wayAnalysis of Variance
(ANOVA)
Spori Goran, PhD.
http://kif.hr/predmet/mki
http://www.science4performance.com/
http://kif.hr/predmet/mkihttp://kif.hr/predmet/mki -
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
2/38
2
Overview What is ANOVA?
When is it useful? How does it work? Some Examples
Limitations Conclusions
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
3/38
3
Definitions ANOVA: analysis of variation in an
experimental outcome and
especially of a statistical variance inorder to determine the contributionsof given factors or variables to thevariance.
Remember: Variance: the square ofthe standard deviation
Remember: RA
Fischer, 1919-
Evolutionary Biology
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
4/38
4
Introduction Any data set has variability
Variability exists within groups
and between groups
Question that ANOVA allows us toanswer : Is this variability significant, ormerely by chance?
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
5/38
5
The difference between variationwithin a group and variation
between groups may help usdetermine this. If both are equal it islikely that it is due to chance andnot significant.
H0: Variability w/i groups =variability b/t groups, this meansthat 1 = n
Ha: Variability w/i groups does not =variability b/t groups, or, 1 n
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
6/38
6
Assumptions Normal distribution
Variances of dependent variableare equal in all populations
Random samples; independentscores
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
7/38
7
One-Way ANOVA One factor (manipulated
variable)
One response variable
Two or more groups to compare
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
8/38
8
Usefulness Similar to t-test
More versatile than t-test
Compare one parameter(response variable) betweentwo or more groups
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
9/38
9
For instance, ANOVA
Could be Used to: Compare heights of plants with andwithout galls
Compare birth weights of deer indifferent geographical regions
Compare responses of patients toreal medication vs. placebo
Compare attention spans ofundergraduate students in differentprograms at PC.
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
10/38
10
Why Not Just Use t-
tests? Tedious when many groups are
present
Using all data increasesstability
Large number ofcomparisons some may
appear significant by chance
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
11/38
11
Remember that Standard deviation (s)
n
s = [( (xi X)2)/(n-1)]i= 1
In this case: Degrees of freedom (df)
df = Number of observations or groups - 1
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
12/38
12
Notation
k= # of groups n= # observations in each group xij= one observation in group i
Y= mean over all groups Yi= mean for group i SS = Sum of Squares MS = Mean of Squares = Between MS/Within MS
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
13/38
13
FYI this is how SS
Values are calculatedk ni Total SS = (xij )2 = SStot
i=1 j=1
k ni
Within SS = (xij i)2 = SSwi=1 j=1
k ni
Between SS = ( i )2 = SSbeti=1 j=1
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
14/38
14
and SStot = SSw + SSbet
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
15/38
15
Calculating MS Values MS = SS/df
For between groups, df = k-1 For within groups, df= n-k
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
16/38
16
Hypothesis Testing &
Significance Levels
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
17/38
17
F-Ratio = MSBet/MSw If:
The ratio of Between-Groups MS:
Within-Groups MS is LARGE rejectH0 there isa difference betweengroups
The ratio of Between-Groups MS:Within-Groups MS is SMALL do notreject H0 there is nodifferencebetween groups
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
18/38
18
p-values Use table in stats book to determine
p
Use df for numerator anddenominator
Choose level of significance
If F > critical value, reject the null
hypothesis (for one-tail test)
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
19/38
19
Example 1, pp. 400 of
your handout Three groups:
Middle class sample Persons on welfare
Lower-middle class sample
Question: Are attitudes towardwelfare payments the same?
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
20/38
20
So,
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
21/38
21
and
From the table with = 0.05 and df = 2 and 24, we see thatif F > 3.40 we can reject Ho. This is what we would
conclude in this case.
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
22/38
22
Example 2 Bat cave gates:
Group 1 = No gate (NG)
Group 2 = Straight entrance gate (SE) Group 3 = Angled entrance gate (AE) Group 4 = Straight dark zone gate (SD) Group 5 = Angled dark zone gate (AD)
Question: Is variation in bat flightspeed greater within or betweengroups? Or Ho = no differencesignificant difference in means.
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
23/38
23
Just leave me alone
Max! Go back to
your hockey!
http://www.junglephotos.com/animals/mammals/mammals.htmlhttp://www.junglephotos.com/animals/mammals/mammals.htmlhttp://www.junglephotos.com/animals/mammals/mammals.htmlhttp://www.junglephotos.com/animals/mammals/mammals.html -
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
24/38
24
Example 2 (contd)Group #,
i
Gate
Type
Mean FS (m/s) sd FS (m/s) ni
1 NG 5.6 0.93 150
2 SE 3.8 1.05 150
3 AE 4.7 0.97 150
4 SD 4.2 1.23 137
5 AD 5.1 1.03 143
Hypothetical data for bat flight speed with various gate arrangements.
FS= Flight speed; sd = standard deviation
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
25/38
25
Example 2 SSbetBetween SS= 300
Group
#, i
Gate
Type
Mean FS
(m/s)
sd FS (m/s) ni
1 NG 5.6 0.93 150
2 SE 3.8 1.05 150
3 AE 4.7 0.97 150
4 SD 4.2 1.23 137
5 AD 5.1 1.03 143
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
26/38
26
Example 2 SSw
Within SS = 790
Group
#, i
Gate
Type
Mean FS
(m/s)
sd FS (m/s) ni
1 NG 5.6 0.93 150
2 SE 3.8 1.05 150
3 AE 4.7 0.97 150
4 SD 4.2 1.23 137
5 AD 5.1 1.03 143
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
27/38
27
Example 2 (contd) Between MS = 300/4 = 75
Within MS = 790/(730-5) = 1.09
F Ratio = 75/1.09 = 68.8
See Table find p-value based ondf= 4,
Since F>value found on the table we
reject Ho.
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
28/38
28
What ANOVA Cannot
Do Tell which groups are different
Post-hoc test of mean differencesrequired
Compare multiple parametersfor multiple groups (so it cannot
be used for multiple responsevariables)
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
29/38
29
Some Variations Two-Way, Three-Way, etc.
ANOVA (will talk about this nextclass)
2+ factors
MANOVA (Multiple analysis ofvariance)
multiple response variables
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
30/38
30
Summary ANOVA:
allows us to know if variability in a data
set is between groups or merely withingroups
is more versatile than t-test can compare multiple groups at once
cannot process multiple responsevariables does not indicate which groups are
different
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
31/38
31
Now, lets go to our
SPSS manual Perform the sample problem on the effects
of attachment styles on the psychology ofsleep with the data set from the NAAGEsite called Delta Sleep.
Pay attention to the procedure and thepost-hoc tests to determine which groupsare significantly different. Perform the
Tukey Test at a 5% significance level. Look at your output and interpret your
results.
Tell me when you are done.
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
32/38
32
So, you had
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
33/38
33
Then, following the steps
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
34/38
34
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
35/38
35
You got
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
36/38
36
and
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
37/38
37
What do all these
mean?
-
7/30/2019 9. Basic Concepts of One Way Analysis of Variance (ANOVA)
38/38
38
When you are done
with this, Do practice exercises 1, 4, 6, 7
and 12 from the handout inSPSS.
Create the data sets.
Run the one-way ANOVAS andinterpret your results.