Stats 845 Lecture 14n
Stats 845 Lecture 14n
Stats 845 Lecture 14n
df
Sum of Squares
Treatments
t-1
SSTr
Error
t(n 1)
SSError
Total
tn - 1
SSTotal
yij i ij(CR )
df
Sum of Squares
Blocks
n-1
SSBlocks
Treatments
t-1
SSTr
Error
(t 1) (n 1)
SSError
Total
tn - 1
SSTotal
yij i j ij( RB )
Comments
( CR )
107
(1)
96
(2)
112
(3)
83
(4)
87
(5)
90
(6)
Block
6
128
(1)
89
(2)
104
(3)
85
(4)
84
(5)
89
(6)
102
(1)
72
(2)
100
(3)
82
(4)
70
(5)
94
(6)
56
(1)
70
(2)
72
(3)
64
(4)
62
(5)
63
(6)
102
(1)
76
(2)
102
(3)
85
(4)
95
(5)
86
(6)
97
(1)
91
(2)
92
(3)
80
(4)
72
(5)
82
(6)
93
(1)
70
(2)
93
(3)
63
(4)
71
(5)
63
(6)
80
(1)
63
(2)
87
(3)
82
(4)
81
(5)
63
(6)
111
(1)
79
(2)
101
(3)
72
(4)
75
(5)
81
(6)
10
103
(1)
102
(2)
112
(3)
83
(4)
93
(5)
81
(6)
S.S
5992.4167
4572.8833
3147.2833
d.f.
9
5
45
M.S.
F
665.82407
9.52
914.57667 13.076659
69.93963
p-value
0.00000
0.00000
Example 1:
Suppose we are interested in how weight gain
(Y) in rats is affected by Source of protein
(Beef, Cereal, and Pork) and by Level of
Protein (High or Low).
There are a total of t = 32 = 6 treatment
combinations of the two factors (Beef -High
Protein, Cereal-High Protein, Pork-High
Protein, Beef -Low Protein, Cereal-Low
Protein, and Pork-Low Protein) .
107
(1)
96
(2)
112
(3)
83
(4)
87
(5)
90
(6)
Block
6
128
(1)
89
(2)
104
(3)
85
(4)
84
(5)
89
(6)
102
(1)
72
(2)
100
(3)
82
(4)
70
(5)
94
(6)
56
(1)
70
(2)
72
(3)
64
(4)
62
(5)
63
(6)
102
(1)
76
(2)
102
(3)
85
(4)
95
(5)
86
(6)
97
(1)
91
(2)
92
(3)
80
(4)
72
(5)
82
(6)
93
(1)
70
(2)
93
(3)
63
(4)
71
(5)
63
(6)
80
(1)
63
(2)
87
(3)
82
(4)
81
(5)
63
(6)
111
(1)
79
(2)
101
(3)
72
(4)
75
(5)
81
(6)
10
103
(1)
102
(2)
112
(3)
83
(4)
93
(5)
81
(6)
Example 2:
The following experiment is interested in
comparing the effect four different chemicals
(A, B, C and D) in producing water resistance
(y) in textiles.
A strip of material, randomly selected from
each bolt, is cut into four pieces (samples) the
pieces are randomly assigned to receive one of
the four chemical treatments.
Diagram: Blocks(BoltSamples)
9.9
10.1
11.4
12.1
C
A
B
D
13.4
12.9
12.2
12.3
D
B
A
C
12.7
12.9
11.4
11.9
B
D
C
A
Table
Chemical
A
B
C
D
yij i j ij
i = 1,2,, t
j = 1,2,, b
Source
Treat
S.S.
SST
d.f.
t-1
M.S.
MST
F
p-value
MST /MSE
Block
SSB
n-1
MSB
MSB /MSE
Error
SSE
(t-1)(b-1)
MSE
Source
Block
Diet
ERROR
S.S
5992.4167
4572.8833
3147.2833
d.f.
9
5
45
M.S.
F
665.82407
9.52
914.57667 13.076659
69.93963
p-value
0.00000
0.00000
SOURCE
Blocks
Chem
ERROR
SUM OF SQUARES
7.17167
5.20000
0.53500
D.F.
2
3
6
MEAN SQUARE
3.5858
1.7333
0.0892
F
40.21
19.44
TAIL PROB.
0.0003
0.0017
Source
Block
Diet
ERROR
Source
Block
Source
Level
SL
ERROR
S.S
5992.4167
4572.8833
3147.2833
S.S
5992.4167
882.23333
2680.0167
1010.6333
3147.2833
d.f.
9
5
45
d.f.
9
2
1
2
45
M.S.
F
665.82407
9.52
914.57667 13.076659
69.93963
M.S.
665.82407
441.11667
2680.0167
505.31667
69.93963
F
9.52
6.31
38.32
7.23
p-value
0.00000
0.00000
p-value
0.00000
0.00380
0.00000
0.00190
Select Model.
df
14
1
5
9
45
60
59
Mean
Square
754.574
437418.8
918.937
663.261
69.648
F
10.834
6280.442
13.194
9.523
Sig.
.000
.000
.000
.000
df
14
1
9
2
1
2
45
60
59
Mean
Square
754.574
437418.8
663.261
452.017
2680.017
505.317
69.648
F
10.834
6280.442
9.523
6.490
38.480
7.255
Sig.
.000
.000
.000
.003
.000
.002
Example
In the following study the experimenter was
interested in how the level of a certain enzyme
changed in cardiac patients after open heart
surgery.
The enzyme was measured
immediately after surgery (Day 0),
one day (Day 1),
two days (Day 2) and
one week (Day 7) after surgery
for n = 15 cardiac surgical patients.
Subject Day0 Day1 Day2 Day7 Subject Day0 Day1 Day2 Day7
1
108
63
45
42
9
106
65
49
49
2
112
75
56
52
10
110
70
46
47
3
114
75
51
46
11
120
85
60
62
4
129
87
69
69
12
118
78
51
56
5
115
71
52
54
13
110
65
46
47
6
122
80
68
68
14
132
92
73
63
7
105
71
52
54
15
127
90
73
68
8
117
77
54
61
Day 0,
Day 1,
Day 2,
Day 7
SS
4221.100
36282.267
390.233
df
MS
14
301.507
3 12094.089
42
9.291
F
32.45
1301.66
p-value
0.0000
0.0000
The repeated
measures are
in columns
Source
TIME
Error(TIME)
Type III
Sum of
Squares
Sphericity As sumed 36282.267
Greenhouse-Geis ser 36282.267
Huynh-Feldt
36282.267
Lower-bound
36282.267
Sphericity As sumed
390.233
Greenhouse-Geis ser
390.233
Huynh-Feldt
390.233
Lower-bound
390.233
df
3
2.588
3.000
1.000
42
36.225
42.000
14.000
Mean
Square
12094.089
14021.994
12094.089
36282.267
9.291
10.772
9.291
27.874
F
1301.662
1301.662
1301.662
1301.662
Sig.
.000
.000
.000
.000
Example :
(Repeated Measures Design - Grouping Factor)
0
122
112
129
115
126
118
115
112
Control
Day
1
2
87
68
75
55
80
66
71
54
89
70
81
62
73
56
67
53
7
58
48
64
52
71
60
49
44
0
93
78
109
104
108
116
108
110
Group
DrugA
Day
1
2
56
36
51
33
73
58
75
57
71
57
76
58
64
54
80
63
7
37
34
49
60
65
58
47
62
0
86
100
122
101
112
106
90
110
DrugB
Day
1
2
46
30
67
50
97
80
58
45
78
67
74
54
59
43
76
64
7
31
50
72
43
66
54
38
58
Day 0,
Day 1,
Day 2,
Day 7
Error
Time
Time x Drug
2
Error
SS
1745.396
df
2
MS
872.698
10287.844
47067.031
357.688
21
3
6
489.897
15689.010
59.615
668.031
63
10.604
F
1.78
p-value
0.1929
1479.58
5.62
0.0000
0.0001
Tables of means
Drug
Control
A
B
Overall
Day 0
118.63
103.25
103.38
108.42
Day 1
77.88
68.25
69.38
71.83
Day 2
60.50
52.00
54.13
55.54
Day 7
55.75
51.50
51.50
52.92
Overall
78.19
68.75
69.59
72.18
120
Control
Enz yme Le ve l
Drug A
Drug B
80
60
40
0
Day
Example :
Repeated Measures Design - Two Grouping Factors
In the following example , the researcher was
interested in how the levels of Anxiety (high and
low) and Tension (none and high) affected error
rates in performing a specified task.
In addition the researcher was interested in how the
error rates also changed over time.
Four groups of three subjects diagnosed in the four
Anxiety-Tension categories were asked to perform
the task at four different times patients in the study.
Low
1
18
14
12
6
None
subject
2
19
12
8
4
3
14
10
6
2
1
16
12
10
4
High
subject
2
12
8
6
2
Tension
3
18
10
5
1
1
16
10
8
4
High
None
subject
2
18
8
4
1
3
16
12
6
2
1
19
16
10
8
High
subject
2
16
14
10
9
3
16
12
8
8
Error
B
BA
BT
BAT
Error
SS
10.08333
8.33333
80.08333
df
1
1
1
MS
10.08333
8.33333
80.08333
F
0.98
0.81
7.77
p-value
0.3517
0.3949
0.0237
82.85
991.5
8.41667
12.16667
12.75
8
3
3
3
3
10.3125
330.5
2.80556
4.05556
4.25
152.05
1.29
1.87
1.96
0
0.3003
0.1624
0.1477
52.16667
24
2.17361
AB C D
BCDA
C DAB
DCBA
5x5
6x6
AB C D E
AB C D EF
B AE C D
B F D CAE
C DAE B
CDEFBA
D E B AC
DAF E C B
ECDBA
E C AB F D
F E BAD C
ABCD
B D AC
C AD B
DCBA
AB C D
B AD C
C DAB
A Latin Square
Definition
A Latin square is a square array of objects (letters A,
B, C, ) such that each object appears once and only
once in each row and each column. Example - 4 x 4
Latin Square.
AB C D
BCDA
C D AB
D AB C
Example
1
2
Drivers
3
4
5
1
5.83
D
4.80
P
7.43
F
6.60
R
11.24
C
2
6.22
P
7.56
D
11.29
C
9.54
F
6.34
R
Week
3
7.67
F
10.34
C
7.01
R
11.11
D
11.30
P
4
9.43
C
5.82
R
10.48
D
10.84
P
12.58
F
5
6.57
R
9.86
F
9.27
P
15.05
C
16.04
D
yij k k i j ij k
i = 1,2,, t j = 1,2,, t
k = 1,2,, t
yij(k) = the observation in ith row and the jth
column receiving the kth treatment
= overall mean
k = the effect of the ith treatment
No interaction
th
i = the effect of the i row
between rows,
columns and
j = the effect of the jth column
treatments
ij(k) = random error
S.S.
SSTr
d.f.
t-1
M.S.
MSTr
p-value
F
MSTr /MSE
Rows
SSRow
t-1
Cols
SSCol
t-1
MSCol
Error
SSE
(t-1)(t-2)
MSE
Total
SST
t2 - 1
MSCol /MSE
S.S.
d.f.
M.S.
p-value
Week
51.17887
12.79472
16.06
0.0001
Driver
69.44663
17.36166
21.79
0.0000
Car
70.90402
17.72601
22.24
0.0000
Error
9.56315
12
0.79693
Total
201.09267
24
Example
In this Experiment the we are again interested in how
weight gain (Y) in rats is affected by Source of protein
(Beef, Cereal, and Pork) and by Level of Protein (High
or Low).
Initial
Weight
Category
1
62.1
A
86.2
B
63.9
C
68.9
D
73.8
E
101.8
F
AppetiteCategory
2
3
4
84.3
61.5
66.3
B
C
D
91.9
69.2
64.5
F
D
C
71.1
69.6
90.4
D
E
F
77.2
97.3
72.1
A
F
E
73.3
78.6
101.9
C
A
B
83.8
110.6
87.9
E
B
A
5
73.0
E
80.8
A
100.7
B
81.7
C
111.5
F
93.5
D
6
104.7
F
83.9
E
93.2
A
114.7
B
95.3
D
103.8
C
S.S.
d.f.
M.S.
p-value
Inwt
1767.0836
353.41673
111.1
0.0000
App
2195.4331
439.08662
138.03
0.0000
Diet
4183.9132
836.78263
263.06
0.0000
Error
63.61999
20
3.181
8210.0499
35
Total
Diet SS partioned into main effects for Source and Level of Protein
Source
S.S.
d.f.
M.S.
p-value
Inwt
1767.0836
353.41673
111.1
0.0000
App
2195.4331
439.08662
138.03
0.0000
Source
631.22173
315.61087
99.22
0.0000
Level
2611.2097
2611.2097
820.88
0.0000
SL
941.48172
470.74086
147.99
0.0000
Error
63.61999
20
3.181
8210.0499
35
Total
Definition
A Greaco-Latin square consists of two latin squares (one
using the letters A, B, C, the other using greek letters , ,
, ) such that when the two latin square are supper imposed
on each other the letters of one square appear once and only
once with the letters of the other square. The two Latin squares
are called mutually orthogonal.
Example: a 7 x 7 Greaco-Latin Square
A
B
C
D
E
F
G
B C
D
E
F
G
A
C
D
E
F
G
A
B
D
E
F
G
A
B
C
E
F
G
A
B
C
D
F
G
A
B
C
D
E
G
A
B
C
D
E
F
Note:
At most (t 1) t x t Latin squares L1, L2, , Lt-1 such
that any pair are mutually orthogonal.
Cows
3
4
5
6
7
304
(A
381
B
432
(C
442
(D
496
(E
534
(F
543
(G
436
(B
505
(C
566
(D
372
(E
449
(F
421
(G
386
(A
350
(C
425
(D
479
(E
536
(F
493
(G
452
(A
435
(B
Period
4
504
(D
564
(E
357
(F
366
(G
345
(A
427
(B
485
(C
417
(E
494
(F
461
(G
495
(A
509
(B
346
(C
406
(D
519
(F
350
(G
340
(A
425
(B
481
(C
478
(D
554
(E
432
(G
413
(A
502
(B
507
(C
380
(D
397
(E
410
(F
yij kl k l i j ij kl
i = 1,2,, t
j = 1,2,, t
k = 1,2,, t
l = 1,2,, t
= overall mean
k = the effect of the kth Latin treatment
l = the effect of the lth Greek treatment
i = the effect of the ith row
j = the effect of the jth column
ij(k) = random error
No interaction between rows, columns,
Latin treatments and Greek treatments
Source
Latin
S.S.
SSLa
d.f.
t-1
M.S.
MSLa
p-value
F
MSLa /MSE
Greek
SSGr
t-1
MSGr
MSGr /MSE
Rows
SSRow
t-1
Cols
SSCol
t-1
MSCol
Error
SSE
(t-1)(t-3)
MSE
Total
SST
t2 - 1
MSCol /MSE
Source
Protein
Lysine
Cow
Period
Error
Total
S.S.
160242.82
30718.24
2124.24
5831.96
15544.41
214461.67
d.f.
6
6
6
6
24
48
M.S.
26707.1361
5119.70748
354.04082
971.9932
647.68367
F
41.23
7.9
0.55
1.5
p-value
0.0000
0.0001
0.7676
0.2204