Two-Factor ANOVA model with n = 1 (no replication)
( \newcommand{\kernel}{\mathrm{null}\,}\)
1. Two-factor ANOVA model with n = 1 (no replication)
- For some studies, there is only one replicate per treatment, i.e., n = 1.
- ANOVA model for two-factor studies need to be modified, since
- the degrees of freedom associated with SSE will be (n−1)ab=0;
- thus the error variance σ2 can not be estimated by SSE anymore. - Idea: make the model simpler by assuming the two factors do not interact with each other. Validity of this assumption needs to be checked.
1.1 Two-factor model without interaction
With n = 1.
- Model equation:
Yij=μ..+αi+βj+ϵij,i=1,...,a,j=1,...,b.
- Identifiability constraints:
a∑i=1αi=0,b∑j=1βj=0.
- Distributional assumptions: ϵij are i.i.d. N(0,σ2)
Sum of squares
Interaction sum of squares now plays the role of error sum of squares.
SSAB=na∑i=1b∑j=1(¯Yij.−¯Yi..−¯Y.j.+¯Y...)2=a∑i=1b∑j=1(¯Yij−¯Yi.−¯Y.j+¯Y..)2
MSAB=SSAB(a−1)(b−1) since d.f.(SSAB)=(a−1)(b−1).
- In the general two-factor ANOVA model (when n = 1),
E(MSAB)=σ2+∑ai=1∑bj=1(αβ)2ij(a−1)(b−1)
- Under the model without interaction: E(MSAB)=σ2
- Thus MSAB can be used to estimate σ2.
ANOVA Table
ANOVA table for two-factor model without interaction and n=1
Source of Variation | SS | df | MS |
Factor A | SSA=b∑i(¯Yi.−¯Y..)2 | a−1 | MSA |
Factor B | SSB=a∑j(¯Y.j−¯Y..)2 | b−1 | MSB |
Error | SSAB=∑ai=1∑bj=1(¯Yij−¯Yi.−¯Y.j+¯Y..)2 | (a−1)(b−1) | MSAB |
Total | SSTO=∑ai=1∑bj=1(¯Yij−¯Y..)2 | ab−1 |
Expected mean squares (under no interaction):
E(MSA)=σ2+b∑ai=1α2ia−1,E(MSB)=σ2+a∑bj=1β2jb−1,E(MSAB)=σ2
F tests (for main effects)
Test factor A main effects: Ho:α1=...=αa=0 vs. Ha: not all αi's are equal to zero.
- F∗A=MSAMSAB Fa−1,(a−1)(b−1) under Ho.
- Reject Ho at level of significance α if observed F∗A>F(1−α;a−1,(a−1)(b−1)).
Test factor B main effects: Ho:β1=...=βb=0 vs. Ha: not all βj's are equal to zero.
- F∗B=MSBMSAB Fb−1,(a−1)(b−1) under Ho.
- Reject Ho at level of significance α if observed F∗B>F(1−α;b−1,(a−1)(b−1)).
Estimation of means
Estimation of factor level means μi.'s , μ.j's.
- Proceed as before, viz., use the unbiased estimator ¯Yi. for μi. and ¯Y.j for μ.j, but replace MSE by MSAB and use the degrees of freedom of MSAB, that is (a−1)(b−1). Thus, estimated standard errors:
s(¯Yi.)=√MSABb,s(¯Y.j)=√MSABa.
Estimation of treatment means μij's.
- μij=E(Yij)=μ..+αi+βj=μi.+μ.j−μ..
Thus, an unbiased estimator: ˆμij=¯Yi.+¯Y.j−¯Y..
Estimated standard error:
s(ˆμij)=√MSAB(1b+1a−1ab)=√MSAB(a+b−1ab)
1.2 Example: Insurance
An analyst studied the premium for auto insurance charged by an insurance company in six cities. The six cities were selected to represent different sizes (Factor A: small, medium, large) and differentregions of the state (Factor B: east, west). There is only one city for each combination of size and region. The amounts of premiums charged for a specific type of coverage in a given risk category for each of the six cities are given in the following table.
Table 1: Numbers in parentheses are ˆμij=¯Yi.+¯Y.j−¯Y..
Factor B | |||
East | West | ||
Factor A | Small 140(135) Medium 210(210) Large 220(225) | 100(105) 180(180) 200(195) | ¯Y1.=120 ¯Y2.=195 ¯Y3.=210 |
¯Y.1=190 | ¯Y.2=160 | ¯Y..=175 |
Interaction plot based on the treatment sample means Yij's: no strong interactions.
Sum of squares:
- Here a=3, b=2, n=1.
- SSA=2[(120−175)2+(195−175)2+(210−175)2]=9300..
- SSB=3[(190−175)2+(160−175)2]=1350.
- SSAB=(140−120−190+175)2+...+(200−210−160+175)2=100.
- SSTO=SSA+SSB+SSAB=10750.
Hypothesis testing: - Test Ho:μ1.=μ2.=μ3. (equivalently, Ho:α1=α2=α3=0) at level 0.05.
Table 2: ANOVA Table for Insurance example Source of Variation SS df MS Factor A SSA=9300 a−1=2 MSA=4650 Factor B SSB=1350 b−1=1 MSB=1350 Error SSAB=100 (a−1)(b−1)=2 MSAB=50 Total SSTO=10750 ab−1=5
F∗A=MSAMSAB=465050=93 and F(0.95;2,2)=19. Thus reject Ho at level 0.05.
- Estimation of μij: e.g.,
ˆμ11=¯Y1.+¯Y.1−¯Y..=120+190−175=135. - Estimation of μi. and μ.j: e.g.,
ˆμ1.=¯Y1.=120.
s(¯Y1.)=√MSABb=√502=5.
The 95% C.I. for μ1. is:
¯Y1.±t(0.975;2)∗s(¯Y1.)=120±4.3∗5=(98.5,141.5).
1.3 Checking for the presence of interaction: Tukey's test for additivity
For a two-factor study with n=1, decide whether or not the two factors are interacting.
- In the no-interaction model, we assume that all (αβ)ij=0.
- Idea: use a less severe restriction on the interaction effects, by assuming
(αβ)ij=Dαiβj,i=1,...,a,j=1,...,b,
where D is an unknown parameter. - The model becomes:
Yij=μ..+αi+βj+Dαiβj+ϵij,i=1,...,a,j=1,...,b,
under the constraints that
a∑i=1αi=b∑j=1βj=0.
Estimation of D
- Multiply αiβj on both sides of the equation:
αiβjYij=μ..αiβj+α2iβj+αiβ2j+Dα2iβ2j+ϵijαiβj - Sum over all pairs (i, j):
a∑i=1b∑j=1αiβjYij=Da∑i=1b∑j=1α2iβ2j+a∑i=1b∑j=1ϵijαiβj - Then
˜D:=∑ai=1∑bj=1αiβjYij(∑ai=1α2i)(∑bj=1β2j)≈D - We have the following estimates:
ˆαi=¯Yi.−¯Y..,ˆβj=¯Y.j−¯Y.. - Thus, an estimator of D (which is also the least squares and the maximum likelihood estimator) is given by
ˆD=∑ai=1∑bj=1(¯Yi.−¯Y..)(¯Y.j−¯Y..)Yij(∑ai=1(¯Yi.−¯Y..)2)(∑bj=1(¯Y.j−¯Y..)2).
ANOVA decomposition
SSTO=SSA+SSB+SSAB∗+SSRem∗.
- Interaction sum of squares
SSAB∗=a∑i=1b∑j=1ˆD2ˆα2iˆβ2j=(∑ai=1∑bj=1(¯Yi.−¯Y..)(¯Y.j−¯Y..)Yij)2(∑ai=1(¯Yi.−¯Y..)2)(∑bj=1(¯Y.j−¯Y..)2) - Remainder sum of squares
SSREM∗=SSTO−SSA−SSB−SSAB∗ - Decomposition of degrees of freedom
df(SSTO)=df(SSA)+df(SSB)+df(SSAB∗)+df(SSRem∗)
ab−1=(a−1)+(b−1)+1+(ab−a−b) - Tukey's one degree of freedom test for additivity: Ho:D=0 (i.e., no interaction) vs. Ha:D≠0.
- F ratio F∗Tukey=SSAB∗/1SSRem∗/(ab−a−b)∼F1,ab−a−b under Ho.
- Decision rule: reject Ho:D=0 at level of significance α if F∗Tukey>F(1−α;1,ab−a−b).
Example: Insurance
- ∑ij(¯Yi.−¯Y..)(¯Y.j−¯Y..)Yij=−13500.
- ∑ai=1(¯Yi.−¯Y..)2=4650, and ∑bj=1(¯Y.j−¯Y..)2=450.
- SSAB∗=(−13500)24650∗450=87.1.
- SSRem∗=10750−9300−1350−87.1=12.9.
- ab−a−b=3∗2−3−2=1.
- F-ratio for Tukey's test:
F∗Tukey=SSAB∗/1SSRem∗/1=87.112.9=6.8. - When α=0.05,F(0.95;1,1)=161.4>6.8.
- Thus, we can not reject Ho:D=0 at the 0.05 level, and we conclude that there is no significant interaction between the two factors.
- Indeed, the p-value is p=P(F1,1>6.8)=0.23 which is not at all significant.
Contributors
- Scott Brunstein (UCD)
- Debashis Paul (UCD)