One-Way Analysis of Variance

advertisement
KNR 445
Statistics
ANOVA (1w)
Slide 1
Computing our example
 Step 1: compute sums of squares
 Recall our data…
TV Movie
Soap Opera
Infomercial
1
6
10
3
8
13
4
10
5
5
4
9
2
12
8
n=5
n=5
n=5
X Movie= 3
X soap = 8
X sales= 9
1
2
N = 15
X T  6.67
KNR 445
Statistics
ANOVA (1w)
Slide 2
Computing our example
 Step 1: compute sums of squares
2
 SStotal
2 ( X )
SS total  X 
1
N
= [102 + 132 + 52 + 92 + 82 + 62 + 82 + 102 + 42
+122 + 12 + 32 + 42 + 52 + 22] 
2
(
10

13

5

9

8

6

8

10

4

12

1

3

4

5

2
)




15


= 854 – 666.67 = 187.33
KNR 445
Statistics
ANOVA (1w)
Slide 3
Computing our example
 Step 1: compute sums of squares
j 1
 SSgroup
SS group  

j k
 
n j ( X j  XT )
 
2
SS group  5(9  6.67)  5(8  6.67)  5(3  6.67)
2
2
= 27.14 + 8.84 + 67.34= 103.32
1
2
2

KNR 445
Statistics
ANOVA (1w)
Slide 4
Computing our example
 Step 1: compute sums of squares
 SSerror
 =SStotal-SSgroup
= 187.33 – 103.32 = 84.01
 So…
 SSgroup = 103.32
 SSerror = 84.01
 Sstotal = 187.33
1
KNR 445
Statistics
ANOVA (1w)
Slide 5
Computing our example
 Step 2: Compute df
 df group = k – 1 = 3 – 1 = 2
 dferror = N – k = 15 – 3 = 12
 df total = N – 1 = 15 – 1 = 14
1
KNR 445
Statistics
ANOVA (1w)
Slide 6
Computing our example
 Step 3: Compute Mean Squares (MS)
1
MS group 
MS error
SS group
df group
103.32

 51.66
2
SS error 84.01


7
df error
12
KNR 445
Statistics
ANOVA (1w)
Slide 7
Computing our example
 Step 4: Put all the info in the ANOVA table:
Source
1
Sum of
DF
Squares
MS
F
MSB/MSW
=51.66/7 p-value
=7.38
Between
103.32
Groups
2
51.66
Within
Groups
84.01
12
7
Total
187.33
14
sig.
KNR 445
Statistics
ANOVA (1w)
Slide 8
Computing our example
 Step 5: Compare Fobs to Fcritical:
 Fobs = 7.38
 Fcritical = …need to obtain Fcrit from tables for F
 df will be (numerator, denominator) in F-ratio
 df = 2, 12
 F (2,12, α = .05) = 3.89
1
 Reject H0 (Fobs > Fcritical)
2
KNR 445
Statistics
ANOVA (1w)
Slide 9
1-way ANOVA in SPSS
Data: One column for the
grouping variable (IV: group
in this case), one for the
measure (DV: fitness in this
case)
Data: Note grouping
variable has 3 levels (goes
from 1 to 3)
1
KNR 445
Statistics
ANOVA (1w)
Slide 10
1-way ANOVA in SPSS
Procedure: Choose the
appropriate procedure, and…
1
KNR 445
Statistics
ANOVA (1w)
Slide 11
1-way ANOVA in SPSS
Dialog box: slide the
variables…
1
…into the appropriate
places
KNR 445
Statistics
ANOVA (1w)
Slide 12
1-way ANOVA in SPSS
1
n – k = 15 - 3 = 12
k-1 = 3-1 = 2
n-1 = 15-1 = 14
Result!
Here we see the
between and within
sources of variance
Here are the SD’s (here expressed as the “mean
square” – that’s the average sum of squares,
which is after all a ‘standardized’ deviation)
KNR 445
Statistics
ANOVA (1w)
Slide 13
2
1
Significant result…now what?
 Follow-up tests
 ONLY compute after a significant ANOVA
 Like a collection of little t-tests
 But they control overall type 1 error
comparatively well
 They do not have as much power as the
omnibus test (the ANOVA) – so you might get a
significant ANOVA & no sig. Follow-up
 Purpose is to identify the locus of the effect
(what means are different, exactly?)
KNR 445
Statistics
ANOVA (1w)
Slide 14
1
Significant result…now what?
 Follow-up tests – most common…
 Tukey’s HSD (honestly sig. diff.)
 Formula:
MSwithin
HSD  q
ngroup
 But it’s easier to use SPSS…
KNR 445
Statistics
ANOVA (1w)
Slide 15
Follow-ups to ANOVA in SPSS
1
2
Choose “post-hoc”
test (meaning ‘after
this’)
Check the
appropriate box
for the HSD
(Tukey, not
Tukey’s b)
KNR 445
Statistics
ANOVA (1w)
Slide 16
Follow-ups to ANOVA in SPSS
2
Sig. levels
between
pairs of
groups
And one that
does (from
the other 2)
1
Groups that
do not differ
3
KNR 445
Statistics
ANOVA (1w)
Slide 17
Follow-ups to ANOVA in SPSS
So “TV Movie” differs from
both “Soap Opera” and
“infomercial” , significantly
1
“Soap Operas”
and
“infomercials”
do not differ
significantly
KNR 445
Statistics
ANOVA (1w)
Slide 18
Assumptions to test in One-Way
1.
1
2.
3.
Samples should be independent (as with independent ttest – does not mean perfectly uncorrelated)
Each of the k populations should be normal (important
only when samples are small…if there’s a problem, can
use Kruskal-Wallis test)
The k samples should have equal variances (this is the
homogeneity of variance assumption, and we’ll look at it
shortly…violations are important mostly with small
samples and unequal n’s)
KNR 445
Statistics
ANOVA (1w)
Slide 19
Homogeneity of variance - SPSS
1. Click on the
‘options’ button
2. Choose homogeneity
of variance
3. Click
continue
KNR 445
Statistics
ANOVA (1w)
Slide 20
Homogeneity of variance - SPSS
Homogeneity test output
As you can see, no problems
here. The test has to be
significant for there to be a
violation
KNR 445
Statistics
ANOVA (1w)
Slide 21
1
Interpret output
 “The amount of aggression arising from watching
TV changed according to the type of program
watched, F(2,12) = 7.38, p  .05. Tukey’s HSD
follow-up tests showed that those watching
violent movies (M = 3) experienced less aggression
than those watching soap operas (M = 8) or
infomercials (M = 9). There was no difference in
aggression level between those who watched soap
operas and those who watched infomercials.”
Download