dr. sinn, psyc301, the joy of 1-way anova1 unit 3 outline day 1: introduce f return tests (20) power...
Post on 18-Dec-2015
216 Views
Preview:
TRANSCRIPT
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 2
Lecture Overview on ANOVA
Reviewhypothesis testing; inferential statistics
z-test, t-test, independent & dependent t-test
New StuffPower – Ability to reject Ho
ANOVA• Analysis of Variance
• Done with 3 or more groups
• Playground Exercise
• Complete SPSS Example
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 3
Power
Review: Hypothesis Testing ErrorsWrongly rejecting Ho: Chance of Type I error: α
Wrongly retaining Ho: Chance of Type II error: β
PowerOpposite of β
Power = 1- β
Ability to reject Ho (when Ho should be rejected).
Researchers want Power! • Want ability to reject Ho; Show you were right to suspect a
difference.
• Want to show IV affects your DV.
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 4
Error Areas
α area (where we reject the Ho, and we shouldn’t)
• beyond tcritical
• under Ho
β area (where we retain the Ho, and we shouldn’t)
• inside tcritical
• under Ha
Ho: μ=55
tctc
αα β
Ha: μ>55
tc
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 5
Increasing Power
#1: Increase Treatment: Increase difference between groups (μ’s)
β
Reality: μ=57
tc
βtc
H0: μ=55
H0: μ=55
Reality: μ=72
tctc
ββ
#2: Decrease Sampling Error: Decrease differences within groups.
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 6
Examples of increasing power
#1 Increase Treatment Effect(Increase BG differences)
Rat study
0,3,or 6 mg
0,10,or 20 mg
Therapy study
10 therapy sessions
1 therapy session
#2 Decrease Sampling Error(Decrease WG differences)
Rat study
Different strains of rats
Same strain of rat
Rats allowed to eat freely
Rats all unfed for 24 hours
Therapy study
Diff. types of Therapy
Same type of Therapy
Rat Study: IV:Caffeine Level DV:Amt. Food Found
Therapy Study: IV:Therapy (drug, talk, drug+talk, or control) DV: Improvement]
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 7
1-Way ANOVA
ANOVAAnalysis of Variance1-way means 1 Independent Variable (IV)
Purpose: ANOVA allows hypothesis testing with 3+ sample means
• Imagine study on interventions to help frosh make friends• Three IV levels: Standard courses, interactive courses,
clustered courses.
WG
BG
MS
MSF
ANOVA uses F-test
Strategy: Compare variability within group to variability between groups.
F is ratio between two values:
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 9
Matching Exercise
D r . S i n n , P S Y C 3 0 1 , T h e j o y o f 1 - w a y A N O V A 1
M a t c h i n g V a r i a n c e t o O u t p u t ( & * & )
S t a n d a r d C o u r s e s
I n t e r a c t i v e C o u r s e s
C l u s t e r e d C o u r s e s
0 2 92 1 0 1 27 4 82 6 1 26 9 64 3 50 8 1 1
m e a n 3 . 0 6 . 0 9 . 0
s t d . d e v . 2 . 8 3 . 1 2 . 8
N u m b . o f " g o o d f r i e n d s " b y e n d o f y e a r
1 D r . S i n n , P S Y C 3 0 1 , T h e j o y o f 1 - w a y A N O V A 5
M a t c h i n g V a r i a n c e t o O u t p u t ( & * & )
6 3 . 0 0 7 . 5
8 . 4 4
F =
W G
B G
WG
BG
MS
MSF =
A
D r . S i n n , P S Y C 3 0 1 , T h e j o y o f 1 - w a y A N O V A 2
M a t c h i n g V a r i a n c e t o O u t p u t ( & * & )
S t a n d a r d C o u r s e s
I n t e r a c t i v e C o u r s e s
C l u s t e r e d C o u r s e s
0 7 72 2 67 2 42 6 16 2 24 0 00 4 2
m e a n 3 . 0 3 . 3 3 . 1
s t d . d e v . 2 . 8 2 . 5 2 . 6
N u m b . o f " g o o d f r i e n d s " b y e n d o f y e a r
2 D r . S i n n , P S Y C 3 0 1 , T h e j o y o f 1 - w a y A N O V A 6
M a t c h i n g V a r i a n c e t o O u t p u t ( & * & )
0 . 1 4 0 . 0
6 . 9 0
F =
W G
B G
WG
BG
MS
MSF =
B
D r . S i n n , P S Y C 3 0 1 , T h e j o y o f 1 - w a y A N O V A 3
M a t c h i n g V a r i a n c e t o O u t p u t ( & * & )
S t a n d a r d C o u r s e s
I n t e r a c t i v e C o u r s e s
C l u s t e r e d C o u r s e s
2 5 82 5 82 6 83 6 94 6 1 04 7 1 04 7 1 0
m e a n 3 . 0 6 . 0 9 . 0
s t d . d e v . 1 . 0 0 . 8 1 . 0
N u m b . o f " g o o d f r i e n d s " b y e n d o f y e a r
3
D r . S i n n , P S Y C 3 0 1 , T h e j o y o f 1 - w a y A N O V A 7
M a t c h i n g V a r i a n c e t o O u t p u t ( & * & )
6 3 . 0 0 7 0 . 9
0 . 8 9
F =
W G
B G
WG
BG
MS
MSF =
C
D r . S i n n , P S Y C 3 0 1 , T h e j o y o f 1 - w a y A N O V A 4
M a t c h i n g V a r i a n c e t o O u t p u t ( & * & )
S t a n d a r d C o u r s e s
I n t e r a c t i v e C o u r s e s
C l u s t e r e d C o u r s e s
3 4 44 5 55 5 55 6 76 6 77 6 87 9 1 0
m e a n 5 . 3 5 . 9 6 . 6
s t d . d e v . 1 . 5 1 . 6 2 . 1
N u m b . o f " g o o d f r i e n d s " b y e n d o f y e a r
4
D r . S i n n , P S Y C 3 0 1 , T h e j o y o f 1 - w a y A N O V A 8
M a t c h i n g V a r i a n c e t o O u t p u t ( & * & )
2 . 9 0 1 . 0
3 . 0 0
F =
W G
B G
WG
BG
MS
MSF =
D
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 11
Draw Conclusions from Playground
What does a large F mean?
What two things will make F large?
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 12
Partitioning Variance
Partitionfancy word for “divide up”ANOVA partitions variance (MS means variance)
Types of varianceTotal variance = MSWG + MSBG
MSWG= sampling error (background noise)
MSBG = sampling error + treatment (includes effect of Independent Variable)
error
errortreatment
MS
MSF
WG
BG
If just error F tends toward 1.0
If treatment effect F gets larger
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 13
Example of 1-way ANOVA
Studying effect of caffeine on productivity
Does caffeine help or hurt?
IV: Level of Caffeine: 0, 10, 20 mg
DV: Number of Food Pellets Found
0 mg 10 mg 20 mg
23142
12312
444455
Number of Food
Pellets Found
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 14
SPSS Data Entry
DV
IV
Label levels of IV so output is easier to read.
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 15
SPSS AnalysisGo to Analyze, Compare Means, & select One-way ANOVA
Put IV here.
Put DV here.
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 16
SPSS Analysis, Part #2
Conducts “after the fact” test to compare all pairs of sample means.
Select this to get descriptive statistics like sample means & standard deviations.
Gives you a line graph of the sample means
Alpha level still set to .05, just like it was with t-tests.
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 17
SPSS OutputDescriptives
FOOD_FND
5 2.40 1.140 .510 1 4
5 1.80 .837 .374 1 3
6 4.33 .516 .211 4 5
16 2.94 1.389 .347 1 5
0 mg
10 mg
20 mg
Total
N MeanStd.
DeviationStd.Error Min Max
ANOVA
FOOD_FND
19.604 2 9.802 13.65 .001
9.333 13 .718
28.937 15
Between Groups
Within Groups
Total
Sum ofSquares df
MeanSquare F Sig.
WG
BG
MS
MSF
Source of Variation Table
Sample means from 3 groups, plus mean amount of food found overall.
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 18
Where does F come from?
MSWG = SSWG/dfWG = Sum of Squares / degrees of freedom
MSBG = SSBG/dfBG = Sum of Squares / degrees of freedom
Degrees of freedomdfWG: NT – K (Total # of subjects - # of groups)
dfBG: K-1 (# of groups – 1)
dfTOTAL: NT – 1 (Total # of subjects – 1)
Expectations:If I give you df and SS, you can calculate F
You don’t have to get any SS by hand.
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 19
SPSS Output –Post Hoc Test
FOOD_FND
Student-Newman-Keulsa,b
5 1.80
5 2.40
6 4.33
.270 1.0
GROUP10 mg
0 mg
20 mg
Sig.
N 1 2
Subset foralpha = .05
Means for groups in homogeneous subsets are displayed.
GROUP
20 mg10 mg0 mg
Mea
n of
FO
OD
_FN
D
4.5
4.0
3.5
3.0
2.5
2.0
1.5
No Sig. Diff. Between 0 & 10mg
Rats at 20 mg found significantly more food than rats on 0 or 10 mg of caffeine.
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 20
SPSS Output– Practical Significance
η2 (“eta squared”)Effect size statistic – indicates % of variance explained
Measures impact of IV on DV
We can explain 68% of the variance in how much food a rat finds if we know the level of caffeine.
ANOVA
FOOD_FND
19.604 2 9.802 13.65 .001
9.333 13 .718
28.937 15
Between Groups
Within Groups
Total
Sum ofSquares df
MeanSquare F Sig.
6775.937.28
604.192 Total
BG
SS
SS
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 21
Hypothesis Testing Steps
1. Comparison: cf. three sample means.
2. Hypothesis: Ho: μ1= μ2 = μ3 Ha: Not all μ’s equal
3. Set-up: α= .05 , dfbg= K-1= 2, dfwg= NT-K = 16-3=13, Fcrit = 3.80
4. Fobt = 13.653
5. Reject Ho.
The hypothesis was largely supported. Rats found sig. more food on 20mg of caffeine (M=4.33) than on 0mg (M=2.40) or 10mg (M=1.80), F(2,13) = 13.653, p <=.05. Caffeine has a large effect on food finding behavior, accounting for about 68% of the variance, η2 = .6775.
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 23
Lab #8: 1-way ANOVA
TV Problem: The hypothesis was supported.
Light TV users provided more community service
(M = 6.13) than did moderate users (M = 4.00),
who provided more than heavy users (M = 1.75),
F(2,21) = 15.963, p ≤ .05. TV accounts for about
60% of the variance in community service, η2
= .6032.
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 24
Follow-up Questions
Q1: Variance within group? MSwg = 2.399
Q2: Variance between groups? MSbg=38.292
Q3: Replacing heavy scores with 4,5,4,5,6,5,4,3 would decrease the difference between groups because the heavy users would then difference less from the other groups.
Q4: Decreasing between group differences (decreasing treatment) would decrease F.
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 25
Problem #2: Post Hoc Explanation
Student-Newman-Keulsa
5 1.20
5 1.60
5 2.40 2.40
5 3.40
.077 .068
commute45 min commute
60 min commute
30 min commute
0 min commute
Sig.
N 1 2
Subset for alpha = .05
Means for groups in homogeneous subsets are displayed.
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 26
Problem #2: Post Hoc Explanation
Student-Newman-Keulsa
5 1.20
5 1.60
5 2.40 2.40
5 3.40
.077 .068
commute45 min commute
60 min commute
30 min commute
0 min commute
Sig.
N 1 2
Subset for alpha = .05
Means for groups in homogeneous subsets are displayed.
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 27
Problem #2:
The hypothesis was supported. People commuting
0 minutes participated significantly more (M=3.4
hours) than people commuting 45 (M=1.2) or 60
minutes (M=1.6), F (3,16) = 7.256, p≤.05.
Commuting accounted for a large amount of
variance in community involvement, η2 = .5764.
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 28
Follow-up Questions
Q1: Variance within group? MSwg = .650
Q2: Variance between groups? MSbg=4.717
Q3: Replacing 30 minute commuting scores with 1,4,1,4,3 would increase the within group variability.
Q4: Increasing sampling error would decrease F.
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 29
Review Partitioning
Study: Does alcohol affect reaction time? Identify the treatment
effect in this case.
Explain how sampling error might arise.
No Alcohol
2 Beers 4 Beers
10 15 20
20 25 15
15 30 30
10 20 40
14 23 26 Sample Means
μna=?? μ2b=?? μ4b=?? Population Means
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 31
Review Partitioning
Study: Does alcohol affect reaction time?
What accounts for variability within groupswithin groups?
What accounts for variability between groups?
What’s the Formula for F?
No Alcohol
2 Beers 4 Beers
10 15 20
20 25 15
15 30 30
10 20 40
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 32
Review Partitioning
Study: Does alcohol affect reaction time?
If the alcohol content of the beers is not held constant, what happens to F?
a. increasesb. decreases
c. neither
No Alcohol
2 Beers 4 Beers
10 15 20
20 25 15
15 30 30
10 20 40
If the alcohol content of the beers is not held constant, what happens?
a. error increases
b. error decreases
c. treatment effect increases
d. treatment effect decreases
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 33
Hypothesis Testing Steps
1. Comparison: cf. three sample means.
2. Hypothesis: Ho: μ1= μ2 = μ3 Ha: Not all μ’s equal
3. Set-up: α= .05 , dfbg=K-1=3-1=2, dfwg=NT-K=12-3=9, Fcrit = 4.26
• now do one-way ANOVA on SPSS
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 34
SPSS Output - Charts
ANOVA
ALCOHOL
329.167 2 164.583 2.633 .126
562.500 9 62.500
891.667 11
Between Groups
Within Groups
Total
Sum ofSquares df
MeanSquare F Sig.
Descriptives
ALCOHOL
4 13.75 4.787 2.394
4 22.50 6.455 3.227
4 26.25 11.087 5.543
12 20.83 9.003 2.599
no alcohol
2 beers
4 beers
Total
N Mean Std. Deviation Std. Error
ALCOHOL
Student-Newman-Keulsa
4 13.75
4 22.50
4 26.25
.118
GROUPno alcohol
2 beers
4 beers
Sig.
N 1
Subset foralpha = .05
Means for groups in homogeneous subsets are displayed.
Uses Harmonic Mean Sample Size = 4.000.a.
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 35
SPSS Output - Graphs
GROUP
4 beers2 beersno alcohol
Mea
n of
ALC
OH
OL
28
26
24
22
20
18
16
1412 444N =
GROUP
4 beers2 beersno alcoholM
ean
+-
2 S
E A
LCO
HO
L
40
30
20
10
0
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 36
Hypothesis Testing Steps
1. Comparison: cf. three sample means.
2. Hypothesis: Ho: μ1= μ2 = μ3 Ha: Not all μ’s equal
3. Set-up: α= .05 , dfbg=K-1=3-1=2, dfwg=NT-K=12-3=9, Fcrit = 4.26
4. Fobt = 2.633
5. Retain Ho.
The hypothesis was not supported. The reaction times following no alcohol (M=13.75), two beers (M=22.50), and four beers (M=26.25) did not differ significantly, F(2,9) = 2.633, n.s..
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 37
Numb. of Words Recalled: Dataset A
Bet. Group Varib: L M H
MSbg: _______
With. Group Varib: L M H
MSwg: _______
4 8 12
5 9 10
4 9 11
5 8 12
WG
BG
MS
MSF
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 38
Numb. of Words Recalled: Dataset B
Bet. Group Varib: L M H
MSbg: _______
With. Group Varib: L M H
MSwg: _______
8 4 10
9 5 12
9 5 11
8 4 12
WG
BG
MS
MSF
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 39
Numb. of Words Recalled: Dataset C
Bet. Group Varib: L M H
MSbg: _______
With. Group Varib: L M H
MSwg: _______
7 3 9
10 6 13
7 6 10
10 3 13
WG
BG
MS
MSF
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 40
Numb. of Words Recalled: Dataset D
Bet. Group Varib: L M H
MSbg: _______
With. Group Varib: L M H
MSwg: _______
7 6 7
10 8 7
7 6 12
10 10 12
WG
BG
MS
MSF
Dr. Sinn, PSYC301, The joy of 1-way ANOVA 41
Numb. of Words Recalled: Dataset E
Bet. Group Varib: L M H
MSbg: _______
With. Group Varib: L M H
MSwg: _______
7 6 7
10 8 7
7 6 12
10 10 12
7 6 7
10 8 7
7 6 12
10 10 12
WG
BG
MS
MSF
top related