On this page
9.5 Random Factors ANOVA (Two Factors)
In this section we present the ANOVA model for two random factors, however we have two methods that can be used and they are the crossed method and the hierarchical method. Below we present the crossed method.
9.5.1 Crossed Method
The crossed experiment with two factors and interaction is the classic RR (Repeatability and Reproducibility) model. Typically, the two factors are referred to as “parts” and “operators”. In this chapter we consider balanced experiments, in which both factors are random. This model is also known as variance components.
Model
The model with two balanced factors and with crossed and interaction effects is given by
$$y_{ij}=\mu_y+\alpha_i+\gamma_{j}+\tau_{ij}+\varepsilon_{ijk} \begin{cases} i=1,\dots, p \cr j=1,\dots,o \cr k=1,\dots,r \end{cases} \tag{2.1.1}$$
For this model $ \mu $ is a parameter common to all treatments and represents the general average of the data, $ \alpha_{i} $ and $ \gamma_j $ is the effect due to the ith and jth level of the factor P and O and are independent random variables with zero mean and variances $ \sigma^2_P $ and $ \sigma^2_O $ respectively and $ \tau_{ij} $ is the interaction between the factors P and O, which also has a normal distribution with zero mean and variance $ \sigma^2_I. $ The random variable $ \varepsilon_{ijk} $ corresponds to experimental random error, that is, the variability not explained by the model due to variations present in several sources not considered in the study. This has a normal distribution with zero mean and variance $ \sigma^2. $
In short,
$$\mu=\hbox{média~geral~dos~dados;}$$
$$\alpha_{i}= \hbox{efeito~do~nível~i~do~fator~P;}$$
$$\gamma_{j}= \hbox{efeito~do~nível~j~do~fator~O;}$$
$$\tau_{ij}= \hbox{efeito~do~nível~ij~da~interação~entre~P~e~O;}$$
$$\varepsilon_{ijk}= \hbox{componente~aleatória~do~erro.}$$
Now, let’s develop the analysis of variance for the random effects model. From considerations of the data, we have:
$$Y_{i..}=\displaystyle \sum_{j=1}^{o}\sum^r_{k=1} Y_{ijk}: \hbox{soma das observações do nível i do fator P;}$$
$$\overline{Y_{i.}}=\frac{Y_{i..}}{pr}:~\hbox{média das observações do nível i do fator P;}$$
$$Y_{.j.}=\displaystyle \sum_{i=1}^{p}\sum^r_{k=1} Y_{ijk}: \hbox{soma das observações do nível j do fator O;}$$
$$\overline{Y_{.j.}} = \frac{Y_{.j.}}{or}: ~ \hbox{média das observações do nível j do fator operador;}$$
$$ Y_{ij.} = \displaystyle\sum_{k=1}^r Y_{ijk}: ~ \hbox{soma das observações do nível i e j dos fatores P e O;}$$
$$\overline{Y_{ij.}} = \frac{Y_{ij.}}{or}: ~ \hbox{média das observações do nível i e j dos fatores P e O;}$$
$$Y_{…} = \displaystyle\sum_{i=1}^{p} \sum_{j=1}^{o} \sum_{k=1}^{r} Y_{ijk}: ~ \hbox{soma de todas as observações;} \quad \hbox{e}$$
$$\overline{Y_{…}} = \frac{Y_{…}}{por}: ~ \hbox{média geral das observações}$$
In summary, we assume that the error has a Normal distribution with zero mean and variance $ \sigma^{2}_{\varepsilon} $ and that the errors are mutually independent. With this, we have to
$$\varepsilon_{ijk}\sim~N(0,\sigma^{2}_{\varepsilon}).$$
Now, for the purpose $ \alpha_i $, we assume that it has a Normal distribution with zero mean and variance $ \sigma^2_{P}. $ We also assume that the effects are mutually independent. So,
$$\alpha_{i}\sim~N(0,\sigma^{2}_{P}).$$
To that end $ \gamma_j $, we assume that it has a Normal distribution with zero mean and variance $ \sigma^2_{O}. $ We also assume that the effects are mutually independent. So,
$$\gamma_{j}\sim~N(0,\sigma^{2}_{O}).$$
Finally, we have to $ \tau_{ij} $, we assume that it has a Normal distribution with zero mean and variance $ \sigma^2_{I}. $ We also assume that the effects are mutually independent. So,
$$\tau_{ij}\sim~N(0,\sigma^{2}_{I}).$$
Furthermore, $ \alpha_i $, $ \gamma_j $, $ \tau_{ij} $ and $ \varepsilon_{ijk} $ are independent for all $ i,j,k $.
9.5.1.1 Decomposition of the Sum of Squares
The analysis of variance for model (2.4.1.1) is obtained by decomposing the toral variation $ Y_{ijk}-\overline{Y_{…}} $ as follows
$$SQT=\sum_{i=1}^{a}\sum_{j=1}^{b}\sum_{k=1}^{r}(Y_{ijk}-\overline{Y_{…}})^2=$$
$$=\sum_{i=1}^{p}\sum_{j=1}^{o}\sum_{k=1}^{r}\left[(\overline{Y_{i..}}-\overline{Y_{…}})+(\overline{Y_{.j.}}-\overline{Y_{…}})+(\overline{Y_{ij.}}-\overline{Y_{i..}}-\overline{Y_{.j.}}+\overline{Y_{…}})+(Y_{ijk}-\overline{Y_{ij.}})\right]^2=$$
$$=o~r\sum_{i=1}^{p}(\overline{Y_{i..}}-\overline{Y_{…}})^2 +p~r\sum_{j=1}^{o}(\overline{Y_{.j.}}-\overline{Y_{…}})^2 +r~\sum_{i=1}^{p}\sum_{j=1}^{o}(\overline{Y_{ij.}}-\overline{y_{i..}}-\overline{Y_{.j.}}+\overline{Y_{…}})^2+\sum_{i=1}^{p}\sum_{j=1}^{o}\sum_{k=1}^{r}(Y_{ijk}-\overline{Y_{ij.}})^2$$
$$=SQP+SQO+SQI+SQE$$
in which
$$SQT=\sum_{i=1}^{p}\sum_{j=1}^{o}\sum_{k=1}^{r}(Y_{ijk}-\overline{Y_{…}})^2$$
$$SQP=o~r\sum_{i=1}^{p}(\overline{Y_{i..}}-\overline{Y_{…}})^2$$
$$SQO=p~r\sum_{j=1}^{o}(\overline{Y_{.j.}}-\overline{Y_{…}})^2$$
$$SQI=r~\sum_{i=1}^{p}\sum_{j=1}^{o}(\overline{Y_{ij.}}-\overline{Y_{i..}}-\overline{Y_{.j.}}+\overline{Y_{…}})^2$$
$$SQE=\sum_{i=1}^{p}\sum_{j=1}^{o}\sum_{k=1}^{r}(Y_{ijk}-\overline{Y_{ij.}})^2 $$
Degrees of freedom and variance estimates
One way to calculate the degrees of freedom is to determine the expected value of the SQP, SQO, SQI and SQE components.
Let’s calculate the expected values of the sums of squares. Initially, we calculate the P factor as follows.
$$E(QMP)=\frac{1}{p-1}\left[E\left(\sum_{i=1}^{p}\frac{Y_{i..}^2}{o~r}\right)-E\left(\frac{Y_{…}^2}{p~o~r}\right)\right]$$
$$=\frac{1}{p-1}\left(\frac{1}{o~r}\sum_{i=1}^{p}E\left[\left(\sum_{j=1}^{o}\sum_{k=1}^{r}Y_{ijk}\right)^2\right]-\frac{1}{p~o~r}E\left[\left(\sum^{p}_{i=1}\sum^{o}_{j=1}\sum_{k=1}^{r}Y_{ijk}\right)^2\right]\right)$$
$$=\frac{1}{p-1}\left(\frac{1}{o~r}\sum_{i=1}^{p}E\left[\left(\sum_{j=1}^{o}\sum_{k=1}^{r}\left(\mu + \alpha_i + \beta_j + \tau_{ij} + \varepsilon_{ijk}\right)\right)^2\right]\right.-$$
$$-\left.\frac{1}{p~o~r}E\left[\left(\sum_{i=1}^{p}\sum^{o}_{j=1}\sum_{k=1}^{r}\left(\mu + \alpha_i + \beta_j + \tau_{ij}+\varepsilon_{ijk}\right)\right)^2\right]\right)$$
$$=\frac{1}{p-1}\left(\frac{1}{o~r}\sum_{i=1}^{p}\left[\left(o~r~\mu\right)^2+\left(o~r~\sigma_P\right)^2 + o~r^2~\sigma^2_O + o~r^2~\sigma^2_I+o~r~\sigma^2_E \right]\right.-$$
$$-\left.\frac{1}{p~o~r}\left[\left(p~o~r~\mu\right)^2+p~\left(o~r~\sigma_P\right)^2+o~\left(p~r~\sigma_O\right)^2+o~p~\left(r~\sigma_I\right)^2 + p~o~r~\sigma^2_E \right]\right)$$
$$=o~r~\sigma^2_P+r~\sigma^2_I+\sigma^2_E$$
Now, we calculate for factor O as follows.
$$E(QMO)=E\left(\frac{SQO}{o-1}\right)=\frac{1}{o-1}E\left(p~r\sum_{j=1}^{o}(\overline{Y_{.j.}}-\overline{Y_{…}})^2\right)=\frac{1}{o-1}E\left(\sum^o_{j=1}\frac{\overline{Y}^2_{.j.}}{pr}-\frac{\overline{Y}^2_{…}}{por}\right)=$$
$$=\sum^o_{j=1}\frac{1}{pr}E\left((pr(\mu+\gamma_j)+\sum^p_{i=1}r\alpha_i+\sum^p_{i=1}r\tau_{ij}+\varepsilon_{.j.})^2\right)-$$
$$-\frac{1}{por}E\left((por\mu+\sum^p_{i=1}or\alpha_i+\sum^o_{j=1}pr\gamma_j+\sum^p_{i=1}\sum^o_{j=1}r\tau_{ij}+\varepsilon_{…})^2\right)=$$
$$=\frac{1}{o-1}((o-1)\sigma^2_E+r(o-1)\sigma^2_I+pr(o-1)\sigma^2_O)=$$
$$=\sigma^2_E+r\sigma^2_I+pr\sigma^2_O$$
For factor I we have
$$E(QMI)=E\left(\frac{SQI}{(p-1)(o-1)}\right)=\frac{1}{(p-1)(o-1)}E\left[r~\sum_{i=1}^{p}\sum_{j=1}^{o}(\overline{Y_{ij.}}-\overline{Y_{i..}}-\overline{Y_{.j.}}+\overline{Y_{…}})^2\right]=$$
$$=\frac{1}{(p-1)(o-1)}\left(\sum^p_{i=1}\sum^o_{j=1}\frac{1}{r}E\left[(\mu+\alpha_i+\gamma_j+\tau_{ij}+\varepsilon_{ij.})^2\right.-\right.$$
$$-\sum^p \frac{1}{pr}E\left[(pr~\mu+pr~\gamma_j+r\sum^p_{i=1}(\alpha_i+\tau_{ij})+\varepsilon_{.j.})^2\right]-$$
$$-\sum^o_{j=1}\frac{1}{or}E\left[(or~\mu+or~\gamma_j+r\sum^p_{i=1}(\alpha_i+\tau_{ij})+\varepsilon_{.j.})^2\right]+$$
$$\left.+\frac{1}{por}E\left[(por~\mu+pr\sum^p_{i=1}\alpha_i+or\sum^o_{j=1}\gamma_j+r\sum^p_{i=1}\sum^o_{j=1}\tau_{ij}+\varepsilon_{…})^2\right]\right)=$$
$$=\frac{1}{(p-1)(o-1)}\left[por(\mu^2+\sigma^2_P+\sigma^2_O+\sigma^2_I)+(po)\sigma^2_E-por(\mu^2+\sigma^2_P)+\frac{r^2}{or}(\sigma^2_O+\sigma^2_I)+\right.$$
$$\left.+p\sigma^2_E-por(\mu^2+\sigma^2_O)+\frac{r^2}{pr}(\sigma^2_P+\sigma^2_I)+o\sigma^2_E+por~\mu^2+(or)^2\sigma^2_P+(pr)^2\sigma^2_O+\frac{r^2}{por}\sigma^2_I+\sigma^2_E\right]=$$
$$=\sigma^2_E+r\sigma^2_I$$
Finally, for the mean squared error (QME) we have
$$E(QME)=E\left(\frac{SQE}{po(r-1)}\right)=\frac{1}{po(r-1)}E\left[\sum_{i=1}^{p}\sum_{j=1}^{o}\sum_{k=1}^{r}(Y_{ijk}-\overline{Y_{ij.}})^2 \right]=$$
$$=\frac{1}{po(r-1)}\left[\sum^p_{i=1}\sum^o_{j=1}\sum^r_{k=1}E[(\mu+\alpha_i+\gamma_j+\tau_{ij}+\varepsilon_{ijk})^2]\right.-$$
$$\left.-\sum^p_{i=1}\sum^o_{j=1}\frac{1}{r}E\left[(\mu+\alpha_i+\gamma_j+\tau_{ij}+\varepsilon_{ij.})^2]\right]\right]=$$
$$=\frac{1}{po(r-1)}\left[por(\mu^2+\sigma^2_P+\sigma^2_O+\sigma^2_I+\sigma^2_E)-por(\mu^2+\sigma^2_P+\sigma^2_P+\sigma^2_I)+(po)\sigma^2_E\right]=$$
$$=\sigma^2_E$$
The number of degrees of freedom in a sum of squares is the number of independent elements in that sum. For example, consider the sum of squares $ \displaystyle\sum_{i=1}^{p}(\overline{Y_{i..}}-\overline{Y_{…}})^2 $. In this case, how $ \displaystyle\sum_{i=1}^{p}(\overline{Y_{i..}}-\overline{Y_{…}})~=~0 $, not all elements $ (\overline{Y_{1..}}-\overline{Y_{…}}),\cdots, (\overline{Y_{p..}}-\overline{Y_{…}}) $ are independent. Therefore, we have $ p~-~1 $ degrees of freedom. In this sense, the respective degrees of freedom associated with each sum of squares are:
| Sum of Squares | Degrees of Freedom | Medium Squares |
|---|---|---|
| SQP | $p-1$ | $ \cfrac{SQP}{p-1} $ |
| SQO | $o-1$ | $ \cfrac{SQO}{o-1} $ |
| SQI | $(p-1)(o-1)$ | $ \cfrac{SQI}{(p-1)(o-1)} $ |
| SQE | $po(r-1)$ | $ \cfrac{SQE}{po(r-1)} $ |
| SQT | per-1 |
Table 9.5.1: Degrees of freedom
Now, below we show a brief summary of the expected values of the mean squares and statistics.
| Factor | Degrees of Freedom | Medium Squares | Expected Value of Mean Squares |
|---|---|---|---|
| P Factor | $p-1$ | QMP | $ E(QMP)=\sigma^2_E+r\sigma^2_I+or\sigma^2_P $ |
| O Factor | $o-1$ | QMO | $ E(QMO)=\sigma^2_E+r\sigma^2_I+pr\sigma^2_O $ |
| Interaction $ P\times O $ | $(p-1)(o-1)$ | QMI | $ E(QMI)=\sigma^2_E+r\sigma^2_I $ |
| Error | $po(r-1)$ | QME | $ E(QME)=\sigma^2_E $ |
Table 9.5.2: Expected Values of Mean Squares.
Statistics:
| $ QMP $ | $ or\displaystyle\sum^p_{i=1}\frac{(\overline{Y_{i..}}-\overline{Y_{…}})^2}{p-1} $ |
|---|---|
| $ QMO $ | $ pr\displaystyle\sum^o_{j=1}\frac{(\overline{Y_{.j.}}-\overline{Y_{…}})^2}{o-1} $ |
| $ QMI $ | $ r\displaystyle\sum^p_{i=1}\sum^o_{j=1}\frac{(\overline{Y_{ij.}}-\overline{Y_{i..}}-\overline{Y_{.j.}}+\overline{Y_{…}})^2}{(p-1)(o-1)} $ |
| $ QME $ | $ \displaystyle\sum^p_{i=1}\sum^o_{j=1}\sum^r_{k=1}\frac{(Y_{ijk}-\overline{Y_{ij.}})^2}{po(r-1)} $ |
| $ \overline{Y_{i..}} $ | $ \displaystyle\sum^o_{j=1}\sum^r_{k=1}\frac{Y_{ijk}}{or} $ |
| $ \overline{Y_{.j.}} $ | $ \displaystyle\sum^p_{i=1}\sum^r_{k=1}\frac{Y_{ijk}}{pr} $ |
| $ \overline{Y_{ij.}} $ | $ \displaystyle\sum^r_{k=1}\frac{Y_{ijk}}{r} $ |
| $ \overline{Y_{…}} $ | $ \displaystyle\sum^p_{i=1}\sum^o_{j=1}\sum^r_{k=1}\frac{Y_{ijk}}{por} $ |
Table 9.5.3: Summary of mean squares and means for model (2.1.1).
With the results obtained in table 9.5.2 we have the following estimators:
For the error component we have
$$\hat{\sigma}^2_E=QME \tag{2.1.1.1}$$
For the effect of the interaction we have
$$\hat{\sigma}^2_I=\frac{QMI-\hat{\sigma}^2_E}{r}=\frac{QMI-QME}{r} \tag{2.1.1.2}$$
Now, to calculate the effect of factor O, we use equations (2.1.1.1) and (2.1.1.2) as follows
$$\hat{\sigma}^2_O=\frac{QMO-\hat{\sigma}^2_E-r~\hat{\sigma}^2_I}{pr}\overset{(2.1.1.1)~{e}~(2.1.1.2)}{=}$$
$$=\frac{QMO-QME-(QMI-QME)}{pr}=\frac{QMO-QMI}{pr} \tag{2.1.1.3}$$
Finally, in an analogous way, for the effect of the P factor we have
$$\hat{\sigma}^2_P=\frac{QMP-QMI}{or}~~~(2.1.1.4)$$
Table 9.5.4 summarizes the point estimators of the model (2.1.1).
| Model Representation | Spot Estimator |
|---|---|
| $ \mu_y $ | $ \overline{Y_{…}} $ |
| $ \sigma^2_P $ | $ \cfrac{QMP-QMI}{or} $ |
| $ \sigma^2_O $ | $ \cfrac{QMO-QMI}{pr} $ |
| $ \sigma^2_I $ | $ \cfrac{QMI-QME}{po} $ |
| $ \sigma^2_E $ | $ QME $ |
Table 9.5.4: Summary of Point Estimators for model (2.1.1).
9.5.1.2 Statistical Analysis
Next, we will develop a test $ F $ to evaluate the effect of the interaction and the main effects, as shown in the table below:
| Objective | Hypothesis |
|---|---|
| effect of the P factor | (A) $\begin{cases} H_0: \alpha_1 = \cdots = \alpha_p = 0 \cr \alpha_{i} \neq 0~(i=1,\ldots,p) \end{cases} $ |
| effect of factor O | (B) $\begin{cases} H_0: \beta_1 = \cdots = \beta_o = 0 \cr \beta_{j} \neq 0~(j=1,\ldots,o) \end{cases} $ |
| Effect of Interaction($ P \times O $) | (C) $\begin{cases} H_0: \tau_{ij} = 0 ~ \hbox{para todos os valores de i e j} \cr \tau_{ij} \neq 0 \end{cases} $ |
Table 9.5.5: Test $ F $ to evaluate the interaction effect and main effects
We know that the total sum of squares is decomposed in the form $ SQT = SQP + SQO + SQI + SQE. $
Thus, through Cochran’s theorem, we guarantee, under $ {H}_0 $, the independence of the sums of squares and
$$\displaystyle\frac{SQP}{\sigma^2_P} \sim \chi^2_{(p - 1)}~~~~~{e}~~~~~\frac{SQI}{\sigma^2_I } \sim \chi^2_{((p-1)(o - 1))},$$
In this way, under $ {H}_0 $ (hypotheses A) statistics
$$F_0=\frac{\displaystyle\frac{SQP}{(\sigma_{P}^2)~(p-1)}}{\displaystyle\frac{SQI}{\sigma_{i}^2~(p-1)~(o-1)}}~~=~~\frac{QMP}{QMI}~~\sim~~F(p-1;~(p-1)~(o-1)),$$
that is, $ {F}_0 $ has F-Snedecor distribution with $(p-1)$ degrees of freedom in the numerator and $[(p - 1)(o - 1)]$ degrees of freedom in the denominator.
To determine the test statistics for hypotheses B, we obtain from Cochran’s theorem that, under $ {H}_0 $
$$\frac{SQO}{\sigma^2_O} \sim \chi^2_{(o - 1)}~~~~~\hbox{e}~~~~~\frac{SQI}{\sigma^2_I} \sim \chi^2_{((p-1)(o - 1))}~,$$
are independent. Thus, we conclude that the statistics (under $ {H}_0 $)
$$F_0 =\frac{\displaystyle\frac{SQO}{(\sigma_{O}^2)~(o-1)}}{\displaystyle\frac{SQI}{\sigma_{I}^2~((p-1)(o-1))}}~~=~~\frac{QMO}{QMI}~~\sim~~F(o - 1;(p-1)(o - 1)),$$
i.e. $ {F}_0 $ has F-Snedecor distribution with (b-1) degrees of freedom in the numerator and [(p - 1) (o - 1)] degrees of freedom in the denominator.
To determine the test statistics for hypotheses C, we obtain from Cochran’s theorem that, under $ {H}_0 $
$$\frac{SQI}{\sigma_{I}^2} \sim \chi^2_{(p - 1)(o - 1)}~~~~~ \hbox{e~também,}~~~~~\frac{SQE}{\sigma^2_E} \sim \chi^2_{(p~o~(r - 1))}~~,$$
are independent. So, under $ {H}_0 $ we have the statistics
$$F_0=\frac{\displaystyle\frac{SQI}{(\sigma_{I}^2)~(p-1)(o-1)}}{\cfrac{SQE}{(\sigma_{E}^2)~(p~o~(r-1))}}~~=~~\frac{QMI}{QME}~~\sim~F((p-1)(o-1);(po(r-1)))$$
has distribution of F-Snedecor with $(p - 1)(o - 1)$ degrees of freedom in the numerator and $[p o (r - 1)]$ degrees of freedom in the denominator.
The critical region (RC) of the F test is given by $ RC=(F~\in~\Re^+ ~\mid~F > F_{1-\alpha}) $.
The critical value $ F_{1-\alpha} $ corresponds to the quantile $ (1-\alpha)100 \char37$ of the F-Snedecor distribution with the respective degrees of freedom of the numerator and denominator and the level of significance $ \alpha $. Figure 9.5.1 shows the critical region of the test.
Figure 9.5.1: Critical region of the F test.
The statistical test for the proposed hypotheses (A, B, C) is summarized in the table below.
| Factor | Degrees of Freedom | Sum of Squares | Medium Squares | F | P-Value |
|---|---|---|---|---|---|
| P Factor | $ p -1 $ | $ SQP $ | $ QMP $ | $ F_{P}=\frac{QMP}{QMI} $ | $ P(F> F_P) $ |
| O Factor | $ o -1 $ | $ SQO $ | $ QMO $ | $ F_{O}=\frac{QMO}{QMI} $ | $ P(F> F_O) $ |
| Interaction ($ P\times O $) | $ (p -1)(o -1) $ | $ SQI $ | $ QMI $ | $ F_{I}=\frac{QMI}{QME} $ | $ P(F> F_{I}) $ |
| Error | $ p~o~(r -1) $ | $ SQE $ | $ QME $ | ||
| Total | $ p~o~r - 1 $ | $ SQT $ |
Table 9.5.6: Analysis of Variance Table (ANOVA).
9.5.1.3 Estimation of model parameters
We now present the confidence intervals for the parameters for the crossed method defined in Table 9.5.7 in which $ F_{\alpha,df_1, df_2} $ represents the quantile $ (1-\alpha)100 \char37 $ of F-Snedecor distribution with $ df_1 $ degrees of freedom in the numerator and $ df_2 $ degrees of freedom in the denominator. Table 9.5.7 represents the particular case of model (2.1.1).
| Constant | Definition |
|---|---|
| $ G_a $ | $ 1-F_{\left(\frac{\alpha}{2},\infty,(p-1)\right)} $ |
| $ G_b $ | $ 1-F_{\left(\frac{\alpha}{2},\infty,(o-1)\right)} $ |
| $ G_i $ | $ 1-F_{\left(\frac{\alpha}{2},\infty,(p-1)(o-1)\right)} $ |
| $ G_e $ | $ F_{\left(1-\frac{\alpha}{2},\infty,po(r-1)\right)}-1 $ |
| $ H_a $ | $ F_{\left(1-\frac{\alpha}{2},\infty,(o-1)\right)}-1 $ |
| $ H_b $ | $ F_{\left(1-\frac{\alpha}{2},\infty,(p-1)(o-1)\right)}-1 $ |
| $ H_i $ | $ F_{\left(1-\frac{\alpha}{2},\infty,po(r-1)\right)}-1 $ |
| $ H_e $ | $ F_{\left(1-\frac{\alpha}{2},(p-1),(p-1)(o-1)\right)} $ |
| $ F_a $ | $ F_{\left(\frac{\alpha}{2},(p-1),(p-1)(o-1)\right)} $ |
| $ F_b $ | $ F_{\left(1-\frac{\alpha}{2},(p-1),(p-1)(o-1)\right)} $ |
| $ F_i $ | $ F_{\left(1-\frac{\alpha}{2},(p-1),(o-1)\right)} $ |
| $ F_e $ | $ F_{\left(\frac{\alpha}{2},(p-1),(o-1)\right)} $ |
| $ G_{ae} $ | $ \frac{(F_a-1)^2-(G_a F_a)^2-H^2_i}{F_a} $ |
| $ H_{ae} $ | $ \frac{(1-F_b)^2-(H_a F_b)^2-G^2_i}{F_b} $ |
| $ G_{be} $ | $ \frac{(F_b-1)^2-(G_b F_b)^2-H^2_i}{F_b} $ |
| $ H_{be} $ | $ \frac{(1-F_a)^2-(H_b F_a)^2-G^2_i}{F_a} $ |
| $ G_{ie} $ | $ \frac{(F_i-1)^2-(G_i F_i)^2-H^2_e}{F_i} $ |
| $ H_{ie} $ | $ \frac{(1-F_e)^2-(H_i F_e)^2-G^2_e}{F_e} $ |
Table 9.5.7: Constants used to construct the confidence interval.
Confidence interval for $ \mu_y $
For model (2.1.1), several methods were studied for constructing confidence intervals for $ \mu_y $. Here, we will adopt the confidence interval based on Milliken and Johnson page 281.
$$LI_{\mu_y}=\overline{Y_{…}}-C\sqrt{\frac{K}{por}}$$
and
$$LS_{\mu_y}=\overline{Y_{…}}+C\sqrt{\frac{K}{por}} \tag{2.1.3.1}$$
in which
$$K=QMA+QMB-QMI$$
and
$$C=\frac{QMA\sqrt{F_{\left(1-\alpha,1,(p-1)\right)}}+QMB\sqrt{F_{\left(1-\alpha,1,(o-1)\right)}}-QMI\sqrt{F_{\left(1-\alpha,1,(p-1)(o-1)\right)}}}{K}$$
Se $K<0$ then replace $K$ by $QMI$ and $C$ by $ \sqrt{F_{\left(1-\alpha,1,(p-1)(o-1)\right)}} $, maintaining the level of confidence in equation (2.1.3.1).
Confidence interval for $ \sigma^2_P $
For the confidence interval for $ \sigma^2_A, $ we saw in table 9.5.7 that
$$\hat{\sigma}^2_P=\frac{QMP-QMI}{or}$$
Thus, when we involve the difference of two mean squares, we will use the method proposed by Ting which is given by:
$$LI_{\sigma^2_P}=\hat{\sigma}^2_P-\frac{\sqrt{V_{LP}}}{or}$$
and
$$LS_{\sigma^2_P}=\hat{\sigma}^2_P+\frac{\sqrt{V_{UP}}}{or} \tag{2.1.3.2}$$
in which
$$V_{LP}=G^2_p*QMP^2+H^2_i*QMI^2+G_{pi}*QMP*QMI$$
and
$$V_{UP}=H^2_p*QMP^2+G^2_i*QMI^2+H_{pi}*QMP*QMI$$
Confidence interval for $ \sigma^2_O $
For the confidence interval for $ \sigma^2_O, $we saw in table 9.5.7 that
$$\hat{\sigma}^2_O=\frac{QMO-QMI}{pr}$$
Thus, when we involve the difference of two mean squares, we will use the method proposed by Ting which is given by:
$$LI_{\sigma^2_O}=\hat{\sigma}^2_O-\frac{\sqrt{V_{LO}}}{pr}$$
and
$$LS_{\sigma^2_O}=\hat{\sigma}^2_O+\frac{\sqrt{V_{UO}}}{pr} \tag{2.1.3.3}$$
in which
$$V_{LO}=G^2_o*QMO^2+H^2_i*QMI^2+G_{oi}*QMO*QMI$$
and
$$V_{UO}=H^2_o*QMO^2+G^2_i*QMI^2+H_{oi}*QMO*QMI$$
Confidence interval for $ \sigma^2_I $
For the confidence interval for $ \sigma^2_I, $we saw in table 9.5.7 that
$$\hat{\sigma}^2_I=\frac{QMI-QME}{po}$$
Thus, when we involve the difference of two mean squares, we will use the method proposed by Ting which is given by:
$$LI_{\sigma^2_I}=\hat{\sigma}^2_I-\frac{\sqrt{V_{LI}}}{po}$$
and
$$LS_{\sigma^2_I}=\hat{\sigma}^2_I+\frac{\sqrt{V_{UI}}}{po} \tag{2.1.3.4}$$
in which
$$V_{LI}=G^2_i*QMI^2+H^2_e*QME^2+G_{ie}*QME*QMI$$
and
$$V_{UI}=H^2_i*QMI^2+G^2_e*QME^2+H_{ie}*QME*QMI$$
Confidence interval for $ \sigma^2_E $
For the confidence interval for $ \sigma^2_E, $we saw in table 9.5.7 that
$$\hat{\sigma}^2_E=QME$$
Therefore, the confidence interval for $ \sigma^2_E $ is given by
$$LI_{\sigma^2_E}=(1-G_e) QME$$
and
$$LS_{\sigma^2_E}=(1+H_e) QME$$
in which $ G_B $ and $ H_B $ are defined in table 9.5.7.
9.5.2 Hierarchical Method (Nested)
Sometimes constraints prevent us from crossing all levels of one factor with all levels of the other factor. In these cases, we are forced into what is known as a hierarchical arrangement.
Hierarchical analysis of variance is an extension of ANOVA, in which each factor is divided into subgroups of these factors. More specifically, these subgroups are chosen randomly from a larger set of possible subgroups.
For example, in measurement systems, we can mention non-replicable experiments, that is, they are experiments in which the part cannot be reevaluated due to changes in its structure, such as destruction of the part.
The first measure to be taken before approaching these experiments, in this case, is to ensure that all conditions that encompass the test are defined, standardized and controlled. In the example of measuring systems, operators must be similarly qualified and trained, lighting must be adequate and always controlled, work instructions must be detailed and operationally defined, environmental conditions must be controlled to an appropriate degree, equipment must be calibrated and receive adequate maintenance, etc.
After this, since the piece cannot be reevaluated due to changes in its structure (or destruction), several similar (homogeneous) pieces must be chosen for the study and the assumption must be made that the pieces are identical (or similar). Therefore, the parts must be sampled consecutively (within the same production batch) and are identical (or similar) enough so that they can be treated as if they were the same part.
Thus, in the defined experimental arrangement, the batch factor levels (similar parts) occur in combination with the operator factor levels, for example. Such experimental arrangements are called hierarchical (“nested”).
The hierarchical random two-factor model with unbalanced data is given by
$$y_{ij}=\mu_y+\alpha_i+\beta_{j(i)} \tau_{ij}+\varepsilon_{ij} \begin{cases} i=1,\dots, a \cr j=1,\dots,b_i \cr k=1,\dots,n_{ij} \end{cases} \tag{2.2.1}$$
in which,
$y_{ijk}$ is the kth observation of the jth level of factor B within the ith level of factor A;
$μ$ is the general average;
$α_i$ is the effect due to the ith level of factor A;
$β_{j(i)}$ is the effect due to the jth level of factor B hierarchically under the ith level of factor A;
$σ_{k(ij)}$ is the random component of the error.
Now, let’s develop the analysis of variance for the random effects model. From considerations of the data, we have:
$$ y_{ij.} = \displaystyle\sum_{k=1}^{n_{ij}} y_{ijk}: ~ \hbox{soma das observações do nível i e j do fator;}$$
$$ \overline{y}_{ij.} = \frac{y_{ij.}}{n_{ij}}: ~ \hbox{média das observações do nível i e j do fator;}$$
$$ y_{i..} = \displaystyle\sum_{j=1}^{b_{i}} y_{ij.}: ~ \hbox{soma das observações do nível i do fator;}$$
$$ \overline{y}_{i..} = \frac{y_{i..}}{n_{i.}}: ~ \hbox{média das observações do nível i do fator;}$$
$$ y_{…} = \displaystyle\sum_{i=1}^{a} y_{i..}: ~ \hbox{soma de todas as observações}$$
$$ \overline{y}_{i..} = \frac{y_{i..}}{N}: ~ \hbox{é a média geral das observações}$$
we have to $ N $ is the total number of observations, that is,
with $ n_{i.}=\displaystyle\sum^{b_i}_{j=1}n_{ij} $ and $ N = \displaystyle \sum^{a}_{i=1} n_{i.}, $ total number of observations, being $ a $ and $ b_i $ factor B levels (subclasses) within each factor A level.
We also denote $ b_{.} $ the total number of subclasses, being $ b_.=\displaystyle \sum^a_{i=1}b_i $ and the number of observations in the jth subclass of the ith class is $ n_{ij}. $
We assume that the error has a Normal distribution with mean $ 0 $ and variance $ \sigma^{2}_{\varepsilon} $Furthermore, we have that the errors are mutually independent. With this, we obtain
$$\varepsilon_{k(ij)}\sim N(0,\sigma^{2}_{\varepsilon}).$$
Now, for the purpose $ \alpha_i $, we assume that it has a Normal distribution with zero mean and variance $ \sigma^2_{\alpha}, $ and we have that the effects are mutually independent. So,
$$\alpha_{i}\sim N(0,\sigma^{2}_{\alpha}).$$
And finally, to that end $ \beta_{j(i)} $, we assume that it has a Normal distribution with zero mean and variance $ \sigma^2_{\beta(\alpha)}, $ and we have that the effects are mutually independent. So,
$$\beta_{j(i)}\sim N(0,\sigma^{2}_{\beta(\alpha)}).$$
9.5.2.1 Decomposition of the Total Sum of Squares
For model (2.2.1) we define the sum of squares as follows
$$SQT=\sum^a_{i=1}n_{i.}(\overline{y_{i..}}-\overline{y_{…}})^2+\sum^a_{i=1}\sum^{b_i}_{j=1}n_{ij}(\overline{y_{ij.}}-\overline{y_{i..}})^2+\sum^a_{i=1}\sum^{b_i}_{j=1}\sum^{n_{ij}}_{k=1}(y_{ijk}-\overline{y_{ij.}})^2=$$
$$=\underbrace{\sum^a_{i=1}\frac{y^2_{i..}}{n_{i.}}-\frac{y^2_{…}}{N}}_{SQA}+\underbrace{\sum^a_{i=1}\sum^{b_i}_{j=1}\frac{y^2_{ij.}}{n_{ij}}-\sum^a_{i=1}\frac{y^2_{i..}}{n_{i.}}}_{SQB(A)}+\underbrace{\sum^a_{i=1}\sum^{b_i}_{j=1}\sum^{n_{ij}}_{k=1}y^2_{ijk}-\sum^a_{i=1}\sum^{b_i}_{j=1}\frac{y^2_{ij.}}{n_{ij}}}_{SQE}=$$
$$=\sum^a_{i=1}\sum^{b_i}_{j=1}\sum^{n_{ij}}_{k=1}y^2_{ijk}-\frac{y^2_{…}}{N} \tag{2.2.1.1}$$
Notes:
Factor A’s Sum of Squares (SQA) is the deviation of the estimated means in each treatment (level) around the general mean of the data. Represents the variability due to different levels of factor A.
Sum of Squares of B hierarchized under factor A (SQB(A)) is the deviation of the observations around the estimated mean of its level (treatment) B hierarchized under level A and the estimated means in each treatment at level A. It represents the variability of the level of factor B hierarchized under level A.
Sum of Squares Error (SQE) is the deviation of observations around the estimated mean of their level (treatment) B hierarchized under level A. It represents the variability of the random component of the error.
Degrees of freedom and variance estimates
Firstly, the assumptions of model (2.2.1) are
$$E(\alpha_i)=E(\beta_{j(i)})=E(\varepsilon_{k(ij)})=0,$$
$$E(\alpha^2_{i})=\sigma^2_{\alpha},~~~~~~E(\beta^2_{j(i)})=\sigma^2_{\beta},~~~~~~E(\varepsilon^2_{k(ij)})=\sigma^2_{\varepsilon}$$
Furthermore, all covariances between the elements of the same random variable and any pair of random variables are equal to zero. Now, let’s calculate the expected values of the sums of squares.
$$E(SQE)=E\left(\sum^a_{i=1}\sum_{j=1}^{b_i}\sum^{n_{ij}}_{k=1}y^2_{ijk}-\sum_{i=1}^a\sum_{j=1}^{b_i}\frac{y^2_{ij.}}{n_{ij}}\right)=\sum^a_{i=1}\sum^{b_i}_{j=1}\sum^{n_{ij}}_{k=1}E(y^2_{ijk})-\sum^a_{i=1}\sum_{j=1}^{b_i}E\left(\frac{y^2_{ij.}}{n_{ij}}\right)=$$
$$=\sum_{i=1}^a\sum_{j=1}^{b_i}\sum^{n_{ij}}_{k=1}E[(\mu+\alpha_i+\beta_{j(i)}+\varepsilon_{k(ij)})^2]-\sum_{i=1}^a\sum_{j=1}^{b_i}\frac{1}{n_{ij}}E\left[ \left( \displaystyle\sum_{k=1}^{n_{ij}}y_{ijk}\right)^2\right]=$$
$$=\sum^a_{i=1}\sum^{b_i}_{j=1}\sum^{n_{ij}}_{k=1}[\mu^2+\sigma^2_{\alpha}+\sigma^2_{\beta}+\sigma^2_{\varepsilon}]-\sum^a_{i=1}\sum^{b_i}_{j=1}\frac{1}{n_{ij}}E\left[\left(n_{ij}(\mu+\alpha_i+\beta_{j(i)})+\sum^{n_{ij}}_{k=1}\varepsilon_{k(ij)}\right)^2\right]=$$
$$=N(\mu^2+\sigma^2_{\alpha}+\sigma^2_{\beta}+\sigma^2_{\varepsilon})-\sum^a_{i=1}\sum^{b_i}_{j=1}\frac{1}{n_{ij}}[n^2_{ij}(\mu^2+\sigma^2_{\alpha}+\sigma^2_{\beta})+n_{ij}\sigma^2_{\varepsilon}]=$$
$$=N(\mu^2+\sigma^2_{\alpha}+\sigma^2_{\beta}+\sigma^2_{\varepsilon})-\sum^a_{i=1}\sum^{b_i}_{j=1}[n_{ij}(\mu^2+\sigma^2_{\alpha}+\sigma^2_{\beta})+\sigma^2_{\varepsilon}]=$$
$$=N(\mu^2+\sigma^2_{\alpha}+\sigma^2_{\beta}+\sigma^2_{\varepsilon})-N(\mu^2+\sigma^2_{\alpha}+\sigma^2_{\beta})-b_{.}\sigma^2_{\varepsilon}=$$
$$=(N-b_{.})\sigma^2_{\varepsilon}$$
Now we will calculate the expected value of $ SQA. $
$$E(SQA)=E\left(\sum^a_{i=1}\frac{y^2_{i..}}{n_{i.}}-\frac{y^2_{…}}{N}\right)=\sum^a_{i=1}\frac{1}{n_{i.}}E\left(y^2_{i..}\right)-\frac{1}{N}E\left(y^2_{…}\right)=$$
$$=\sum^a_{i=1}\frac{1}{n_{i.}}E\left[\left(n_{i.}(\mu+\alpha_i)+\sum^{b_i}_{j=1}n_{ij}\beta_{j(i)}+\sum^{b_i}_{j=1}\sum^{n_{ij}}_{k=1}\varepsilon_{k(ij)}\right)^2\right]-$$
$$-\frac{1}{N}E\left[\left(N\mu+ \sum_{i=1}^{a} n_{i.}\alpha_i + \sum_{i=1}^{a} \sum_{j=1}^{b_i} n_{ij} \beta_{j(i)}+\sum_{i=1}^{a} \sum_{j=1}^{b_i} \sum_{k=1}^{n_{ij}} \varepsilon_{k(ij)}\right)^2\right]=$$
$$=\sum^a_{i=1}\frac{1}{n_{i.}}\left(n^2_{i.}(\mu^2+\sigma^2_{\alpha})+\sum^{b_i}_{j=1}n^2_{ij}\sigma^2_{\beta}+n_{i.}\sigma^2_{\varepsilon}\right)-\frac{1}{N}\left(N^2\mu^2+\sum^{a}_{i=1}n^2_{i.}\sigma^2_{\alpha}+\sum^{a}_{i=1}\sum^{b_i}_{j=1}n^2_{ij}\sigma^2_{\beta}+N\sigma^2_{\varepsilon}\right)=$$
$$=\sum^a_{i=1}\left(n_{i.}(\mu^2+\sigma^2_{\alpha})+\sum^{b_i}_{j=1}\frac{n^2_{ij}}{n_{i.}}\sigma^2_{\beta}+\sigma^2_{\varepsilon}\right)-N\mu^2+\underbrace{\sum^{a}_{i=1}\frac{n^2_{i.}}{N}}_{k_1}\sigma^2_{\alpha}-\underbrace{\sum^{a}_{i=1}\sum^{b_i}_{j=1}\frac{n^2_{ij}}{N}}_{k_3}\sigma^2_{\beta}-\sigma^2_{\varepsilon}=$$
$$=\underbrace{\sum^a_{i=1}n_{i.}}_{N}(\mu^2+\sigma^2_{\alpha})+\underbrace{\sum^a_{i=1}\sum^{b_i}_{j=1}\frac{n^2_{ij}}{n_{i.}}}_{k_{12}}\sigma^2_{\beta}+a\sigma^2_{\varepsilon}-N\mu^2+k_1\sigma^2_{\alpha}-k_3\sigma^2_{\beta}-\sigma^2_{\varepsilon}=$$
$$=N(\mu^2+\sigma^2_{\alpha})+k_{12}\sigma^2_{\beta}+a\sigma^2_{\varepsilon}-N\mu^2+k_1\sigma^2_{\alpha}-k_3\sigma^2_{\beta}-\sigma^2_{\varepsilon}=$$
$$=(a-1)\sigma^2_{\varepsilon}+(k_{12}-k_3)\sigma^2_{\beta}+(N-k_1)\sigma^2_{\alpha}$$
Now we calculate the expected value of $ SQB(A). $
$$E(SQB(A))=E\left(\sum^a_{i=1}\sum^{b_i}_{j=1}\frac{y^2_{ij.}}{n_{ij}}-\sum^a_{i=1}\frac{y^2_{i..}}{n_{i.}}\right)=\sum^a_{i=1}\sum^{b_i}_{j=1}E\left(\frac{y^2_{ij.}}{n_{ij}}\right)-\sum^a_{i=1}E\left(\frac{y^2_{i..}}{n_{i.}}\right)=$$
$$=\sum^a_{i=1}\sum^{b_i}_{j=1}\frac{1}{n_{ij}}E\left[\left(n_{ij}(\mu+\alpha_i+\beta_{j(i)})+\sum^{n_{ij}}_{k=1}\varepsilon_{k(ij)}\right)^2\right]-$$
$$-\sum^a_{i=1}\frac{1}{n_{i.}}E\left[\left(n_{i.}(\mu+\alpha_i)+\sum^{b_i}_{j=1}n_{ij}\beta_{j(i)}+\sum^{b_i}_{j=1}\sum^{n_{ij}}_{k=1}\varepsilon_{k(ij)}\right)^2\right]=$$
$$=\sum^a_{i=1}\sum^{b_i}_{j=1}\frac{1}{n_{ij}}[n^2_{ij}(\mu^2+\sigma^2_{\alpha}+\sigma^2_{\beta})+n_{ij}\sigma^2_{\varepsilon}]-\sum^a_{i=1}\frac{1}{n_{i.}}\left(n^2_{i.}(\mu^2+\sigma^2_{\alpha})+\sum^{b_i}_{j=1}n^2_{ij}\sigma^2_{\beta}+n_{i.}\sigma^2_{\varepsilon}\right)=$$
$$=\sum^a_{i=1}\sum^{b_i}_{j=1}[n_{ij}(\mu^2+\sigma^2_{\alpha}+\sigma^2_{\beta})+\sigma^2_{\varepsilon}]-\sum^a_{i=1}\left(n_{i.}(\mu^2+\sigma^2_{\alpha})+\sum^{b_i}_{j=1}\frac{n^2_{ij}}{n_{i.}}\sigma^2_{\beta}+\sigma^2_{\varepsilon}\right)=$$
$$=N(\mu^2+\sigma^2_{\alpha}+\sigma^2_{\beta})+b_{.}\sigma^2_{\varepsilon}-\underbrace{\sum^a_{i=1}n_{i.}}_{N}(\mu^2+\sigma^2_{\alpha})-\underbrace{\sum^a_{i=1}\sum^{b_i}_{j=1}\frac{n^2_{ij}}{n_{i.}}}_{k_{12}}\sigma^2_{\beta}-a\sigma^2_{\varepsilon}=$$
$$=(b_{.}-a)\sigma^2_{\varepsilon}+(N-k_{12})\sigma^2_{\beta}$$
For model (2.2.1) there is no single analysis of variance, however the form calculated so far is called Type I Sum of Squares and are defined, establishing an analogy with the corresponding terms for balanced data. In figure 9.5.2 we present the different types of sum of squares.
Figure 9.5.2: Different types of sum of squares.
$$E(QME)=E\left[\frac{SQE}{N-b_{.}}\right]=\frac{1}{N-b_{.}}E[SQE]=\sigma^2_{\varepsilon},$$
Therefore, as we argued in the (fixed effects ANOVA) section, the QME is a good estimator for variance because
$$E(QMA)=E\left[\frac{SQA}{a-1}\right]=\frac{1}{a-1}E[SQA]=\frac{1}{a-1}[(a-1)\sigma^2_{\varepsilon}+(k_{12}-k_3)\sigma^2_{\beta}+(N-k_1)\sigma^2_{\alpha}]=$$
$$=\sigma^2_{\varepsilon}+\underbrace{\frac{(k_{12}-k_3)}{a-1}}_{r_1}\sigma^2_{\beta}+\underbrace{\frac{(N-k_1)}{a-1}}_{r_2}\sigma^2_{\alpha}=$$
$$=\sigma^2_{\varepsilon}+r_1\sigma^2_{\beta}+r_2\sigma^2_{\alpha},~~~~~~{e}$$
$$E(QMB(A))=E\left[\frac{SQB(A)}{b_{.}-a}\right]=\frac{1}{b_.-a}E[SQB(A)]=\frac{1}{b_{.}-a}[(b_{.}-a)\sigma^2_{\varepsilon}+(N-k_{12})\sigma^2_{\beta}]=$$
$$=\sigma^2_{\varepsilon}+\underbrace{\frac{(N-k_{12})}{b_.-a}}_{r_3}\sigma^2_{\beta}=$$
$$=\sigma^2_{\varepsilon}+r_3\sigma^2_{\beta}$$
Thus, QMA and QMB(A) are also good estimators for the variance. However, if there is a difference between the means of the levels, the expected values of the mean square of factor A (due to the levels) are greater than $ \sigma^{2}_{\varepsilon}. $ The same goes for factor B.
Therefore, we have the following degrees of freedom:
| Sum of Squares | Degrees of Freedom | Medium Squares |
|---|---|---|
| SQA | $ a-1 $ | $ \cfrac{SQA}{a-1} $ |
| SQB(A) | $ b_.-a $ | $ \cfrac{SQB(A)}{b_.-a} $ |
| SQE | $ N-b_. $ | $ \cfrac{SQE}{N-b_.} $ |
| SQT | $ N-1 $ |
Table 9.5.8: Degrees of freedom
Note that in the case of balanced data, $ b_. = ab, n_{ij}=r $ and $ N=abr $ for all i and j, $ r_1 =r$, $ r_2=br$ and $ r_3 = r. $
Now we show a brief summary of the mean squares expected values.
| Factor | Degrees of Freedom | Medium Squares | Expected Value of Mean Squares |
|---|---|---|---|
| Factor A | $ a-1 $ | $ QMA $ | $ E(QMA)=\sigma^2_\varepsilon+r\sigma^2_\beta+br\sigma^2_\alpha $ |
| Factor B hierarchical to factor A | $ a(b-1) $ | $ QMB(A) $ | $ E[QMB(A)]=\sigma^2_\varepsilon+r\sigma^2_\beta $ |
| Error | $ ab(r-1) $ | $ QME $ | $ E(QME)=\sigma^2_\varepsilon $ |
Table 9.5.9: Expected Values of Mean Squares.
Statistics:
| $ QMA= $ | $ br\displaystyle\sum^a_{i=1}\frac{(\overline{Y_{i..}}-\overline{Y_{…}})^2}{a-1} $ |
|---|---|
| $ QMB(A) $ | $ r\displaystyle\sum^a_{i=1}\sum^b_{j=1}\frac{(\overline{Y_{ij.}}-\overline{Y_{i..}})^2}{a(b-1)} $ |
| $ QME= $ | $ \displaystyle\sum^a_{i=1}\sum^b_{j=1}\sum^r_{k=1}\frac{(\overline{Y_{ijk}}-\overline{Y_{ij.}})^2}{ab(r-1)} $ |
| $ \overline{Y_{ij.}}= $ | $ \displaystyle\sum^r_{j=1}\frac{Y_{ijk}}{r} $ |
| $ \overline{Y_{i..}}= $ | $ \displaystyle\sum^b_{j=1}\sum^r_{k=1}\frac{Y_{ijk}}{br} $ |
| $ \overline{Y_{…}}= $ | $ \displaystyle\sum^a_{i=1}\sum^b_{j=1}\sum^r_{k=1}\frac{Y_{ijk}}{abr} $ |
Table 9.5.10: Summary of mean squares and means for model (2.2.1).
With the results obtained in Table 9.5.9 we have the following estimators:
For the error component we have
$$\hat{\sigma}^2_\varepsilon=QME \tag{2.2.1.2}$$
Now, to calculate the variability for the effect of factor B hierarchical under factor A, we use equation (2.2.1.2) as follows
$$\hat{\sigma}^2_\beta=\frac{QMB(A)-\hat{\sigma}^2_\varepsilon}{r}\overset{(2.2.1.2)}{=}$$
$$=\frac{QMB(A)-QME}{r} \tag{2.2.1.3}$$
Finally, to calculate the variability for the effect of factor A we have
$$\hat{\sigma}^2_\alpha=\frac{QMA-\hat{\sigma}^2_\varepsilon-\hat{\sigma}^2_\beta}{br}\overset{{(2.2.1.2) \hbox{e} (2.2.1.3)}}{=}$$
$$=\frac{QMA-QMB(A)}{br}$$
Table 9.5.11 represents the point estimators of the model (2.2.1).
| Model Representation | Spot Estimator |
|---|---|
| $ \hat{\mu} $ | $ \overline{Y_{…}} $ |
| $ \hat{\sigma}^2_\alpha $ | $ \displaystyle\cfrac{QMA-QMB(A)}{br} $ |
| $ \hat{\sigma}^2_\beta $ | $ \displaystyle\cfrac{QMB(A)-QME}{r} $ |
| $ \hat{\sigma}^2_\varepsilon $ | $ QME $ |
Table 9.5.11: Summary of Point Estimators for model (2.2.1).
9.5.2.2 Statistical Analysis
Under the assumption of normality, QME is statistically independent of QMA and QMB(A) and
$$\frac{SQE}{\sigma^2_{\varepsilon}}\sim \chi^2_{[N-b_{.}]}$$
However, in general, $QMA$ and $QMB(A)$ They do not have a Chi-Square distribution and are not statistically independent. In the special case when $n_{ij} = n_i ( i = 1, 2,…, a )$, it has been demonstrated by Cummings (1972) that $QMA$ and $QMB(A)$ are independent, but they do not have Chi-Square distribution due to different numbers of observations in the subclasses. Cummings (1972) also showed that data with $b_i= 2, n_{i1}= n_1, n_{i2}= n_2 ~ ( i = 1,2,…,a )$ have mean squares $QMA$ and $QMB(A)$ with Chi-Square distribution, but dependent. Now, if we take $n_{ij}= n ~ \hbox{para todo i e j}$, we have to $QMA$ and $QMB(A)$ are independent because
$$\frac{SQB(A)}{(\sigma^2_{\varepsilon}+n \sigma^2_{\beta})}\sim \chi^2_{[b_{.}-a]}$$
but $QMA$, in general, does not have a Chi-Square distribution (see, for example, Scheffé, 1959, p. 252). It has a Chi-Square distribution if and only if $ \sigma^2_{\alpha}= 0. $ Finally, if $b_i= b$ so that the imbalance occurs only in the last step, a method proposed by Khuri (1990) can be used to construct a set of jointly independent sums of squares each having an exact Chi-Square distribution.
Hypothesis Testing
Let’s consider the problem of hypothesis testing
$$ \begin{cases} H_0: \sigma^2_{\beta(\alpha)} = 0 \cr H_1: \sigma^2_{\beta(\alpha)} > 0 \end{cases} \tag{2.2.2.2}$$
and
$$ \begin{cases} H_0: \sigma^2_\alpha = 0 \cr H_1: \sigma^2_{\alpha} > 0 \end{cases} \tag{2.2.2.3}$$
using the results of analysis of variance based on type I sum of squares (see figure 9.5.2).
For the test $ \sigma^2_{\beta}=0 $ in (2.2.2.2) note that QME and QMB(A) are independent, with QME and QMB(A) having a scale-corrected Chi-Square distribution, and furthermore, under the null hypothesis, they have the same expected value. Therefore, a test statistic is constructed by the ratio of variances.
$$F^B_{0}=\cfrac{\cfrac{SQB(A)}{b_{.}-a}}{\cfrac{SQE}{N-b_{.}}}=\cfrac{QMB(A)}{QME}\sim F_{(b_{.}-a,~N-b_{.})}~ \tag{2.2.2.4}$$
The test based on the statistic in (2.2.2.4) is exact and is equivalent to the corresponding test for balanced data. It has been demonstrated that there is no uniformly most powerful invariant or uniformly most powerful unbiased invariant test. However, Hussein and Milliken (1978) discuss an exact test for $σ^2_{β(α)}= 0$ in (2.2.2.2), when $ \beta_{j(i)} $ have heterogeneous variance structure.
In the unbalanced model in (2.2.1), there is no exact test for $σ^2_α= 0$ in (2.2.2.2). We have to $QMA$ and $QMB(A)$ are not independent and do not have a scale-corrected Chi-Square distribution, the usual test based on statistics $ \frac{QMA}{QMB(A)} $ is no longer applicable. A common procedure is to ignore the assumption of independence and Chi-Square distribution and construct a synthetic F-test using mean squares based on the Satterthwaite procedure (see, for example, Cummings and Gaylor, 1974). To construct a pseudo test $F$ we can obtain a numerator component or a denominator component of the test statistic, or both. To construct a component of the denominator of the test statistic for $σ^2_α=0$ we obtain a linear combination of $QMB(A)$ and $QME$ which has the same expected value $ \sigma^2_{\varepsilon}+r_3 \sigma^2_{\beta}. $ Thus, the statistic is given by
$$QM_{Den}=\frac{r_1}{r_3}QMB(A)+\left(1-\frac{r_1}{r_3}\right)QME \tag{2.2.2.5}$$
Now, we assume that $QMB(A)$ has Chi-Square distribution with scale correction and is independent of $QMA$. Since, $QME$ has Chi-Square distribution with scale correction and is independent of $QMB(A)$ and $QMA$, the linear combination (2.2.2.5) is approximated by a scale-corrected Chi-Square distribution. Be $(N-a)$ the degree of freedom of the approximate Chi-Square statistic given by (2.2.2.5). So, the test procedure to test $σ^2_α= 0$ in (2.2.2.3) is based on the statistics
$$F^{A*}_{0}=\frac{QMA}{QM_{Den}}\sim F_{(a-1,~N-a)} \tag{2.2.2.6}$$
that we assume that they follow an approximate F distribution with $a - 1$ and $N - a$ degrees of freedom. Note that when $r1 > r3$, the coefficient $ 1 - \frac{r_1}{r_3}$, may take on a negative value that may affect the accuracy of the F test.
Some authors have ignored the unbalanced experiment structure and used the conventional statistics-based F test.
$$F^A_{0}=\frac{QMA}{QMB(A)}\sim F_{(a-1,~b_.-a)} \tag{2.2.2.7}$$
Tietjen (1974) investigated the sample size and test power of the statistics in (2.2.2.6) and (2.2.2.7) for a variety of unbalanced experiments using Monte Carlo simulation. He found that under the null hypothesis the test statistic in (2.2.2.7) was always in the range (0.044, 0.058) for all 61 experiments he studied, and in general its performance was much better than the statistic in (2.2.2.6). Cummings and Gaylor (1974) also investigated the effect of violating the independence and Chi-Square distribution assumptions on test convergence and using the procedures based on the test statistic in (2.2.2.6) and reported that dependence and non-Chi-Square distribution appear to have a canceling effect and the procedure appears to be satisfactory. Their results appear to indicate that the test convergence of this statistic is only slightly affected for a wide range of variance component relationships and unbalanced experiments. Tan and Cheng (1984) studied the performance of the test procedures in (2.2.2.6) and (2.2.2.7), using a best approximation for the distribution of the test statistic based on the Laguerre polynomial expansion, and found that they all performed satisfactorily, but the test statistic in (2.2.2.7) is inferior for extremely unbalanced experiments and cannot be recommended for general use.
Therefore, after all the results presented, we will present the ANOVA table with random effects using the hierarchical method for tests (2.2.2.6) and (2.2.2.7).
| Factor | Degrees of Freedom | Sum of Squares | Medium Squares | F-statistic | p-value |
|---|---|---|---|---|---|
| Factor A | $ a-1 $ | SQA | QMA | $ F_A=\frac{QMA}{QMB(A)} $ | $ P(F> F_A) $ |
| Factor B hierarchical to factor A | $ b_.-1 $ | SQB(A) | QMB(A) | $ F_B=\frac{QMB(A)}{QME} $ | $ P(F> F_B) $ |
| Error | $ N-b_. $ | SQE | QME | ||
| Total | $ N-1 $ | SQT |
Table 9.5.12: ANOVA table based on F statistics.
9.5.2.3 Estimation of model parameters
We now present the confidence intervals for the parameters in the hierarchical method in which $ F_{\alpha,n_1, n_2} $ represents the quantile $ (1-\alpha)100 \char37 $ of F-Snedecor distribution with $n_1$ degrees of freedom in the numerator and $n_2$ degrees of freedom in the denominator. To construct these intervals, we will use constant, as in the ANOVA chapter with 1 random factor. Table 9.5.13 represents the particular case of model (2.2.1).
To facilitate notation, we define $ n_1=a-1 $, $ n_2=a(b-1) $, $ n_3=a~b~(r-1) $ and $ w=b(a) $
| Constant | Definition |
|---|---|
| $ G_a $ | $ 1-F_{\left(\frac{\alpha}{2},\infty,n_1\right)} $ |
| $ G_b $ | $ 1-F_{\left(\frac{\alpha}{2},\infty,n_2\right)} $ |
| $ G_e $ | $ 1-F_{\left(\frac{\alpha}{2},\infty,n_3\right)} $ |
| $ G_c $ | $ F_{\left(1-\frac{\alpha}{2},\infty,(n_1+n_2)\right)}-1 $ |
| $ H_a $ | $ F_{\left(1-\frac{\alpha}{2},\infty,n_1\right)}-1 $ |
| $ H_b $ | $ F_{\left(1-\frac{\alpha}{2},\infty,n_2\right)}-1 $ |
| $ H_e $ | $ F_{\left(1-\frac{\alpha}{2},\infty,n_3\right)}-1 $ |
| $ H_c $ | $ F_{\left(1-\frac{\alpha}{2},\infty,(n_1+n_2)\right)}-1 $ |
| $ F_{ae1} $ | $ F_{\left(\frac{\alpha}{2},n_1,n_3\right)} $ |
| $ F_{ae2} $ | $ F_{\left(1-\frac{\alpha}{2},n_1,n_3\right)} $ |
| $ F_{ba1} $ | $ F_{\left(1-\frac{\alpha}{2},n_2,n_3\right)} $ |
| $ F_{ba2} $ | $ F_{\left(\frac{\alpha}{2},n_2,n_3\right)} $ |
| $ G_{ae} $ | $ \cfrac{(F_{ae1}-1)^2-(G_a F_{ae1})^2-H^2_e}{F_{ae1}} $ |
| $ H_{ae} $ | $ \cfrac{(1-F_{ae2})^2-(H_a F_{ae2})^2-G^2_e}{F_{ae2}} $ |
| $ G_{be} $ | $ \cfrac{(F_{wa1}-1)^2-(G_w F_{wa1})^2-H^2_e}{F_{ae1}} $ |
| $ H_{be} $ | $ \cfrac{(1-F_{wa2})^2-(H_w F_{wa2})^2-G^2_e}{F_{ae2}} $ |
| $ G_{aw} $ | $ \cfrac{(n_1+n_2)^2}{n_1~n_2}G^2_c-\frac{n_1}{n_2}G^2_a-\frac{n_2}{n_1}G^2_w $ |
Table 9.5.13: Constants for constructing confidence intervals for the model parameters.
Confidence interval for $ \mu_y $
For model (2.2.1), several methods were studied for constructing confidence intervals for $ \mu_y $. Therefore, the confidence interval for $ \mu_y $ is given by:
$$LI_{\mu_y}=\overline{Y_{…}}-\sqrt{\frac{QMA~F_{(1-\alpha,1,n_1)}}{a~b~r}}$$
and
$$LS_{\mu_y}=\overline{Y_{…}}+\sqrt{\frac{QMA~F_{(1-\alpha,1,n_1)}}{a~b~r}} \tag{2.2.3.1}$$
Confidence interval for $ \sigma^2_\alpha $
For the confidence interval for $ \sigma^2_\alpha, $ we have to
$$\hat{\sigma}^2_\alpha=\frac{QMA-QMB(A)}{a~r}$$
Thus, when we involve the difference of two mean squares, we have a confidence interval of:
$$LI_{\sigma^2_\alpha}=\hat{\sigma}^2_\alpha-\frac{\sqrt{V_{LA}}}{b~r}$$
and
$$LS_{\sigma^2_\alpha}=\hat{\sigma}^2_\alpha+\frac{\sqrt{V_{UA}}}{b~r}$$
in which
$$V_{LA}=G^2_a*QMA^2+H^2_i*QMB(A)^2+G_{aw}*QMA*QMB(A)$$
and
$$V_{UA}=H^2_a*QMA^2+G^2_i*QMB(A)^2+H_{aw}*QMA*QMB(A)$$
Confidence interval for $ \sigma^2_{\beta(\alpha)} $
For the confidence interval for $ \sigma^2_{\beta(\alpha)}, $ we have to
$$\hat{\sigma}^2_{\beta(\alpha)}=\frac{QMB(A)-QME}{r}$$
Thus, when we involve the difference of two mean squares, we have a confidence interval of:
$$LI_{\sigma^2_{\beta(\alpha)}}=\hat{\sigma}^2_{\beta(\alpha)}-\frac{\sqrt{V_{L{B(A)}}}}{r}$$
and
$$LS_{\sigma^2_{\beta(\alpha)}}=\hat{\sigma}^2_{\beta(\alpha)}+\frac{\sqrt{V_{U{B(A)}}}}{r} \tag{2.2.3.2}$$
in which
$$V_{L{B(A)}}=G^2_w*QM{B(A)}^2+H^2_e*QME^2+G_{ew}*QM{B(A)}*QME$$
and
$$V_{U{B(A)}}=H^2_w*QM{B(A)}^2+G^2_e*QME^2+H_{we}*QM{B(A)}*QME$$
Confidence interval for $ \sigma^2_\varepsilon $
For the confidence interval for $ \sigma^2_\varepsilon, $ we have to
$$\hat{\sigma}^2_\varepsilon=QME$$
Therefore, the confidence interval for $ \sigma^2_\varepsilon $ is given by
$$LI_{\sigma^2_\varepsilon}=(1-G_e) QME$$
and
$$LS_{\sigma^2_\varepsilon}=(1+H_e) QME \tag{2.2.3.3}$$