Week5 ANOVA 202425
Week5 ANOVA 202425
Schedule
• Revision
• Single-factor Analysis of Variance (ANOVA)
• SPSS
Last week…
• Single t-test
• Independent t-test
• Repeated t-test
• Or are all three so far apart that they all likely come
from unique populations?
Statistical Hypotheses for ANOVA (1 of 2)
H 0 : 1 = 2 = 3
Statistical Hypotheses for ANOVA (2 of 2)
• Analysis of variance
• Used to evaluate mean differences between two or more treatments
(or populations)
• Uses sample data as the basis for drawing general conclusions about
populations
• Clear advantage over a t test: can be used to compare more than two
treatments at the same time
Variance Between
Variance Within
Total variance = variance Within + Variance Between
The Logic of Analysis of Variance
• Between-treatments variance
• Variability results from general differences between the treatment conditions
• Variance between treatments measures differences between sample means
• Within-treatments variance
• Variability within each sample
• Individual scores are not the same within each sample
• Analysis of Variance is a variability ratio
• Total variance = Variance Between + Variance Within
• Partitioning – separating total variance into its component parts
x1
x3
Variance Between
x2
x1
x3
Variance WITHIN
x2
The F-Ratio: The Test Statistic for ANOVA
• The value obtained for the F-ratio determines whether any treatment effects
exist; two possibilities:
• Fail to reject H 0
• No systematic treatment effects; the differences are entirely caused by random, unsystematic
factors
• the means are very close to overall mean or distribution melt together
𝑆𝑀𝐴𝐿𝐿
𝐿𝐴𝑅𝐺𝐸
• means are fairly close to overall mean and distributions overlap a bit; difficult to distinguish
𝑆𝑖𝑚𝑙𝑎𝑟
𝑆𝑖𝑚𝑙𝑎𝑟
• Reject H0
• The treatment does have an effect and causes systematic differences between samples
• At least one mean is an outlier and each distribution is narrow; distinct from each other.
𝐿𝐴𝑅𝐺𝐸
•
𝑆𝑀𝐴𝐿𝐿
The Test Statistic for ANOVA (1 of 2)
a
v
e
r
a
g
e
Sample Variance
𝑆𝑆
S2 =
𝑑𝑓
Variance revisited and sum of squares
SSBetween
SSWithin
(Between/treatments)
(Within/Error) sum of squares
sum of square
SST (Total Sum of Squares)
2
G
SS total = X2 −
N
G
SS total = X2 −
N
G
SS total = X2 −
N
SS between
MSbetween = 2
sbetween =
df between
SS within
MS within = 2
s within =
df within
2
sbetween MSbetween
F= 2 =
s within MS within
Calculation of Variances (MS) and the F-Ratio
SS between
MSbetween = 2
sbetween = = 88.67/2 = 44.33
df between
SS within
MS within = 2
s within = = 2812.57/18 = 156.254
df within
2
sbetween MSbetween
F= 2 = =44.33/156.25 = .284
s within MS within
The Structure and Sequence of Calculations for the ANOVA
Step 1.
G2
SS total = X −
2
N
SS between −treatments =
T 2 G2
n
−
N
SS within −treatments = SS inside each treatment
Step 2.
SS between SS within
MSbetween = sbetween
2
= MS within = s within
2
=
df between df within
Step 3.
2
sbetween MSbetween
F= 2 =
s within MS within
Anova Summary table
• Concise method for presenting ANOVA results
• Helps organize and direct the analysis process
• Convenient for checking computations
• “Standard” statistical analysis program output
Total 2901.24 20
Examples of Hypothesis Testing and Effect Size with ANOVA
• Hypothesis tests use the same four steps that have been used in
earlier hypothesis tests
• Computation of the test statistic F is done
in stages
• Compute SStotal, SSbetween, SSwithin
• Compute MStotal, MSbetween, MSwithin
• Compute F
Example
compare F(2, 17) = 2.95 with the cutoff F-ratio (3.59, at alpha = .05)
fail to reject the null hypothesis.
Measuring Effect Size for ANOVA
SS between treatments
2 =
SS total
Reporting the Results of Analysis of Variance
MS within
HSD = q
n