Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Pairwise tests
P( all correct)
0.95
0.05
0.953 = 0.875
0.125
{n(n-1)}/2
0.95n
1 - 0.95n
10
45
0.9545 = 0.10
0.90
In general, Analysis of Variance, ANOVA, compares the variation between groups and
the variation within samples by analysing their variances.
One-way ANOVA: Is there any difference between the average sales at various
departmental stores within a company?
Two-way ANOVA: Is there any difference between the average sales at various stores
within a company and/or the types of department? The overall variation is split 'two ways'.
One-way ANOVA
Total variation
(SST)
Two-way ANOVA
Total variation
(SST)
where SST = Total Sum of Squares; SSG = Treatment Sum of Squares between the
groups; SSBl = Blocks Sum of Squares; SSE = Sum of Squares of Errors.
(At this stage just think of 'sums of squares' as being a measure of variation.)
The method of measuring this variation is variance, which is standard deviation squared.
Total variance = between groups variance + variance due to the errors
It follows that: Total sum of =
squares (SST)
If we find any two of the three sums of squares then the other can be found by difference.
In practice we calculate SST and SSG and then find SSE by difference.
Since the method is much easier to understand with a numerical example, it will be
explained in stages using theory and a numerical example simultaneously.
Example 1
One important factor in selecting software for word processing and database management
systems is the time required to learn how to use a particular system. In order to evaluate
three database management systems, a firm devised a test to see how many training hours
were needed for five of its word processing operators to become proficient in each of three
systems.
System A
16
19
14
13
18 hours
System B
16
17
13
12
17
hours
System C
24
22
19
18
22
hours
Using a 5% significance level, is there any difference between the training time needed for
the three systems?
In this case the 'groups' are the three database management systems. These account for
some, but not all, of the total variance. Some, however, is not explained by the difference
between them. The residual variance is referred to as that due to the errors.
Total variance = between systems variance + variance due to the errors.
It follows that:
Total sum
of squares
(SST)
Sum of squares +
between systems
(SSSys)
Sum of squares
of errors
(SSE)
or s n 1
x x
n
x x
n 1
]
Both methods estimate exactly the same value for the total sum of squares.
1
TotalSS Input all the data individually and output the values for n , x and n from
the calculator in SD mode. Use these values to calculate 2n and n2n .
n
n
n2
n n2 .
x
15
SSSys Calculate
17.33
3.419
11.69
175.3 = SS Total
System A
System B
System C
5
5
5
16
15
21
SS for Systems
15
17.33
2.625
n2
n n2 .
6.889
103.3 = SSSys
S.S
d.f.
M.S.S.
Between groups
SSG
k-1
SSG
MSG
k 1
MSG
F
MSE
Errors
SSE
(N-1) - (k-1)
SSE
MSE
Nk
Total
SST
N-1
Method
Fill in the total sum of squares, SST, and the between groups sum of squares, SSG,
after calculation; find the sum of squares due to the errors, SSE, by difference;
the degrees of freedom, d.f., for the total and the groups are one less than the total
number of values and the number of groups respectively; find the error degree of
freedom by difference;
the mean sums of squares, M.S.S., is found in each case by dividing the sum of
squares, SS, by the corresponding degrees of freedom.
The test statistic, F, is the ratio of the mean sum of squares due to the differences
between the group means and that due to the errors.
S.S.
d.f.
M.S.S.
103.3
3-1=2
103.3/2 = 51.65
51.65/6.00 = 8.61
Errors
72.0
14 - 2 = 12
72.0/12 = 6.00
Total
175.3
15 - 1 = 14
Between
systems
Critical value: F0.05 (2,12) = 3.89 (Deg. of free. from 'between systems' and 'errors'.)
Test statistic: 8.61
Conclusion: T.S. > C.V. so reject H0. There is a difference between the mean learning
times for at least two of the three database management systems.
1
1
CD t MSE
n1 n 2
t has the error degrees of freedom and one tail. MSE from the ANOVA table.
5
Example1 (cont.)
1
1
CD t MSE
n1 n 2
1 1
1.78 6.00
5 5
2.76
Operators
3
16
16
24
19
17
22
14
13
19
13
12
18
18
17
22
Again we ask the same question: using a 5% level, is there any difference between the
training time for the three systems? We can use the Operator variation just to explain some
of the unexplained error thereby reducing it, 'blocked' design, or we can consider it in a
similar manner to the System variation in the last example in order to see if there is a
difference between the Operators.
In the first case the 'groups' are the three database management systems and the 'blocks'
being used to reduce the error are the different operators who themselves may differ in
speed of learning. In the second we have a second set of groups - the Operators.
Total variance = between systems variance + between operators variance
+ variance of errors.
So
Sum of squares
of errors
(SSE)
In 2-way ANOVA we find SST, SSSys, SSOps and then find SSE by difference.
SSE = SST - SSSys - SSOps
We already have SST and SSSys from 1-way ANOVA but still need to find SSOps.
Operators
6
1
16
16
24
18.67
System A
System B
System C
Means
2
19
17
22
19.33
3
14
13
19
15.33
4
13
12
18
14.33
5
18
17
22
19.00
Means
16.00
15.00
21.00
17.33
n = 2.078
x = 17.33,
and
n n2 = 64.7 = SSOps
S.S.
d.f.
M.S.S.
103.3
3-1=2
103.3/2 = 51.65
51.65/0.91 = 56.76
64.7
5-1=4
64.7/4 = 16.18
16.18/0.91 = 17.78
7.3
14 - 6 = 8
7.3/8 = 0.91
Errors
Total
175.3
15 - 1 = 14
Table 4
= 5%
1
2
3
4
5
161.40
18.51
10.13
7.71
6.61
199.50
19.00
9.55
6.94
5.79
215.70
19.16
9.28
6.56
5.41
224.60
19.25
9.12
6.39
5.19
230.20
19.30
9.01
6.26
5.05
234.00
19.33
8.94
6.16
4.95
236.80
19.35
8.89
6.09
4.88
238.90
19.37
8.85
6.04
4.82
240.50
19.38
8081
6.00
4.77
6
7
8
9
10
5.99
5.59
5.32
5.12
4.96
5.14
4.74
4.46
4.26
4.10
4.76
4.35
4.07
3.86
3.71
4.53
4.12
3.84
3.63
3.48
4.39
3.97
3.69
3.48
3.33
4.28
3.87
3.58
3.37
3.22
4.21
3.79
3.50
3.29
3.14
4.15
3.73
3.44
3.23
3.07
4.10
3.68
3.39
3.18
3.02
11
12
13
14
15
4.84
4.75
4.67
4.60
4.54
3.98
3.89
3.81
3.74
3.68
3.59
3.49
3.41
3.34
3.29
3.36
3.26
3.18
3.11
3.06
3.20
3.11
3.03
2.96
2.90
3.09
3.00
2.92
2.85
2.79
3.01
2.91
2.83
2.76
2.71
2.95
2.85
2.77
2.70
2.64
2.90
2.80
2.71
2.65
2.59
16
17
18
19
20
4.49
4.45
4.41
4.38
4.35
3.63
3.59
3.55
3.52
3.49
3.24
3.20
3.16
3.13
3.10
3.01
2.96
2.93
2.90
2.87
2.85
2.81
2.77
2.74
2.71
2.74
2.70
2.66
2.63
2.60
2.66
2.61
2.58
2.54
2.51
2.59
2.55
2.51
2.48
2.45
2.54
2.49
2.46
2.42
2.39
21
22
23
24
25
4.32
4.30
4.28
4.26
4.24
3.47
3.44
3.42
3.40
3.39
3.07
3.05
3.03
3.01
2.99
2.84
2.82
2.80
2.78
2.76
2.68
2.66
2.64
2.62
2.60
2.57
2.55
2.53
2.51
2.49
2.49
2.46
2.44
2.42
2.40
2.42
2.40
2.37
2.36
2.34
2.37
2.34
2.32
2.30
2.28
26
27
28
29
30
4.23
4.21
4.20
4.18
4.17
3.37
3.35
3.34
3.33
3.32
2.98
2.96
2.95
2.93
2.92
2.74
2.73
2.71
2.70
2.69
2.59
2.57
2.56
2.55
2.53
2.47
2.46
2.45
2.43
2.42
2.39
2.37
2.36
2.35
2.33
2.32
2.31
2.29
2.28
2.27
2.27
2.25
2.24
2.22
2.21
40
60
120
4.08
4.00
3.92
3.84
3.23
3.15
3.07
3.00
2.84
2.76
2.68
2.60
2.61
2.53
2.45
2.37
2.45
2.37
2.29
2.21
2.34
2.25
2.17
2.10
2.25
2.17
2.09
2.01
2.18
2.10
2.02
1.94
2.12
2.04
1.96
1.88