2-way anova notes-1
-
Upload
anmoldhillon -
Category
Documents
-
view
215 -
download
0
description
Transcript of 2-way anova notes-1
Two-Way ANOVA, A Numerical Example
Two-Way ANOVA, A Numerical ExampleANOVA can be extended to analyze data generated from experiments utilizing any number of independent variables, or factors. In a typical two factor design, A represents the first factor and B represents the second factor. So, in an AxB design, where A has 3 levels, and B has two levels. This design can be presented as follows:
FactorA1A2A3
B1AB11AB21AB31
B2AB12AB22AB32
This is called an AB matrix, generally, the cell AB11 would contain scores, or the total or mean for subjects in condition A1 and B1, AB22 would contain information on subjects in condition A2 and B2. Take the following two factor 3x2 experiment. We have a group of 24 chimpanzees, whom we've taught a discrimination task. We place three objects (two are the same) in front of the chimpanzees and their task is to pick out the odd one. So, if we place two square blocks and a poker chip in front of them, they have been trained to point to the poker chip. For doing this they receive a reward. Chimpanzees assigned to condition A1 get one grape as a reinforcer, A2 chimpanzees get two grapes, and A3 chimpanzees get three grapes. Furthermore, chimpanzees have either been fed within the past hour (B1) or 24 hours ago (B2). Therefore, the questions are 1)do chimpanzees perform differently in this task, depending upon the size of the reinforcement; 2)do chimpanzees perform differently in this task, depending upon how hungry they are; and, 3)do chimpanzees perform differently in this task depending upon the level of reinforcement, given their level of hunger (this is a different question than 1 & 2).
Step 1We begin by arranging our data into what's called an ABS matrix (Factor A by Factor B by Subject matrix) We calculate the sums, sum of AB squared, means, and standard deviations for preliminary analysis. The data follow (numbers represent the number of correct discriminations in 20 trials):
Subj. #A1B11 grape & 1 hrA2B12 grapes & 1 hrA3B13 grapes & 1 hrA1B21 grape & 24 hrsA2B22 grapes & 24 hrsA3B23 grapes & 24 hrs
1113915614
245166187
307181096
471513131513
ABij124056444840
ABijk266468830530666450
Mean ABij3.0010.0014.0011.0012.0010.00
sij3.164.763.923.925.484.08
Step 2Next, we rearrange our data into an AB matrix, as above, with totals in each of the cells as well as marginal totals.
Drive (Factor B)Amount of Food (Factor A)
A1A2A3Bi
B1124056108
B2444840132
Ai568896240
Step 3We can now form bracket terms. For this we will need a, b, and s, where a=the number of levels for factor A (3), b=the number of levels of factor B (2), and s=the number of subjects serving in each AxB condition (4).
T2
(240)2 57,600
[T] = ----------
= ------------------= ---------------= 2400
(a)(b)(s)
3 x 2 x 4
24
Ai2 (56)2 + (88)2 + (96)220,096
[A] = --------= -------------------------- = ---------= 2512
(b)(s)
2 x 4
8
Bj2 (108)2 + (132)2
29,088
[B] = -------= -------------------=---------= 2424
(a)(s)
3 x 4
12
(ABij)2(12)2 + (44)2 + (40)2 + (48)2 + (56)2 + (40)2 10,720
[AB] = ---------- = ------------------------------------------------------ = --------- = 2680
s
4
4
[ABS] = ABijk2 = 66 + 468 + 830 + 530 + 666 + 450 = 3010
Step 4Computing SS for each component of variance:
SSA = [A] - [T] = 2512 - 2400 = 112
SSB = [B] - [T] = 2424 - 2400 = 24
SSA x B = [AB] - [A] -[B] + [T] = 2680 - 2512 - 2424 + 2400 = 144
SSW = [ABS] - [AB] = 3010 - 2680 = 330SST = [ABS] - [T] = 3010 - 2400 = 610Step 5Computing df for each component of variance:
dfA = a - 1 = 3 - 1 = 2
dfb = b - 1 = 2 - 1 = 1
dfA x B = (a - 1)(b - 1) = (3 - 1)(2 - 1) = 2
dfW = (a)(b)(s - 1) = (3)(2)(4 - 1) = 18
dfT = (a)(b)(s) - 1 = (3)(2)(4) - 1 = 23
Step 6Computing MS for each treatment effect:
SSA 112
MSA = -------= ----------= 56
dfA 2
SSB 24
MSB = -----= ---- = 24
dfB 1
SSA x B 144
MSA x B = ----------= ----- = 72
dfA x B 2
SSW 330
MSW = ----------= ----- = 18.33
dfW 18
Step 7Computing Fratios:
MSA
56
FA =--------- =-------= 3.055
MSW
18.33
MSB
24
FB =--------- =-------= 1.309
MSW
18.33
MSA x B 72
FA x B = ---------- = --------- = 3.928
MSW 18.33
Step 8Arrange values into an ANOVA Summary Table
SourceSSdfMSF
SSA1122563.055
SSB241241.309
SSAxB1442723.928
SSW3301818.33
SSTOT61023
Step 9
Determine significance of each F-ratio by using the F-table in your text. Using the df for numerator and denominator, we find that only the interaction effect is significant for this experiment [Fcrit (2,18) = 3.55].