Psych 230 Psychological Measurement and Statistics Pedro Wolf November 18, 2009.
Psych 230 Psychological Measurement and Statistics
description
Transcript of Psych 230 Psychological Measurement and Statistics
Psych 230
Psychological Measurement and Statistics
Pedro Wolf
November 18, 2009
This Time….
• Analysis of Variance (ANOVA)
• Concepts of variability
• Why bother with ANOVA?
• Conducting a test
Statistical Testing
1. Decide which test to use2. State the hypotheses (H0 and HA)
3. Calculate the obtained value4. Calculate the critical value (size of )5. Make our conclusion
Statistical Testing
1. Decide which test to use2. State the hypotheses (H0 and HA)
3. Calculate the obtained value4. Calculate the critical value (size of )5. Make our conclusion6. Conduct post-hoc tests
Analysis of Variance (ANOVA)
Analysis of Variance
• In this statistical test, we are interested in seeing if
there are significant differences between more
than two groups
• In an experiment involving only two conditions of
the independent variable, you can use either a t-
test or the ANOVA
Analysis of Variance
• We will look at the variance within each group and
compare that to the variance found between the
groups
• Remember: Variance is the degree to which scores
are dispersed in our data
Analysis of Variance
• Remember: H0 is that all the group means in our
experiment are the same
– any difference between them is due to random chance
• H1 is that there is a difference between our group
means
– a difference that is so unlikely to have happened by chance
that we conclude it is due to the independent variable
Analysis of Variance
• There is always variability in our data
• This variability can be due to two factors:
1. The independent variable• Systematic factors
2. Error variance• Random factors
Analysis of Variance
• So, to draw a conclusion about whether the
independent variable makes a difference to the
dependent variable, we need to know what kind
of variance there is in our data
– variance due to the independent variable (systematic)
– variance due to random factors (error)
Analysis of Variance
• To assess this, we need to look at the variance both
within each of our experimental conditions and
also at the variance between each of our
experimental conditions
• Assume H0 is true - there is no effect of our
independent variable
• What type of variance might we expect to see?
Analysis of Variance
• Example: we want to see if people differ in their shoe
size by where they sit in the class
– three groups of students: front row, middle row and back
row
– expect to find significant differences in shoe size?
• Front row: vary in their shoe size: 6,8,5,4,7
• Middle row: vary in their shoe size : 9,9,4,6,7
• Back row: vary in their shoe size : 4,6,12,10,8
Analysis of VarianceBack Middle Front
6 9 4
8 9 6
5 4 12
4 6 10
7 7 8
6 7 8 Mean=7
Analysis of VarianceBack Middle Front
6 9 4
8 9 6
5 4 12
4 6 10
7 7 8
6 7 8 Mean=7
Total variance
Analysis of VarianceBack Middle Front
6 9 4
8 9 6
5 4 12
4 6 10
7 7 8
6 7 8 Mean=7
Variance within the groups
Total variance
Analysis of Variance
Variance between the groups
Back Middle Front
6 9 4
8 9 6
5 4 12
4 6 10
7 7 8
6 7 8 Mean=7
Variance within the groups
Total variance
Analysis of VarianceBack Middle Front
6 9 4
8 9 6
5 4 12
4 6 10
7 7 8
6 7 8 Mean=7
Total Variance =
Variance between + Variance within
Variance within the groups
Total variance
Variance between the groups
Analysis of Variance
• So, when H0 is actually true, we should expect the
same amount of variance both within each group
and between the groups
• If we divide Variancebetween by Variancewithin, we
should get?
• If H0 is true, this ratio should be close to 1
Analysis of Variance
• How about if H1 is actually true?
• In this case, we know the independent variable is
having some effect
• So, we should expect more variance between each
group than there is within each group
Analysis of Variance
• Example: we want to see if people differ in their
attendance by where they sit in the class
– front row, middle row and back row
– expect to find significant differences in attendance?
• Front row: vary in their attendance: 6,5,7,6,6
• Middle row: vary in their attendance: 7,8,6,7,7
• Back row: vary in their attendance: 8,8,7,9,8
Analysis of Variance
Variance between the groups
Back Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
Total Variance =
Variance between + Variance within
Variance within the groups
Total variance
Analysis of Variance
• When HA is true, we have more variance between
each group than there is within each group
• If we divide Variancebetween by Variancewithin, we should
get?
• If HA is true, this ratio should be more than 1
– the F-ratio
ANOVA
• A one-way ANOVA is performed when only one
independent variable is tested in the experiment
• Example: we are interested in the differences
between freshmen, sophomores and juniors on
tests of socialization
– dependent variable: socialization scores
– independent variable: class standing
ANOVA
• A two-way ANOVA is performed when two
independent variables are tested in the experiment
• Example: we are interested in the differences
between male and female freshmen, sophomores
and juniors on tests of socialization
– dependent variable: socialization scores
– independent variable 1: class standing
– independent variable 2: gender
ANOVA
• When an independent variable is studied using independent samples in all conditions, it is called a between-subjects factor
• A between-subjects factor involves using the formulas for a between-subjects ANOVA
ANOVA
• When a factor is studied using related (dependent) samples in all levels, it is called a within-subjects factor
• This involves a set of formulas called a within-subjects ANOVA
ANOVA
ANOVA
ANOVA - assumptions
1. All conditions contain independent samples
2. The dependent scores are normally distributed, interval or ratio score
3. The variances of the populations are homogeneous
ANOVA - why bother?
• We want to see if there are differences between our three groups:– Freshmen
– Sophomores
– Juniors
• Why not just do a bunch of t-tests?– Freshmen vs. Sophomores– Freshmen vs. Juniors– Sophomores vs. Juniors
ANOVA - experiment-wise error
• The overall probability of making a Type I error somewhere in an experiment is call the experiment-wise error rate
• When we use a t-test to compare only two means in an experiment, the experiment-wise error rate equals
ANOVA - experiment-wise error
• When there are more than two means in an experiment, the multiple t-tests result in an experiment-wise error rate that is much larger than the we have selected– Freshmen vs. Sophomores: =0.05– Freshmen vs. Juniors: =0.05– Sophomores vs. Juniors: =0.05– experiment-wise error rate = 0.05+0.05+0.05=approx 0.15
• Using the ANOVA allows us to compare the means from all levels of the factor and keep the experiment-wise error rate equal to
Conducting an ANOVA
1. Decide which test to use
• Are we comparing a sample to a population?– Yes: Z-test if we know the population standard deviation– Yes: One-sample T-test if we do not know the population std dev– No: Keep looking
• Are we looking for the difference between samples?– Yes: How many samples are we comparing?
• Two: Use the Two-sample T-test– Are the samples independent or related?
» Independent: Use Independent Samples T-test» Related: Use Related Samples T-test
• More than Two: Use Anova test
2. State the Hypotheses
• H0 : 1 = 2 = ……. = k
– there is no difference in the means
• HA : not all s are equal – there is a difference between some of the means
• Only conduct two-tailed tests using ANOVA
3. Calculate the obtained value (Fobt)
• The statistic for the ANOVA is F
• When Fobt is significant, this indicates only that somewhere among the means at least two of them differ significantly
• It does not indicate which groups differ significantly
• When the F-test is significant, we perform post hoc comparisons (step 6)
3. Calculate the obtained value (Fobt)
• Remember, we are trying to compare the between group variance to the within group variance
• We use the mean squares to calculate this
• The mean square within groups is an estimate of the variability in scores as measured by differences within the conditions
• The mean square between groups is an estimate of the differences in scores that occurs between the levels in a factor
3. Calculate the obtained value (Fobt)
• The F-ratio is therefore the mean square between groups divided by the mean square within groups
3. Calculate the obtained value (Fobt)
• The F-ratio is therefore the mean square between groups divided by the mean square within groups
wn
bnobt MS
MSF
3. Calculate the obtained value (Fobt)
• The F-ratio is therefore the mean square between groups divided by the mean square within groups
• When H0 is true, Fobt should be close to 1
• When HA is true, Fobt should be greater than 1
wn
bnobt MS
MSF
3. Calculate the obtained value (Fobt)
• The ANOVA table:
Source Sum of Squares
df Mean Squares
F
Between SSbn dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total SStot dftot
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between SSbn dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total SStot dftot
wn
bnobt MS
MSF
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between SSbn dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total SStot dftot
wn
bnobt MS
MSF
bn
bnbn df
SSMS
wn
wnwn df
SSMS
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between SSbn dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total SStot dftot
wn
bnobt MS
MSF
bn
bnbn df
SSMS
wn
wnwn df
SSMS
dftot= N - 1
dfwn= N - k
dfbn= k - 1
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between SSbn dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total SStot dftot
wn
bnobt MS
MSF
bn
bnbn df
SSMS
wn
wnwn df
SSMS
dftot= N - 1
dfwn= N - k
dfbn= k - 1
bntotwn SSSSSS
N
X
n
XSS
2tot
2
bn
)(
columnin
)columnin(
N
XXSS
2tot2
tottot
)(
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
dftot= N - 1
dfwn= N - k
dfbn= k - 1
bn
bnbn df
SSMS
wn
wnwn df
SSMS
wn
bnobt MS
MSF
bntotwn SSSSSS
N
X
n
XSS
2tot
2
bn
)(
columnin
)columnin(
N
XXSS
2tot2
tottot
)(
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
dftot= N - 1
dfwn= N - k
dfbn= k - 1
bn
bnbn df
SSMS
wn
wnwn df
SSMS
wn
bnobt MS
MSF
bntotwn SSSSSS
N
X
n
XSS
2tot
2
bn
)(
columnin
)columnin(
N
XXSS
2tot2
tottot
)(
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751 dftot= N - 1
dfwn= N - k
dfbn= k - 1
bn
bnbn df
SSMS
wn
wnwn df
SSMS
wn
bnobt MS
MSF
bntotwn SSSSSS
N
X
n
XSS
2tot
2
bn
)(
columnin
)columnin(
N
XXSS
2tot2
tottot
)(
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15
dftot= N - 1
dfwn= N - k
dfbn= k - 1
bn
bnbn df
SSMS
wn
wnwn df
SSMS
wn
bnobt MS
MSF
bntotwn SSSSSS
N
X
n
XSS
2tot
2
bn
)(
columnin
)columnin(
N
XXSS
2tot2
tottot
)(
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
dftot= N - 1
dfwn= N - k
dfbn= k - 1
bn
bnbn df
SSMS
wn
wnwn df
SSMS
wn
bnobt MS
MSF
bntotwn SSSSSS
N
X
n
XSS
2tot
2
bn
)(
columnin
)columnin(
N
XXSS
2tot2
tottot
)(
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
bntotwn SSSSSS
N
X
n
XSS
2tot
2
bn
)(
columnin
)columnin(
N
XXSS
2tot2
tottot
)(
Source Sum of Squares
df Mean Squares
F
Between SSbn dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total SStot dftot
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
N
X
n
XSS
2tot
2
bn
)(
columnin
)columnin(
Source Sum of Squares
df Mean Squares
F
Between SSbn dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total SStot dftot
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
N
X
n
XSS
2tot
2
bn
)(
columnin
)columnin(
Source Sum of Squares
df Mean Squares
F
Between SSbn dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total SStot dftot
= [(302/5) + (352/5) + (402/5)] - (1052/15)
= [(900/5) + (1225/5) + 1600/5)] - (11025/15)
= [180 + 245 + 320] - (735)
= 745 - 735 = 10
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
N
X
n
XSS
2tot
2
bn
)(
columnin
)columnin(
Source Sum of Squares
df Mean Squares
F
Between 10 dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total SStot dftot
= [(302/5) + (352/5) + (402/5)] - (1052/15)
= [(900/5) + (1225/5) + 1600/5)] - (11025/15)
= [180 + 245 + 320] - (735)
= 745 - 735 = 10
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
Source Sum of Squares
df Mean Squares
F
Between 10 dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total SStot dftot
N
XXSS
2tot2
tottot
)(
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
Source Sum of Squares
df Mean Squares
F
Between 10 dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total SStot dftot
= (751) - (1052/15)
= 751 - 735
= 751 - 735 = 16
N
XXSS
2tot2
tottot
)(
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
Source Sum of Squares
df Mean Squares
F
Between 10 dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total 16 dftot
= (751) - (1052/15)
= 751 - 735
= 751 - 735 = 16
N
XXSS
2tot2
tottot
)(
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
Source Sum of Squares
df Mean Squares
F
Between 10 dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total 16 dftot
= 16 - 10
= 6
bntotwn SSSSSS
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
Source Sum of Squares
df Mean Squares
F
Between 10 dfbn MSbn Fobt
Within 6 dfwn MSwn
Total 16 dftot
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
Source Sum of Squares
df Mean Squares
F
Between 10 dfbn MSbn Fobt
Within 6 dfwn MSwn
Total 16 dftot
= 3 - 1
= 2
dfbn= k - 1
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
Source Sum of Squares
df Mean Squares
F
Between 10 2 MSbn Fobt
Within 6 dfwn MSwn
Total 16 dftot
= 3 - 1
= 2
dfbn= k - 1
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
Source Sum of Squares
df Mean Squares
F
Between 10 2 MSbn Fobt
Within 6 dfwn MSwn
Total 16 dftot
= 15 - 3
= 12
dfwn= N - k
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
Source Sum of Squares
df Mean Squares
F
Between 10 2 MSbn Fobt
Within 6 12 MSwn
Total 16 dftot
= 15 - 3
= 12
dfwn= N - k
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
Source Sum of Squares
df Mean Squares
F
Between 10 2 MSbn Fobt
Within 6 12 MSwn
Total 16 dftot
= 15 - 1
= 14
dftot= N - 1
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
Source Sum of Squares
df Mean Squares
F
Between 10 2 MSbn Fobt
Within 6 12 MSwn
Total 16 14
= 15 - 1
= 14
dftot= N - 1
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
Source Sum of Squares
df Mean Squares
F
Between 10 2 MSbn Fobt
Within 6 12 MSwn
Total 16 14
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
Source Sum of Squares
df Mean Squares
F
Between 10 2 MSbn Fobt
Within 6 12 MSwn
Total 16 14
= 10 / 2
= 5
bn
bnbn df
SSMS
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
Source Sum of Squares
df Mean Squares
F
Between 10 2 5 Fobt
Within 6 12 MSwn
Total 16 14
= 10 / 2
= 5
bn
bnbn df
SSMS
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
Source Sum of Squares
df Mean Squares
F
Between 10 2 5 Fobt
Within 6 12 MSwn
Total 16 14
= 6 / 12
= 0.5
wn
wnwn df
SSMS
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
Source Sum of Squares
df Mean Squares
F
Between 10 2 5 Fobt
Within 6 12 0.5
Total 16 14
= 6 / 12
= 0.5
wn
wnwn df
SSMS
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
Source Sum of Squares
df Mean Squares
F
Between 10 2 5 Fobt
Within 6 12 0.5
Total 16 14
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
Source Sum of Squares
df Mean Squares
F
Between 10 2 5 Fobt
Within 6 12 0.5
Total 16 14
= 5 / 0.5
= 10
wn
bnobt MS
MSF
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
Source Sum of Squares
df Mean Squares
F
Between 10 2 5 10
Within 6 12 0.5
Total 16 14
= 5 / 0.5
= 10
wn
bnobt MS
MSF
Analysis of VarianceBack Middle Front
6 7 8
5 8 8
7 6 7
6 7 9
6 7 8
6 7 8 Mean=7
∑X=30 ∑X=35 ∑X=40 ∑Xtot=105
∑X2=182 ∑X2=247 ∑X2=322 ∑X2tot=751
n1=5 n2=5 n3=5 N = 15k=3
Source Sum of Squares
df Mean Squares
F
Between 10 2 5 10
Within 6 12 0.5
Total 16 14
4. Calculate the critical value
• Assume =0.05• Always a two-tail test with ANOVA
• dfbetween = k - 1• dfwithin = N - k
• k is the number of levels, or groups• N is the total number of subjects
df betweendf within 1 2 3 4 5 12 0.05 4.75 3.88 3.49 3.26 3.11
Fcrit and Fobt
Fcrit= 3.88
Fobt= 10
5. Make our Conclusion
• Fcrit = 3.88• Fobt = 10
• If Fobt is outside the rejection region, we retain H0
• If Fobt is inside the rejection region, we reject H0 and accept HA
• We conclude that there is a significant difference between some of our groups– but which groups?
6. Conduct post-hoc tests
• To determine which means differ from each other significantly, we conduct post-hoc tests
• Post hoc comparisons are like t-tests
– we compare all possible pairs of means from a factor, one pair at a time
• There are many possible post-hoc tests to use:
– Tukey’s HSD
– Scheffe
– Bonferroni
6. Conduct post-hoc tests
• When the n’s in all levels of the factor are equal, we can use Tukey’s HSD test
– “honestly significant difference”
• Calculate the difference between each pair of means
• Compare each difference between the means to the HSD
• If the absolute difference between two means is greater than the HSD, then these means differ significantly
6. Conduct post-hoc tests
• Calculating the HSD:
where qk is found using the appropriate table
n
MSqHSD k
wn)(
6. Conduct post-hoc tests
HSD = (qk) [√(MSwn/n)]
qk: Look up Table L pg. 562 - Need:
– k (number of means being compared)
– dfwn
= (3.77) [√(0.5/5)]
= (3.77) [√(0.1)]
= (3.77) (0.316)
= 1.19
n
MSqHSD k
wn)(
6. Conduct post-hoc tests
• HSD = 1.19
• Difference between means:
• ‘Back’ (mean=6) and ‘Middle’ (mean=7) : 1
• ‘Middle’ (mean=7) and ‘Front’ (mean=8): 1
• ‘Back’ (mean=6) and ‘Front’ (mean=8): 2
• Because 2 is greater than 1.19, there is a significant difference between the ‘front’ and ‘back’ groups in terms of their attendance
ANOVA - example
Analysis of Variance
A clinical psychologist has noted that autistic children seem to respond to treatment better if they are in a familiar environment. To evaluate the influence of environment, the psychologist selects a group of 18 children who are currently in treatment and randomly divides them into three groups. One group continues to receive treatment in the clinic as usual. For the second group, treatment sessions are conducted entirely in the child’s home. The third group gets half of the treatment in the clinic and half at home. After six weeks the data look as follows (high scores are good):
– Clinic: 14, 13, 14, 13, 10, 15
– Home: 10, 12, 11, 13, 11, 10
– Both: 11, 14, 14, 15, 13, 15
Do the data indicate any significant differences between the three settings? Use =0.05
1. Decide which test to use
• Are we comparing a sample to a population?– Yes: Z-test if we know the population standard deviation– Yes: One-sample T-test if we do not know the population std dev– No: Keep looking
• Are we looking for the difference between samples?– Yes: How many samples are we comparing?
• Two: Use the Two-sample T-test– Are the samples independent or related?
» Independent: Use Independent Samples T-test» Related: Use Related Samples T-test
• More than Two: Use Anova test
2. State the Hypotheses
• H0 : 1 = 2 = ……. = k
– there is no difference in the means
• HA : not all s are equal – there is a difference between some of the means
3. Calculate the obtained value (Fobt)Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
dftot= N - 1
dfwn= N - k
dfbn= k - 1
bn
bnbn df
SSMS
wn
wnwn df
SSMS
wn
bnobt MS
MSF
bntotwn SSSSSS
N
X
n
XSS
2tot
2
bn
)(
columnin
)columnin(
N
XXSS
2tot2
tottot
)(
3. Calculate the obtained value (Fobt)Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229 dftot= N - 1
dfwn= N - k
dfbn= k - 1
bn
bnbn df
SSMS
wn
wnwn df
SSMS
wn
bnobt MS
MSF
bntotwn SSSSSS
N
X
n
XSS
2tot
2
bn
)(
columnin
)columnin(
N
XXSS
2tot2
tottot
)(
3. Calculate the obtained value (Fobt)Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
dftot= N - 1
dfwn= N - k
dfbn= k - 1
bn
bnbn df
SSMS
wn
wnwn df
SSMS
wn
bnobt MS
MSF
bntotwn SSSSSS
N
X
n
XSS
2tot
2
bn
)(
columnin
)columnin(
N
XXSS
2tot2
tottot
)(
3. Calculate the obtained value (Fobt)Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
n1=6 n2=6 n3=6 N = 18
dftot= N - 1
dfwn= N - k
dfbn= k - 1
bn
bnbn df
SSMS
wn
wnwn df
SSMS
wn
bnobt MS
MSF
bntotwn SSSSSS
N
X
n
XSS
2tot
2
bn
)(
columnin
)columnin(
N
XXSS
2tot2
tottot
)(
3. Calculate the obtained value (Fobt)Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
n1=6 n2=6 n3=6 N = 18k=3
dftot= N - 1
dfwn= N - k
dfbn= k - 1
bn
bnbn df
SSMS
wn
wnwn df
SSMS
wn
bnobt MS
MSF
bntotwn SSSSSS
N
X
n
XSS
2tot
2
bn
)(
columnin
)columnin(
N
XXSS
2tot2
tottot
)(
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between SSbn dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total SStot dftot
Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
n1=6 n2=6 n3=6 N = 18k=3
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between SSbn dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total SStot dftot
Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
n1=6 n2=6 n3=6 N = 18k=3
N
X
n
XSS
2tot
2
bn
)(
columnin
)columnin(
= [(802/6) + (672/6) + (822/6)] - (2292/18)
= [(6400/6) + (4489/6) + 6724/6)] - (52441/18)
= [1066.67 + 748.17 + 1120.67] - (2913.39)
= 2935.51 - 2913.39 = 22.12
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 22.11 dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total SStot dftot
Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
n1=6 n2=6 n3=6 N = 18k=3
N
X
n
XSS
2tot
2
bn
)(
columnin
)columnin(
= [(802/6) + (672/6) + (822/6)] - (2292/18)
= [(6400/6) + (4489/6) + 6724/6)] - (52441/18)
= [1066.67 + 748.17 + 1120.67] - (2913.39)
= 2935.51 - 2913.39 = 22.11
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 22.11 dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total SStot dftot
Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
n1=6 n2=6 n3=6 N = 18k=3
= (2969) - (2292/18)
= 2969 - 2913.39
= 55.61
N
XXSS
2tot2
tottot
)(
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 22.11 dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total 55.61 dftot
Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
n1=6 n2=6 n3=6 N = 18k=3
= (2969) - (2292/18)
= 2969 - 2913.39
= 55.61
N
XXSS
2tot2
tottot
)(
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 22.11 dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total 55.61 dftot
Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
n1=6 n2=6 n3=6 N = 18k=3
= 55.61 - 22.12
= 33.49
bntotwn SSSSSS
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 22.11 dfbn MSbn Fobt
Within 33.49 dfwn MSwn
Total 55.61 dftot
Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
n1=6 n2=6 n3=6 N = 18k=3
= 55.61 - 22.12
= 33.49
bntotwn SSSSSS
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 22.11 dfbn MSbn Fobt
Within 33.49 dfwn MSwn
Total 55.61 dftot
Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
n1=6 n2=6 n3=6 N = 18k=3
= 3 - 1
= 2
dfbn= k - 1
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 22.11 2 MSbn Fobt
Within 33.49 dfwn MSwn
Total 55.61 dftot
Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
n1=6 n2=6 n3=6 N = 18k=3
= 3 - 1
= 2
dfbn= k - 1
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 22.11 2 MSbn Fobt
Within 33.49 dfwn MSwn
Total 55.61 dftot
Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
n1=6 n2=6 n3=6 N = 18k=3
= 18 - 3
= 15
dfwn= N - k
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 22.11 2 MSbn Fobt
Within 33.49 15 MSwn
Total 55.61 dftot
Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
n1=6 n2=6 n3=6 N = 18k=3
= 18 - 3
= 15
dfwn= N - k
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 22.11 2 MSbn Fobt
Within 33.49 15 MSwn
Total 55.61 dftot
Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
n1=6 n2=6 n3=6 N = 18k=3
= 18 - 1
= 17
dftot= N - 1
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 22.11 2 MSbn Fobt
Within 33.49 15 MSwn
Total 55.61 17
Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
n1=6 n2=6 n3=6 N = 18k=3
= 18 - 1
= 17
dftot= N - 1
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 22.11 2 MSbn Fobt
Within 33.49 15 MSwn
Total 55.61 17
Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
n1=6 n2=6 n3=6 N = 18k=3
= 22.12 / 2
= 11.06
bn
bnbn df
SSMS
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 22.11 2 11.055 Fobt
Within 33.49 15 MSwn
Total 55.61 17
Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
n1=6 n2=6 n3=6 N = 18k=3
= 22.12 / 2
= 11.06
bn
bnbn df
SSMS
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 22.11 2 11.055 Fobt
Within 33.49 15 MSwn
Total 55.61 17
Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
n1=6 n2=6 n3=6 N = 18k=3
= 33.49 / 15
= 2.23
wn
wnwn df
SSMS
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 22.11 2 11.055 Fobt
Within 33.49 15 2.23
Total 55.61 17
Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
n1=6 n2=6 n3=6 N = 18k=3
= 33.49 / 15
= 2.23
wn
wnwn df
SSMS
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 22.11 2 11.055 Fobt
Within 33.49 15 2.23
Total 55.61 17
Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
n1=6 n2=6 n3=6 N = 18k=3
= 11.06 / 2.23
= 4.96
wn
bnobt MS
MSF
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 22.11 2 11.055 4.957
Within 33.49 15 2.23
Total 55.61 17
Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
n1=6 n2=6 n3=6 N = 18k=3
= 11.06 / 2.23
= 4.96
wn
bnobt MS
MSF
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 22.11 2 11.05 4.96
Within 33.49 15 2.23
Total 55.61 17
Clinic Home Both
14 10 11
13 12 14
14 11 14
14 13 15
10 11 13
15 10 15
13.33 11.17 13.67 Mean=12.72
∑X=80 ∑X=67 ∑X=82 ∑Xtot=229
∑X2=1082 ∑X2=755 ∑X2=1322 ∑X2tot=2969
n1=6 n2=6 n3=6 N = 18k=3
4. Calculate the critical value
• Assume =0.05• Always a two-tail test with ANOVA
• dfbetween = k - 1 = 3 - 1 = 2• dfwithin = N - k = 18 - 3 = 15
• Fcrit for 2 and 15 degrees of freedom and = 0.05 is 3.68
Fcrit and Fobt
Fcrit= 3.68
Fobt= 4.96
5. Make our Conclusion
• Fcrit = 3.68• Fobt = 4.96
• Fobt is inside the rejection region, we reject H0 and accept HA
• We conclude that there is a significant difference between some of our groups– which groups?
6. Conduct post-hoc tests
HSD = (qk) [√(MSwn/n)]
qk: Look up Table L - Need:
– k (number of means being compared)
– dfwn
= (3.675) [√(2.233/6)]
= (3.675) [√(0.372)]
= (3.675) (0.61)
= 2.242
n
MSqHSD k
wn)(
6. Conduct post-hoc tests
• HSD = 2.242
• Difference between means:
• Clinic - Home = 2.166
• Clinic - Both = -0.334
• Home - Both = -2.5
• Therefore, there is a significant difference in scores between treatment at home, and treatment at both home and at the clinic
ANOVA - your turn
Problem
A psychologist is interested in the effects of room temperature on learning. 15 subjects are recruited for an experiment to answer this questions - 5 subjects undergo a learning task in a room with a temperature of 50 degrees, another group of 5 learn the same material in room with a temperature of 70 degrees and the final group learn in a temperature of 90 degrees. The data are below, with higher numbers indicating greater learning. Does room temperature affect rates of learning? Use =0.05
– 50 degrees: 0, 1, 3, 1, 0
– 70 degrees : 4, 3, 6, 3, 4
– 90 degrees : 1, 2, 2, 0, 0
Analysis of Variance50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
dftot= N - 1
dfwn= N - k
dfbn= k - 1
bn
bnbn df
SSMS
wn
wnwn df
SSMS
wn
bnobt MS
MSF
bntotwn SSSSSS
N
X
n
XSS
2tot
2
bn
)(
columnin
)columnin(
N
XXSS
2tot2
tottot
)(
1. Decide which test to use
• Are we comparing a sample to a population?– Yes: Z-test if we know the population standard deviation– Yes: One-sample T-test if we do not know the population std dev– No: Keep looking
• Are we looking for the difference between samples?– Yes: How many samples are we comparing?
• Two: Use the Two-sample T-test– Are the samples independent or related?
» Independent: Use Independent Samples T-test» Related: Use Related Samples T-test
• More than Two: Use Anova test– No: Keep looking
• Are we looking for the relationship between variables?– Yes: Use the Correlation test
2. State the Hypotheses
• H0 : 1 = 2 = ……. = k
– there is no difference in the means
• HA : not all s are equal – there is a difference between some of the means
Analysis of Variance50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
Analysis of Variance50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
Analysis of Variance50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
Analysis of Variance50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
Analysis of Variance50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
n1=5 n2=5 n3=5 N = 15
Analysis of Variance50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
n1=5 n2=5 n3=5 N = 15k=3
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between SSbn dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total SStot dftot
50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
n1=5 n2=5 n3=5 N = 15k=3
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between SSbn dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total SStot dftot
N
X
n
XSS
2tot
2
bn
)(
columnin
)columnin(
= [(52/5) + (202/5) + (52/5)] - (302/15)
= [(25/5) + (400/5) + 25/5)] - (900/15)
= [5 + 80 + 5] - (60)
= 90 - 60 = 30
50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
n1=5 n2=5 n3=5 N = 15k=3
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 30 dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total SStot dftot
50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
n1=5 n2=5 n3=5 N = 15k=3
N
X
n
XSS
2tot
2
bn
)(
columnin
)columnin(
= [(52/5) + (202/5) + (52/5)] - (302/15)
= [(25/5) + (400/5) + 25/5)] - (900/15)
= [5 + 80 + 5] - (60)
= 90 - 60 = 30
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 30 dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total SStot dftot
= (106) - (302/15)
= 106 - 60
= 46
N
XXSS
2tot2
tottot
)(50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
n1=5 n2=5 n3=5 N = 15k=3
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 30 dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total 46 dftot
= (106) - (302/15)
= 106 - 60
= 46
N
XXSS
2tot2
tottot
)(50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
n1=5 n2=5 n3=5 N = 15k=3
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 30 dfbn MSbn Fobt
Within SSwn dfwn MSwn
Total 46 dftot
= 46 - 30
= 16
bntotwn SSSSSS 50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
n1=5 n2=5 n3=5 N = 15k=3
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 30 dfbn MSbn Fobt
Within 16 dfwn MSwn
Total 46 dftot
= 46 - 30
= 16
bntotwn SSSSSS 50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
n1=5 n2=5 n3=5 N = 15k=3
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 30 dfbn MSbn Fobt
Within 16 dfwn MSwn
Total 46 dftot
= 3 - 1
= 2
dfbn= k - 150° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
n1=5 n2=5 n3=5 N = 15k=3
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 30 2 MSbn Fobt
Within 16 dfwn MSwn
Total 46 dftot
= 3 - 1
= 2
dfbn= k - 150° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
n1=5 n2=5 n3=5 N = 15k=3
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 30 2 MSbn Fobt
Within 16 dfwn MSwn
Total 46 dftot
= 15 - 3
= 12
dfwn= N - k50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
n1=5 n2=5 n3=5 N = 15k=3
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 30 2 MSbn Fobt
Within 16 12 MSwn
Total 46 dftot
= 15 - 3
= 12
50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
n1=5 n2=5 n3=5 N = 15k=3
dftot= N - 1
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 30 2 MSbn Fobt
Within 16 12 MSwn
Total 46 dftot
= 15 - 1
= 14
dftot= N - 150° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
n1=5 n2=5 n3=5 N = 15k=3
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 30 2 MSbn Fobt
Within 16 12 MSwn
Total 46 14
= 15 - 1
= 14
dftot= N - 150° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
n1=5 n2=5 n3=5 N = 15k=3
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 30 2 MSbn Fobt
Within 16 12 MSwn
Total 46 14
= 30 / 2
= 15
bn
bnbn df
SSMS
50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
n1=5 n2=5 n3=5 N = 15k=3
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 30 2 15 Fobt
Within 16 12 MSwn
Total 46 14
bn
bnbn df
SSMS
50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
n1=5 n2=5 n3=5 N = 15k=3
= 30 / 2
= 15
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 30 2 15 Fobt
Within 16 12 MSwn
Total 46 14
= 16 / 12
= 1.33
wn
wnwn df
SSMS
50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
n1=5 n2=5 n3=5 N = 15k=3
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 30 2 15 Fobt
Within 16 12 1.33
Total 46 14
wn
wnwn df
SSMS
50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
n1=5 n2=5 n3=5 N = 15k=3
= 16 / 12
= 1.33
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 30 2 15 Fobt
Within 16 12 1.33
Total 46 14
= 15 / 1.33
= 11.28
wn
bnobt MS
MSF
50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
n1=5 n2=5 n3=5 N = 15k=3
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 30 2 15 11.28
Within 16 12 1.33
Total 46 14
= 15 / 1.33
= 11.28
wn
bnobt MS
MSF
50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
n1=5 n2=5 n3=5 N = 15k=3
3. Calculate the obtained value (Fobt)
Source Sum of Squares
df Mean Squares
F
Between 30 2 15 11.28
Within 16 12 1.33
Total 46 14
50° 70° 90°
0 4 1
1 3 2
3 6 2
1 3 0
0 4 0
1 4 1 Mean=2
∑X=5 ∑X=20 ∑X=5 ∑Xtot=30
∑X2=11 ∑X2=86 ∑X2=9 ∑X2tot=106
n1=5 n2=5 n3=5 N = 15k=3
4. Calculate the critical value
• Assume =0.05• Always a two-tail test with ANOVA
• dfbetween = k - 1 = 3 - 1 = 2• dfwithin = N - k = 15 - 3 = 12
• Fcrit for 2 and 15 degrees of freedom and = 0.05 is 3.88
Fcrit and Fobt
Fcrit= 3.88
Fobt= 11.28
5. Make our Conclusion
• Fcrit = 3.88• Fobt = 11.28
• Fobt is inside the rejection region, we reject H0 and accept HA
• We conclude that there is a significant difference between some of our groups– which groups?
6. Conduct post-hoc tests
HSD = (qk) [√(MSwn/n)]
qk: Look up Table L - Need:
– k (number of means being compared)
– dfwn
= (3.77) [√(1.33/5)]
= (3.77) [√(0.266)]
= (3.77) (0.52)
= 1.96
n
MSqHSD k
wn)(
6. Conduct post-hoc tests
• HSD = 1.96
• Difference between means:
• 50° group - 70° group = -3
• 50° group - 90° group = 0
• 70° group - 90° group = 3
• Therefore, there is a significant increase in learning when the temperature is 70° as compared to either 50° or 90°