Final - Analysis of Variance
Final - Analysis of Variance
Final - Analysis of Variance
Problem 1
Using the following data, perform a oneway analysis of variance using α=.05α=.05. Write up the
results in APA format.
⎡⎣⎢⎢⎢⎢⎢⎢⎢⎢Group15145334567⎤⎦⎥⎥⎥⎥⎥⎥⎥⎥⎡⎣⎢⎢⎢⎢⎢⎢⎢⎢Group22343234345⎤⎦⎥⎥
⎥⎥⎥⎥⎥⎥⎡⎣⎢⎢⎢⎢⎢⎢⎢⎢Group35676748756⎤⎦⎥⎥⎥⎥⎥⎥⎥⎥[Group15145334567]
[Group22343234345][Group35676748756]
Solution
Sample means (x¯x¯) for the groups: = 48.2, 35.4, 69.8
Intermediate steps in calculating the group variances:
[[1]]
value mean deviations sq deviations
1 51 48.2 2.8 7.84
2 45 48.2 -3.2 10.24
3 33 48.2 -15.2 231.04
4 45 48.2 -3.2 10.24
5 67 48.2 18.8 353.44
[[2]]
value mean deviations sq deviations
1 23 35.4 -12.4 153.76
2 43 35.4 7.6 57.76
3 23 35.4 -12.4 153.76
4 43 35.4 7.6 57.76
5 45 35.4 9.6 92.16
[[3]]
value mean deviations sq deviations
1 56 69.8 -13.8 190.44
2 76 69.8 6.2 38.44
3 74 69.8 4.2 17.64
4 87 69.8 17.2 295.84
5 56 69.8 -13.8 190.44
Sum of squared deviations from the mean (SS) for the groups:
Var1=612.85−1=153.2Var1=612.85−1=153.2
Var2=515.25−1=128.8Var2=515.25−1=128.8
Var3=732.85−1=183.2Var3=732.85−1=183.2
MSerror=153.2+128.8+183.23=155.07MSerror=153.2+128.8+183.23=155.07 Note: this is just the
average within-group variance; it is not sensitive to group mean differences!
Calculating the remaining error (or within) terms for the ANOVA table:
dferror=15−3=12dferror=15−3=12
SSerror=(155.07)(15−3)=1860.8SSerror=(155.07)(15−3)=1860.8
Intermediate steps in calculating the variance of the sample means:
Sum of squares (SSmeans)=604.58(SSmeans)=604.58
Varmeans=604.583−1=302.29Varmeans=604.583−1=302.29
MSbetween=(302.29)(5)=1511.45MSbetween=(302.29)(5)=1511.45 Note: This method of
estimating the variance IS sensitive to group mean differences!
Calculating the remaining between (or group) terms of the ANOVA table:
dfgroups=3−1=2dfgroups=3−1=2
SSgroup=(1511.45)(3−1)=3022.9SSgroup=(1511.45)(3−1)=3022.9
Test statistic and critical value
F=1511.45155.07=9.75F=1511.45155.07=9.75
Fcritical(2,12)=3.89Fcritical(2,12)=3.89
Decision: reject H0 Decision: reject H0
ANOVA table
source SS df MS
group 3022.9 2 1511.45
error 1860.8 12 155.07
total 4883.7
Effect size
η2=3022.94883.7=0.62η2=3022.94883.7=0.62
APA writeup
F(2, 12)=9.75, p <0.05, η2η2=0.62.
Problem 2
Using the following summary data, perform a oneway analysis of variance using α=.01α=.01.
⎡⎣⎢⎢⎢n303030mean50.2645.3253.67sd10.4512.7611.47⎤⎦⎥⎥⎥[nmeansd3050.2610.45
3045.3212.763053.6711.47]
Solution
Var1=10.452=109.2Var1=10.452=109.2
Var2=12.762=162.82Var2=12.762=162.82
Var3=11.472=131.56Var3=11.472=131.56
MSerror=109.2+162.82+131.563=134.53MSerror=109.2+162.82+131.563=134.53 Note: this is just
the average within-group variance; it is not sensitive to group mean differences!
Calculating the remaining error (or within) terms for the ANOVA table:
dferror=90−3=87dferror=90−3=87
SSerror=(134.53)(90−3)=11703.82SSerror=(134.53)(90−3)=11703.82
Intermediate steps in calculating the variance of the sample means:
Sum of squares (SSmeans)=35.25(SSmeans)=35.25
Varmeans=35.253−1=17.62Varmeans=35.253−1=17.62
MSbetween=(17.62)(30)=528.75MSbetween=(17.62)(30)=528.75 Note: This method of
estimating the variance IS sensitive to group mean differences!
Calculating the remaining between (or group) terms of the ANOVA table:
dfgroups=3−1=2dfgroups=3−1=2
SSgroup=(528.75)(3−1)=1057.5SSgroup=(528.75)(3−1)=1057.5
Test statistic and critical value
F=528.75134.53=3.93F=528.75134.53=3.93
Fcritical(2,87)=4.86Fcritical(2,87)=4.86
Decision: fail to reject H0 Decision: fail to reject H0
ANOVA table
source SS df MS
group 1057.5 2 528.75
error 11703.82 87 134.53
total 12761.32
Effect size
η2=1057.512761.32=0.08η2=1057.512761.32=0.08
APA writeup
F(2, 87)=3.93, p >=0.01, η2η2=0.08.
Problem 3
A clinical psychologist has run a between-subjects experiment comparing two treatments for
depression (cognitive-behavioral therapy (CBT) and client-centered therapy (CCT) against a
control condition. Subjects were randomly assigned to the experimental condition. After 12
weeks, the subject’s depression scores were measured using the CESD depression scale. The data
are summarized as follows:
⎡⎣⎢⎢⎢controlCBTCCTn404040mean21.416.919.1sd4.55.55.8⎤⎦⎥⎥⎥[nmeansdcontrol
4021.44.5CBT4016.95.5CCT4019.15.8]
Solution
Var1=4.52=20.25Var1=4.52=20.25
Var2=5.52=30.25Var2=5.52=30.25
Var3=5.82=33.64Var3=5.82=33.64
MSerror=20.25+30.25+33.643=28.05MSerror=20.25+30.25+33.643=28.05 Note: this is just the
average within-group variance; it is not sensitive to group mean differences!
Calculating the remaining error (or within) terms for the ANOVA table:
dferror=120−3=117dferror=120−3=117
SSerror=(28.05)(120−3)=3281.46SSerror=(28.05)(120−3)=3281.46
Intermediate steps in calculating the variance of the sample means:
Sum of squares (SSmeans)=10.12(SSmeans)=10.12
Varmeans=10.123−1=5.06Varmeans=10.123−1=5.06
MSbetween=(5.06)(40)=202.4MSbetween=(5.06)(40)=202.4 Note: This method of estimating
the variance IS sensitive to group mean differences!
Calculating the remaining between (or group) terms of the ANOVA table:
dfgroups=3−1=2dfgroups=3−1=2
SSgroup=(202.4)(3−1)=404.8SSgroup=(202.4)(3−1)=404.8
Test statistic and critical value
F=202.428.05=7.22F=202.428.05=7.22
Fcritical(2,117)=4.79Fcritical(2,117)=4.79
Decision: reject H0 Decision: reject H0
ANOVA table
source SS df M
group 404.8 2 202.4
error 3281.46 117 28.05
total 3686.26
Effect size
η2=404.83686.26=0.11η2=404.83686.26=0.11
APA writeup
F(2, 117)=7.22, p <0.01, η2η2=0.11.
Problem 4
An education researcher is comparing four different algebra curricula. Eighth grade students are
randomly assigned to one one of the four groups. Their state achievement test scores are compared
at the end of the year. Use the appropriate statistical procedure to determine whether the curricula
differ with respect to math achievement. An alpha criterion of .05 should be used for the test.
⎡⎣⎢⎢⎢⎢⎢⎢curriculum 1curriculum 2curriculum 3curriculum 4n50505050mean170.
5168.3167.6172.8sd14.512.817.716.8⎤⎦⎥⎥⎥⎥⎥⎥[nmeansdcurriculum
150170.514.5curriculum 250168.312.8curriculum 350167.617.7curriculum 450172.816.8]
Solution
Var1=14.52=210.25Var1=14.52=210.25
Var2=12.82=163.84Var2=12.82=163.84
Var3=17.72=313.29Var3=17.72=313.29
Var3=16.82=282.24Var3=16.82=282.24
MSerror=210.25+163.84+313.294=242.41MSerror=210.25+163.84+313.294=242.41 Note: this is
just the average within-group variance; it is not sensitive to group mean differences!
Calculating the remaining error (or within) terms for the ANOVA table:
dferror=200−4=196dferror=200−4=196
SSerror=(242.41)(200−4)=47511.38SSerror=(242.41)(200−4)=47511.38
Intermediate steps in calculating the variance of the sample means:
Sum of squares (SSmeans)=16.58(SSmeans)=16.58
Varmeans=16.584−1=5.53Varmeans=16.584−1=5.53
MSbetween=(5.53)(50)=276.33MSbetween=(5.53)(50)=276.33 Note: This method of
estimating the variance IS sensitive to group mean differences!
Calculating the remaining between (or group) terms of the ANOVA table:
dfgroups=4−1=3dfgroups=4−1=3
SSgroup=(276.33)(4−1)=829SSgroup=(276.33)(4−1)=829
Test statistic and critical value
F=276.33242.41=1.14F=276.33242.41=1.14
Fcritical(3,196)=2.65Fcritical(3,196)=2.65
Decision: fail to reject H0 Decision: fail to reject H0
ANOVA table
source SS df M
group 829 3 276.33
error 47511.38 196 242.41
total 48340.38
Effect size
η2=82948340.38=0.02η2=82948340.38=0.02
APA writeup
F(3, 196)=1.14, p >=0.05, η2η2=0.02.
PROBLEM 5
Solution:
A B C D
8 12 18 13
10 11 12 9
12 9 16 12
8 14 6 16
7 4 8 15
A2 B2 C2 D2
64 144 324 169
100 121 144 81
144 81 256 144
64 196 36 256
49 16 64 225
Data table
Grou A B C D Total
p
N n1=5 n2=5 n3=5 n4=5 n=20
T1= T2= T3= T4=
∑xi ∑x1 ∑x2 ∑x3 ∑x4 ∑x=22
0
=45 =50 =60 =65
Overall ˉx=22020=11
∑x=T1+T2+T3+T4=45+50+60+65=220→(1)
(∑x)2n=220220=2420→(2)
∑x2=∑x21+∑x22+∑x23+∑x24=421+558+824+875=2678→(4)
ANOVA:
Step-1 : sum of squares between samples
SSB= ( )
∑T2ini -(∑x)2n=(3)-(2)
=2470-2420
=50
Or
(
SSB=∑nj⋅ ˉxj-ˉx )
2
=5×(9-11)2+5×(10-11)2+5×(12-11)2+5×(13-11)2
=50
Step-2 : sum of squares within samples
SSW=∑x2- ( )
∑T2ini =(4)-(3)
=2678-2470
=208
=50+208
=258
=503
=16.6667
=20820-4
=20816
=13
=16.666713
=1.2821
ANOVA table
Sums Degrees Mea
Source p-
of of n
of va
Squar freedo Squa F
Variatio lu
es m res
n e
SS DF MS
Betwee SSB = k-1 = 3 MSB 1. 0.
2
=
n 8 31
50 16.66
samples 2 44
67
1
MS
Within SSW
n-k = 16 W =
samples = 208
13
SST =
Total n-1 = 19
258
F(3,16) at 0.05 level of significance
=3.2389
As calculated F=1.2821<3.2389
PROBLEM 6
Solve using One-way ANOVA method
Observation A B C
1 8 7 6
2 10 7 8
3 6 8 10
4 7 9 6
5 9 8 4
6 0 5 5
7 0 0 7
Solution:
A B C
8 7 6
10 7 8
6 8 10
7 9 6
9 8 4
0 5 5
0 0 7
A2 B2 C2
64 49 36
100 49 64
36 64 100
49 81 36
81 64 16
0 25 25
0 0 49
Data table
Group A B C Total
N n1=5 n2=6 n3=7 n=18
∑x2i ∑330
x21= ∑x22= ∑x23=
332 326
∑x2=988
Mean ˉx2=7.3 ˉx3=6.5 Overall ˉx=
ˉx1=8
ˉxi 333 714 7.2222
Std S1=1.5 S2=1.3 S3=1.9
Dev Si 811 663 881
Overall ˉx=13018=7.2222
∑x=T1+T2+T3=40+44+46=130→(1)
(∑x)2n=130218=938.8889→(2)
∑T2ini= ( 4025+4426+4627 ) =944.9524→(3)
∑x2=∑x21+∑x22+∑x23=330+332+326=988→(4)
ANOVA:
Step-1 : sum of squares between samples
=944.9524-938.8889
=6.0635
Or
(
SSB=∑nj⋅ ˉxj-ˉx )
2
=5×(8-7.2222)2+6×(7.3333-7.2222)2+7×(6.5714-7.2222)2
=6.0635
SSW=∑x2- ( )
∑T2ini =(4)-(3)
=988-944.9524
=43.0476
=6.0635+43.0476
=49.1111
=6.06352
=3.0317
=43.047618-3
=43.047615
=2.8698
=3.03172.8698
=1.0564
ANOVA table
Sums
Source Degrees Mean p-
of
of of Squar va
Square F
Variatio freedom es lu
s
n DF MS e
SS
MSB 1. 0.3
Between SSB =
k-1 = 2 = 05 72
samples 6.0635
3.0317 64 2
MSW
Within SSW =
n-k = 15 =
samples 43.0476
2.8698
SST =
Total n-1 = 17
49.1111
F(2,15) at 0.05 level of significance
=3.6823
As calculated F=1.0564<3.6823
PROBLEM 7
Three different techniques namely medication, exercises and special diet
are randomly assigned to (individuals diagnosed with high blood
pressure) lower the blood pressure. After four weeks the reduction in each
person’s blood pressure is recorded. Test at 5% level, whether there is
significant difference in mean reduction of blood pressure among the
three techniques.
Solution:
Step 1 : Hypotheses
Null Hypothesis: H0: µ1 = µ2 = µ3
That is, there is no significant difference among the three groups on the
average reduction in blood pressure.
Step 2 : Data
Step 7 : Decision
PROBLEM 8
Three composition instructors recorded the number of spelling errors
which their students made on a research paper. At 1% level of
significance test whether there is significant difference in the average
number of errors in the three classes of students.
Solution:
Step 1 : Hypotheses
Null Hypothesis: H0 : µ1 = µ2 = µ3
Alternative Hypothesis
That is, atleast one pair of groups differ significantly on the mean number
of errors.
Step 2 : Data
Step 3 : Level of significance α = 5%
Individual squares
ANOVA Table
PROBLEM 9
SOLUTION:
PROBLEM 10
SOLUTION: