In: Statistics and Probability
8,9,8,12,7 | 11,8,9,14,15 |
8,11,12,14,10 | 13,15,14,18,19 |
16,22,17,18,19 | 9,12,8,10,13 |
a=3levels b=2 levels n=5
a) Test whether or not the two factors interact.
b) Test whether or not Main effects for Factor A and Factor B are present
c)For each level of Factor A compare the levels of Factor B
d) For each level of Factor B compare the levels of Factor A
Solution
Final answers are given below. Back-up Theory and Details of calculations follow at the end.
Part (a)
The two factors interact. Answer 1
Part (b)
Main effects for Factor A is present. Answer 2
Main effects for Factor B is not present. Answer 3
Part (c) and (d)
Means for each combination is given below:
Factor A |
Factor B |
Comparison |
|
Level 1 |
Level 2 |
||
Level 1 |
8.8 |
11.2 |
Level 2 is better |
Level 2 |
11 |
15.8 |
Level 2 is better |
Level 3 |
18.4 |
10.4 |
Level 1 is better |
Comparison |
Level 3 is best |
Level 2 is best |
Answer
Back-up Theory and Details of calculations
ANOVA 2-WAY CLASSIFICATION EQUAL # OBSNS PER CELL
Suppose we have data of a 2-way classification ANOVA, with r rows, c columns and n observations per cell.
Let xijk represent the kth observation in the ith row-jth column, k = 1,2,…,n; i = 1,2,……,r ; j = 1,2,…..,c.
Then the ANOVA model is: xijk = µ + αi + βj + γij + εijk, where µ = common effect, αi = effect of ith row, βj = effect of jth column, γij = row-column interaction and εijk is the error component which is assumed to be Normally Distributed with mean 0 and variance σ2.
Hypotheses:
Null hypothesis: H01: α1 = α2 = ….. = αr = 0 Vs Alternative: H11: at least one αi is different from other αi’s.
Null hypothesis: H02: β1 = β2 = ….. = βc = 0 Vs Alternative: H12: at least one βi is different from other βi’s.
Null hypothesis: H03: γij = 0 for all i and j Vs Alternative: H13: at least one γij is not zero.
Now, to work out the solution,
Terminology:
Cell total = xij. = sum over k of xijk
Row total = xi..= sum over j of xij.
Column total = x.j. = sum over i of xij.
Grand total = G = sum over i of xi.. = sum over j of x.j.
Correction Factor = C = G2/N, where N = total number of observations = r x c x n =
Total Sum of Squares: SST = (sum over i,j and k of xijk2) – C
Row Sum of Squares: SSR = {(sum over i of xi..2)/(cxn)} – C
Column Sum of Squares: SSC = {(sum over j of x.j.2)/(rxn)} – C
Between Sum of Squares: SSB = {(sum over i and jof xij.2)/n} – C
Interaction Sum of Squares: SSI = SSB – SSR – SSC
Error Sum of Squares: SSE = SST – SSB
Mean Sum of Squares = Sum of squares/Degrees of Freedom
Degrees of Freedom:
Total: N (i.e., rcn) – 1;
Between: rc – 1;
Within(Error): DF for Total – DF for Between;
Rows: (r - 1);
Columns: (c - 1);
Interaction: DF for Between – DF for Rows – DF for Columns;
Fobs:
for Rows: MSSR/MSSE;
for Columns: MSSC/MSSE;
for Interaction: MSSI/MSSE
Fcrit: upper α% point of F-Distribution with degrees of freedom n1 and n2, where n1 is the DF for the numerator MSS and n2 is the DF for the denominator MSS of Fobs
Significance: Fobs is significant if Fobs > Fcrit
Calculations
i |
j |
xijk; k = |
xij. |
xijksquare |
xij.square |
Row sum |
Row sum |
Col sum |
x.j.^2/9 |
||||
1 |
2 |
3 |
4 |
5 |
sum |
xi.. |
sq/cn |
x.j. |
|||||
1 |
1 |
8 |
9 |
8 |
12 |
7 |
44 |
402 |
1936 |
101 |
1020.10 |
191 |
2432.067 |
2 |
11 |
8 |
9 |
14 |
15 |
57 |
687 |
3249 |
188 |
2356.267 |
|||
2 |
1 |
8 |
11 |
12 |
14 |
10 |
55 |
625 |
3025 |
134 |
1795.6 |
||
2 |
13 |
15 |
14 |
18 |
19 |
79 |
1275 |
6241 |
|||||
3 |
1 |
16 |
22 |
17 |
18 |
19 |
92 |
1714 |
8464 |
144 |
2073.6 |
||
2 |
9 |
12 |
8 |
10 |
13 |
52 |
558 |
2704 |
|||||
Total |
379 |
5261 |
25619 |
G |
379 |
C |
4788.03 |
SST |
472.97 |
SSR |
101.2667 |
SSC |
0.30 |
SSB |
335.77 |
ANOVA TABLE |
α = |
0.05 |
||||
Source |
DF |
SS |
MS |
Fobs |
Fcrit |
p-value |
Row(Factor A) |
2 |
101.2667 |
50.6333 |
8.8571 |
3.4028 |
0.0013 |
Column (Factor B) |
1 |
0.3000 |
0.3000 |
0.0525 |
4.2597 |
0.8207 |
A x B Interaction |
2 |
234.2000 |
117.1000 |
20.4840 |
3.4028 |
0.0000 |
Between |
5 |
335.7667 |
67.1533 |
|||
Error |
24 |
137.2000 |
5.7167 |
|||
Total |
29 |
472.9667 |
16.3092 |
Conclusion: Factor A is significant; Factor B is not significant; Interaction is significant.
DONE