7 min read

Comparisons of several means

  • Paired Comparisons:
    If there are \(2\) treatments over multivariate \(\mathbf x_p\), the difference between treatment \(1\) and treatment \(2\) is \(\mathbf d_j=\mathbf x_{j1}-\mathbf x_{j2},\quad j=1,2,\cdots,n\) if \(\mathbf d_j\) are independent \(N_p(\boldsymbol\delta, \mathbf\Sigma_d)\) random vectors, inferences about the vector of mean differences \(\boldsymbol\delta\) can be based upon a \(T^2\)-statistic: \(T^2=n(\overline{\mathbf d}-\boldsymbol\delta)^T\mathbf S_d^{-1}(\overline{\mathbf d}-\boldsymbol\delta)\) is distributed as an \(\frac{(n-1)p}{n-p}F_{p,n-p}\) random variable, where \(\overline{\mathbf d}=\displaystyle\frac{1}{n}\displaystyle\sum_{j=1}^{n}\mathbf d_j\) and \(\mathbf S_d=\displaystyle\frac{1}{n-1}\displaystyle\sum_{j=1}^{n}(\mathbf d_j-\overline{\mathbf d})(\mathbf d_j-\overline{\mathbf d})^T\), then an \(\alpha\)-level hypothesis test of \(H_0:\boldsymbol\delta=\mathbf 0\) versus \(H_1:\boldsymbol\delta\ne\mathbf 0\), rejects \(H_0\) if the observed \(T^2=n\overline{\mathbf d}^T\mathbf S_d^{-1}\overline{\mathbf d}>\frac{(n-1)p}{n-p}F_{p,n-p}(\alpha)\).
    A \(100(1-\alpha)\%\) confidence region for \(\boldsymbol\delta\) is the ellipsoid determined by all \(\boldsymbol\delta\) that \((\overline{\mathbf d}-\boldsymbol\delta)^T\mathbf S_d^{-1}(\overline{\mathbf d}-\boldsymbol\delta)\le\frac{(n-1)p}{n(n-p)}F_{p,n-p}(\alpha)\) and \(100(1-\alpha)\%\) simultaneous confidence intervals for the individual mean differences \(\delta_i\) are given by \(\Biggl(\overline{d_i}-\sqrt{\frac{(n-1)p}{(n-p)}F_{p,n-p}(\alpha)}\sqrt{\frac{s_{ii}}{n}},\quad \overline{d_i}+\sqrt{\frac{(n-1)p}{(n-p)}F_{p,n-p}(\alpha)}\sqrt{\frac{s_{ii}}{n}}\Biggr)\)
    and the Bonferroni simultaneous confidence intervals for the individual mean differences are \(\Biggl(\overline{d_i}-t_{n-1}(\frac{\alpha}{2p})\sqrt{\frac{s_{ii}}{n}},\quad \overline{d_i}+t_{n-1}(\frac{\alpha}{2p})\sqrt{\frac{s_{ii}}{n}}\Biggr)\)

  • Repeated Measures Design and many to one Comparisons of univariate variables:
    For univariate variables, \(q\) treatments and \(n\) observations for each treatment, \[\mathbf X_j=\begin{bmatrix} X_j1\\ X_j2\\ \vdots\\ X_jq\\ \end{bmatrix}\quad j=1,2,\cdots,n \] and the \(q-1\) treatments are compared with respect to a single treatment, the contrasts of the components of \(\boldsymbol\mu\) is \[\underset{(q-1)\times 1}{\underbrace{\begin{bmatrix} \mu_1-\mu_2\\ \mu_1-\mu_3\\ \vdots\\ \mu_1-\mu_q\\ \end{bmatrix}}}=\underset{(q-1)\times q}{\underbrace{\begin{bmatrix} 1&-1&0&\cdots&0\\ 1&0&-1&\cdots&0\\ \vdots&\vdots&\vdots&\ddots&\vdots\\ 1&0&0&\cdots&-1\\ \end{bmatrix}}}\underset{q\times 1}{\underbrace{\begin{bmatrix} \mu_1\\ \mu_2\\ \vdots\\ \mu_q\\ \end{bmatrix}}}=\mathbf C_1\boldsymbol\mu\] \(\mathbf C_1\) is called contrast matrice. The hypothesis that there are no differences in treatments (equal treatment means) becomes \(\mathbf C\boldsymbol\mu=\mathbf 0\) for any choice of the contrast matrix \(\mathbf C\). The contrasts of the observations \(\mathbf C\mathbf x_j\) have means \(\mathbf C\overline{\mathbf x}\) with \((q-1)\) d.f. and covariance matrix \(\mathbf C\mathbf S\mathbf C^T\) with \((n-q+1)\) d.f., An \(\alpha\)-level test of \(H_0:\mathbf C\boldsymbol\mu=\mathbf 0\) versus \(H_1:\mathbf C\boldsymbol\mu\ne\mathbf 0\) can use \(T^2\)-statistic. Reject \(H_0\) if: \(T^2=n(\mathbf C\overline{\mathbf x})^T(\mathbf C\mathbf S\mathbf C^T)^{-1}(\mathbf C\overline{\mathbf x})>\displaystyle\frac{(n-1)(q-1)}{n-q+1}F_{q-1,n-q+1}(\alpha)\) where \(\overline{\mathbf x}=\displaystyle\frac{1}{n}\displaystyle\sum_{j=1}^{n}\mathbf x_j\) and \(\mathbf S=\displaystyle\frac{1}{n-1}\displaystyle\sum_{j=1}^{n}(\mathbf x_j-\overline{\mathbf x})(\mathbf x_j-\overline{\mathbf x})^T\) A \(100(1-\alpha)\%\) confidence region for contrasts \(\mathbf C\boldsymbol\mu\) is determined by the set of all \(\mathbf C\boldsymbol\mu\) such that:\(n(\mathbf C\overline{\mathbf x}-\mathbf C\boldsymbol\mu)^T(\mathbf C\mathbf S\mathbf C^T)^{-1}(\mathbf C\overline{\mathbf x}-\mathbf C\boldsymbol\mu)\le\displaystyle\frac{(n-1)(q-1)}{n-q+1}F_{q-1,n-q+1}(\alpha)\) and \(100(1-\alpha)\%\) simultaneous confidence intervals for the individual contrasts \(\mathbf c^T\boldsymbol\mu\) are given by \(\Biggl(\mathbf c^T\overline{\mathbf x}-\sqrt{\frac{(n-1)(q-1)}{n-q+1}F_{q-1,n-q+1}(\alpha)}\sqrt{\frac{\mathbf c^T\mathbf S\mathbf c}{n}},\quad \mathbf c^T\overline{\mathbf x}+\sqrt{\frac{(n-1)(q-1)}{n-q+1}F_{q-1,n-q+1}(\alpha)}\sqrt{\frac{\mathbf c^T\mathbf S\mathbf c}{n}}\Biggr)\)

  • \(p\)-variate two independent population mean vectors comparison:
    population \(1\): \(\mathbf X_{11},\mathbf X_{12},\cdots,\mathbf X_{1n_1}\) with size \(n1\), mean vector \(\boldsymbol\mu_1\) and covariance matrix \(\mathbf\Sigma_1\);
    population \(2\): \(\mathbf X_{21},\mathbf X_{22},\cdots,\mathbf X_{2n_2}\) with size \(n2\), mean vector \(\boldsymbol\mu_2\) and covariance matrix \(\mathbf\Sigma_2\)

  • When \(\mathbf\Sigma_1=\mathbf\Sigma_2=\mathbf\Sigma\), and both populations are multivariate normal, \(\displaystyle\sum_{j=1}^{n_1}(\mathbf X_{1j}-\overline{\mathbf X}_{1})(\mathbf X_{1j}-\overline{\mathbf X}_{1})^T\) is an estimate of \((n_1-1)\mathbf\Sigma\) and \(\displaystyle\sum_{j=1}^{n_2}(\mathbf X_{2j}-\overline{\mathbf X}_{2})(\mathbf X_{2j}-\overline{\mathbf X}_{2})^T\) is an estimate of \((n_2-1)\mathbf\Sigma\) The common covariance \(\mathbf\Sigma\) can be estimated using both samples \[\begin{align} \mathbf S_{pooled}&=\displaystyle\frac{\displaystyle\sum_{j=1}^{n_1}(\mathbf X_{1j}-\overline{\mathbf X}_{1})(\mathbf X_{1j}-\overline{\mathbf X}_{1})^T+\displaystyle\sum_{j=1}^{n_2}(\mathbf X_{2j}-\overline{\mathbf X}_{2})(\mathbf X_{2j}-\overline{\mathbf X}_{2})^T}{n_1+n_2-2}\\ &=\displaystyle\frac{(n_1-1)\mathbf S_1+(n_2-1)\mathbf S_2}{n_1+n_2-2}\\ &=\displaystyle\frac{\mathbf W_{n_1-1}(\mathbf\Sigma)+\mathbf W_{n_2-1}(\mathbf\Sigma)}{n_1+n_2-2}\\ &=\displaystyle\frac{\mathbf W_{n_1+n_2-2}(\mathbf\Sigma)}{n_1+n_2-2} \end{align}\]Because \(E(\overline{\mathbf X}_{1}-\overline{\mathbf X}_{2})=E(\overline{\mathbf X}_{1})-E(\overline{\mathbf X}_{2})=\boldsymbol\mu_1-\boldsymbol\mu_2\) and \(Cov(\overline{\mathbf X}_{1}-\overline{\mathbf X}_{2})=Cov(\overline{\mathbf X}_{1})+Cov(\overline{\mathbf X}_{2})=(\frac{1}{n_1}+\frac{1}{n_2})\mathbf\Sigma\) and \(\mathbf S_{pooled}\) is an estimate of \(\mathbf\Sigma\), \(T^2\) statistical \[\begin{align} T^2&=\Bigl[(\overline{\mathbf X}_{1}-\overline{\mathbf X}_{2})-(\boldsymbol\mu_1-\boldsymbol\mu_2)\Bigr]^T\Bigl[(\frac{1}{n_1}+\frac{1}{n_2})\mathbf S_{pooled}\Bigr]^{-1}\Bigl[(\overline{\mathbf X}_{1}-\overline{\mathbf X}_{2})-(\boldsymbol\mu_1-\boldsymbol\mu_2)\Bigr]\\ &=\Bigl(\frac{1}{n_1}+\frac{1}{n_2}\Bigr)^{-1/2}\Bigl[(\overline{\mathbf X}_{1}-\overline{\mathbf X}_{2})-(\boldsymbol\mu_1-\boldsymbol\mu_2)\Bigr]^T\mathbf S_{pooled}^{-1}\Bigl(\frac{1}{n_1}+\frac{1}{n_2}\Bigr)^{-1/2}\Bigl[(\overline{\mathbf X}_{1}-\overline{\mathbf X}_{2})-(\boldsymbol\mu_1-\boldsymbol\mu_2)\Bigr]\\ &=\Bigl(\text{multivariate normal vector}\Bigr)^T\Bigl(\frac{\text{Wishart random matrix}}{d.f.}\Bigr)^{-1}\Bigl(\text{multivariate normal vector}\Bigr)\\ &=N_p(\mathbf 0, \mathbf\Sigma)^T\Bigl(\frac{\mathbf W_{n_1+n_2-2}(\mathbf\Sigma)}{n_1+n_2-2}\Bigr)^{-1}N_p(\mathbf 0, \mathbf\Sigma) \end{align}\]is distributed as\(\displaystyle\frac{(n_1+n_2-2)p}{n_1+n_2-p-1}F_{p,n_1+n_2-p-1}\) and \(P\Biggl[\Bigl[(\overline{\mathbf X}_{1}-\overline{\mathbf X}_{2})-(\boldsymbol\mu_1-\boldsymbol\mu_2)\Bigr]^T\Bigl[(\frac{1}{n_1}+\frac{1}{n_2})\mathbf S_{pooled}\Bigr]^{-1}\Bigl[(\overline{\mathbf X}_{1}-\overline{\mathbf X}_{2})-(\boldsymbol\mu_1-\boldsymbol\mu_2)\Bigr]\le\displaystyle\frac{(n_1+n_2-2)p}{n_1+n_2-p-1}F_{p,n_1+n_2-p-1}(\alpha)\Biggl]=1-\alpha\)

  • The contrasts of sample means \(\mathbf a^T(\overline{\mathbf X}_{1}-\overline{\mathbf X}_{2})\) has \(E(\mathbf a^T(\overline{\mathbf X}_{1}-\overline{\mathbf X}_{2}))=\mathbf a^T(\boldsymbol\mu_1-\boldsymbol\mu_2)\) and \(Cov(\mathbf a^T(\overline{\mathbf X}_{1}-\overline{\mathbf X}_{2}))=\mathbf a^T(\frac{n_1-1}{n_1+n_2-2}\mathbf S_1+\frac{n_2-1}{n_1+n_2-2}\mathbf S_2)\mathbf a=\mathbf a^T\mathbf S_{pooled}\mathbf a\) and then \(t^2=\frac{\Bigl[\mathbf a^T(\overline{\mathbf X}_{1}-\overline{\mathbf X}_{2})-\mathbf a^T(\boldsymbol\mu_1-\boldsymbol\mu_2)\Bigr]^2}{\Bigl(\displaystyle\frac{1}{n_1}+\displaystyle\frac{1}{n_2}\Bigr)\mathbf a^T\mathbf S_{pooled}\mathbf a}=\frac{\Bigl[\mathbf a^T(\overline{\mathbf X}_{1}-\overline{\mathbf X}_{2}-(\boldsymbol\mu_1-\boldsymbol\mu_2)\Bigr]^2}{\Bigl(\displaystyle\frac{1}{n_1}+\displaystyle\frac{1}{n_2}\Bigr)\mathbf a^T\mathbf S_{pooled}\mathbf a}\le\Bigl[(\overline{\mathbf X}_{1}-\overline{\mathbf X}_{2})-(\boldsymbol\mu_1-\boldsymbol\mu_2)\Bigr]^T\Bigl[(\frac{1}{n_1}+\frac{1}{n_2})\mathbf S_{pooled}\Bigr]^{-1}\Bigl[(\overline{\mathbf X}_{1}-\overline{\mathbf X}_{2})-(\boldsymbol\mu_1-\boldsymbol\mu_2)\Bigr]=T^2\) So, \((1-\alpha)=P\Bigl[T^2\le\displaystyle\frac{(n_1+n_2-2)p}{n_1+n_2-p-1}F_{p,n_1+n_2-p-1}(\alpha)\Bigr]\) and the \(100(1-\alpha)\%\) simultaneous confidence intervals for the contrasts \(\mathbf a^T(\boldsymbol\mu_1-\boldsymbol\mu_2)\) are given by \(\Biggl(\mathbf a^T(\overline{\mathbf X}_{1}-\overline{\mathbf X}_{2})\pm\sqrt{\displaystyle\frac{(n_1+n_2-2)p}{n_1+n_2-p-1}F_{p,n_1+n_2-p-1}(\alpha)}\sqrt{\mathbf a^T\Bigl(\frac{1}{n_1}+\frac{1}{n_2}\Bigr)\mathbf S_{pooled}\mathbf a}\Biggr)\) and the Bonferroni \(100(1-\alpha)\%\) simultaneous confidence intervals for the individual mean differences are \(\mu_{1i}-\mu_{2i}:(\overline{x}_{1i}-\overline{x}_{2i})\pm t_{n_1+n_2-2}(\frac{\alpha}{2p})\sqrt{(\frac{1}{n_1}+\frac{1}{n_2})s_{ii,pooled}}\)

  • One-way Multivariate Analysis of Variance (MANOVA):
    In randomized one-way design experiments for multivariate \(\mathbf x_p\), there are \(k\) treatments and \(n_i\quad (i=1,2,3,\cdots,k)\) samples for each treatment, for treatment \(i\) the samples are \(\mathbf x_{i1},\mathbf x_{i2},\cdots,\mathbf x_{ij},\cdots,\mathbf x_{in_i}\quad (j=1,2,3,\cdots,n_i)\). We assume that 1) The random samples from different populations are independent, 2) All populations have a common covariance matrix \(\mathbf\Sigma\), 3) Each population is multivariate normal \(N_p(\boldsymbol\mu_i, \mathbf\Sigma)\). \(\underset{i^{th}\text{ population}\\\ \text{mean}}{\boldsymbol\mu_i}=\underset{\text{overall}\\\ \text{mean}}{\boldsymbol\mu}+\underset{i^{th}\text{ treatment}\\\ \text{effect}}{\boldsymbol\tau_i}\) and \(\mathbf x_{ij}=\underset{\text{overall}\\\ \text{mean}}{\boldsymbol\mu}+\underset{i^{th}\text{ treatment}\\\ \text{effect}}{\boldsymbol\tau_i}+\underset{\text{random}\\\ \text{error}}{\mathbf e_{ij}}\) and \(\displaystyle\sum_{i=1}^{k}n_i\boldsymbol\tau_i=\displaystyle\sum_{i=1}^{k}n_i(\boldsymbol\mu_i-\boldsymbol\mu)=\displaystyle\sum_{i=1}^{k}n_i\boldsymbol\mu_i-\displaystyle\sum_{i=1}^{k}n_i\boldsymbol\mu=0\) the analysis of variance is based upon an analogous decomposition of the observations, \(\underset{\text{observation}}{\mathbf x_{ij}}=\underset{\text{overall mean}}{\overline{\mathbf x}}+\underset{\text{ith treatment effect}}{(\overline{\mathbf x}_i-\overline{\mathbf x})}+\underset{\text{error}}{(\mathbf x_{ij}-\overline{\mathbf x}_i)}\) Then \(\mathbf x_{ij}-\overline{\mathbf x}=(\overline{\mathbf x}_i-\overline{\mathbf x})+(\mathbf x_{ij}-\overline{\mathbf x}_i)\), square both side we have \((\mathbf x_{ij}-\overline{\mathbf x})(\mathbf x_{ij}-\overline{\mathbf x})^T=(\overline{\mathbf x}_i-\overline{\mathbf x})(\overline{\mathbf x}_i-\overline{\mathbf x})^T+2(\overline{\mathbf x}_i-\overline{\mathbf x})(\mathbf x_{ij}-\overline{\mathbf x}_i)+(\mathbf x_{ij}-\overline{\mathbf x}_i)(\mathbf x_{ij}-\overline{\mathbf x}_i)^T\) sum both side over \(j\) we have

\[\begin{align} \displaystyle\sum_{j=1}^{n_i}(\mathbf x_{ij}-\overline{\mathbf x})(\mathbf x_{ij}-\overline{\mathbf x})^T&=\displaystyle\sum_{j=1}^{n_i}(\overline{\mathbf x}_i-\overline{\mathbf x})(\overline{\mathbf x}_i-\overline{\mathbf x})^T+2\displaystyle\sum_{j=1}^{n_i}(\overline{\mathbf x}_i-\overline{\mathbf x})(\mathbf x_{ij}-\overline{\mathbf x}_i)+\displaystyle\sum_{j=1}^{n_i}(\mathbf x_{ij}-\overline{\mathbf x}_i)(\mathbf x_{ij}-\overline{\mathbf x}_i)^T\\ &=\displaystyle\sum_{j=1}^{n_i}(\overline{\mathbf x}_i-\overline{\mathbf x})(\overline{\mathbf x}_i-\overline{\mathbf x})^T+\displaystyle\sum_{j=1}^{n_i}(\mathbf x_{ij}-\overline{\mathbf x}_i)(\mathbf x_{ij}-\overline{\mathbf x}_i)^T\\ &=n_i(\overline{\mathbf x}_i-\overline{\mathbf x})(\overline{\mathbf x}_i-\overline{\mathbf x})^T+\displaystyle\sum_{j=1}^{n_i}(\mathbf x_{ij}-\overline{\mathbf x}_i)(\mathbf x_{ij}-\overline{\mathbf x}_i)^T \end{align}\] Next, summing both sides over \(i\) we have

\[\begin{align} \underset{SSTOT}{\displaystyle\sum_{i=1}^{k}\displaystyle\sum_{j=1}^{n_i}(\mathbf x_{ij}-\overline{\mathbf x})(\mathbf x_{ij}-\overline{\mathbf x})^T}=\underset{SSTR}{\displaystyle\sum_{i=1}^{k}n_i(\overline{\mathbf x}_i-\overline{\mathbf x})(\overline{\mathbf x}_i-\overline{\mathbf x})^T}+\underset{SSE}{\displaystyle\sum_{i=1}^{k}\displaystyle\sum_{j=1}^{n_i}(\mathbf x_{ij}-\overline{\mathbf x}_i)(\mathbf x_{ij}-\overline{\mathbf x}_i)^T} \end{align}\] and also \(SSE=\displaystyle\sum_{i=1}^{k}\displaystyle\sum_{j=1}^{n_i}(\mathbf x_{ij}-\overline{\mathbf x}_i)(\mathbf x_{ij}-\overline{\mathbf x}_i)^T=\sum_{i=1}^{k}(n_i-1)\mathbf S_i\) the MANOVA table is \[\begin{array}{lccccc} \hline Source & d.f. & SS & MS \\ \hline Treatment & k-1 & SSTR & MSTR \\ Error & n-k & SSE & MSE & \\ Total & n-1 & SSTOT\\ \hline \end{array} \] with \(n=\displaystyle\sum_{i=1}^{k}n_i\) we rejects \(H0:\boldsymbol\tau_1 = \boldsymbol\tau_2 = \cdots = \boldsymbol\tau_k\) if the ratio of generalized variances: \(\Lambda^{*}=\frac{|SSE|}{|SSTOT|}\frac{\Biggl|\displaystyle\sum_{i=1}^{k}\displaystyle\sum_{j=1}^{n_i}(\mathbf x_{ij}-\overline{\mathbf x}_i)(\mathbf x_{ij}-\overline{\mathbf x}_i)^T\Biggr|}{\Biggl|\displaystyle\sum_{i=1}^{k}\displaystyle\sum_{j=1}^{n_i}(\mathbf x_{ij}-\overline{\mathbf x})(\mathbf x_{ij}-\overline{\mathbf x})^T\Biggr|}\) is too small and \(\Lambda^{*}\) is called Wilks’ lambda. If \(p=2\) and \(k\ge2\) \(\Bigl(\displaystyle\frac{n-k-1}{k-1}\Bigr)\Bigl(\displaystyle\frac{1-\sqrt{\Lambda^*}}{\sqrt{\Lambda^*}}\Bigr)\approx F_{2(k-1),2(n-k-1)}\)

  • Bonferroni simultaneous confidence intervals for treatment effects: for the \(s^{th}\) component of \(\boldsymbol\tau_{i}\), \(\tau_{is}, i=1,2,\cdots,k; s=1,2,\cdots,p\), because \(\boldsymbol\tau_{i}\) is estimated by \(\hat{\boldsymbol\tau}_{i}=\overline{\mathbf x}_i-\overline{\mathbf x}\) so \(\hat{\tau}_{is}=\overline{x}_{is}-\overline{x}_s\) and the estimate of difference of the \(s^{th}\) component between two independent samples is the difference of sample means \(\hat{\tau}_{as}-\hat{\tau}_{bs}=\overline{x}_{as}-\overline{x}_{bs}\). The variance is \(Var(\hat{\tau}_{as}-\hat{\tau}_{bs})=Var(\overline{x}_{as}-\overline{x}_{bs})=(\frac{1}{n_a}+\frac{1}{n_b})\sigma_{ss}\) and the variance is estimated by dividing the corresponding element of matrix \(SSE=\displaystyle\sum_{i=1}^{k}\displaystyle\sum_{j=1}^{n_i}(\mathbf x_{ij}-\overline{\mathbf x}_i)(\mathbf x_{ij}-\overline{\mathbf x}_i)^T\) by its degrees of freedom \(\widehat{Var}(\overline{x}_{as}-\overline{x}_{bs})=(\frac{1}{n_a}+\frac{1}{n_b})\frac{w_{ss}}{n-k}\) where \(w_{ss}\) is the \(s^{th}\) diagonal element of \(SSE\). There are \(p\) variables and \(\binom{k}{2}=\frac{k(k-1)}{2}\) pairwise differences, so simultaneous confidence intervals will employ the critical value \(t_{n-k}(\frac{\alpha}{2m})=t_{n-k}(\frac{\alpha}{2pk(k-1)/2})=t_{n-k}(\frac{\alpha}{pk(k-1)})\) and at \(100(1-\alpha)\%\) confidence level, the difference of the \(s^{th}\) component between two-sample \(\tau_{as}-\tau_{bs}\) belongs to \(\overline{x}_{as}-\overline{x}_{bs}\pm t_{n-k}(\frac{\alpha}{pk(k-1)})\sqrt{\frac{w_{ss}}{n-k}(\frac{1}{n_a}+\frac{1}{n_b})}\)

  • Univariate Two-way Fixed-Effects Analysis of Variance:
    Two sets of experimental conditions factor 1 (with \(g\) levels) and factor 2 (with \(k\) levels), respectively. There are \(n\) independent observations for each factor 1 \(\times\) factor 2 \(=gk\) combinations. Denoting the \(r^{th}, r=1,2,\cdots,n\) observation at level \(i, i=1,2,\cdots,g\) of factor 1 and level \(j, j=1,2,\cdots,k\) of factor 2, as \(x_{ijr}=\mu+\tau_i+\beta_j+\gamma_{ij}+e_{ijr}\), where \(\displaystyle\sum_{i=1}^{g}\tau_i=\displaystyle\sum_{j=1}^{k}\beta_j=\displaystyle\sum_{i=1}^{g}\gamma_{ij}=\displaystyle\sum_{j=1}^{k}\gamma_{ij}=0\) and \(e_{ijr}\) is \(N(0,\sigma^2)\) random variables, \(\gamma_{ij}\) is the interaction effect between factor 1 and factor 2. \(x_{ijr}-\overline x=(\overline x_{i.}-\overline x)+(\overline x_{.j}-\overline x)+(\overline x_{ij}-\overline x_{i.}-\overline x_{.j}+\overline x)+(x_{ijr}-\overline x_{ij})\) Squaring and summing the equation: \[\displaystyle\sum_{i=1}^{g}\displaystyle\sum_{j=1}^{k}\displaystyle\sum_{r=1}^{n}(x_{ijr}-\overline x)^2=kn\displaystyle\sum_{i=1}^{g}(\overline x_{i.}-\overline x)^2+gn\displaystyle\sum_{j=1}^{k}(\overline x_{.j}-\overline x)^2\\ +n\displaystyle\sum_{i=1}^{g}\displaystyle\sum_{j=1}^{k}(\overline x_{ij}-\overline x_{i.}-\overline x_{.j}+\overline x)^2+\displaystyle\sum_{i=1}^{g}\displaystyle\sum_{j=1}^{k}\displaystyle\sum_{r=1}^{n}(x_{ijr}-\overline x_{ij})^2\] or \(SSTOT=SSTR_{f1}+SSTR_{f2}+SSTR_{f1\times f2}+SSE\) The corresponding degrees of freedom are \(gkn-1=(g-1)+(k-1)+(g-1)(k-1)+gk(n-1)\)

  • Two-Way Multivariate Analysis of Variance (MANOVA):
    Each variable is a vector consisting of \(p\) components \(\mathbf x_{ijr}=\boldsymbol\mu+\boldsymbol\tau_i+\boldsymbol\beta_j+\boldsymbol\gamma_{ij}+\boldsymbol e_{ijr}\) and \(\displaystyle\sum_{i=1}^{g}\boldsymbol\tau_i=\displaystyle\sum_{j=1}^{k}\boldsymbol\beta_j=\displaystyle\sum_{i=1}^{g}\boldsymbol\gamma_{ij}=\displaystyle\sum_{j=1}^{k}\boldsymbol\gamma_{ij}=0\) The vectors are all \(p\times1\) vectors and \(\boldsymbol e_{ijr}\) are independent \(N_p(\boldsymbol0,\boldsymbol\Sigma)\) random vectors. The responses consist of \(p\) components replicated \(n\) times at each of the possible combinations of levels of factors \(1\) and \(2\). \[\displaystyle\sum_{i=1}^{g}\displaystyle\sum_{j=1}^{k}\displaystyle\sum_{r=1}^{n}(\mathbf x_{ijr}-\overline{\mathbf x})(\mathbf x_{ijr}-\overline {\mathbf x})^T=kn\displaystyle\sum_{i=1}^{g}(\overline{\mathbf x}_{i.}-\overline{\mathbf x})(\overline{\mathbf x}_{i.}-\overline{\mathbf x})^T+gn\displaystyle\sum_{j=1}^{k}(\overline{\mathbf x}_{.j}-\overline{\mathbf x})(\overline{\mathbf x}_{.j}-\overline{\mathbf x})^T\\ +n\displaystyle\sum_{i=1}^{g}\displaystyle\sum_{j=1}^{k}(\overline{\mathbf x}_{ij}-\overline{\mathbf x}_{i.}-\overline{\mathbf x}_{.j}+\overline{\mathbf x})(\overline{\mathbf x}_{ij}-\overline{\mathbf x}_{i.}-\overline{\mathbf x}_{.j}+\overline{\mathbf x})^T+\displaystyle\sum_{i=1}^{g}\displaystyle\sum_{j=1}^{k}\displaystyle\sum_{r=1}^{n}(\mathbf x_{ijr}-\overline{\mathbf x}_{ij})(\mathbf x_{ijr}-\overline{\mathbf x}_{ij})^T\] or \(SSTOT=SSTR_{f1}+SSTR_{f2}+SSTR_{f1\times f2}+SSE\). The corresponding degrees of freedom are \(gkn-1=(g-1)+(k-1)+(g-1)(k-1)+gk(n-1)\).

  1. A test of the interact effects between factor 1 and factor 2 \(H_0:\boldsymbol\gamma_{ij}=\boldsymbol0,\text{ for all i and j}\) versus \(H_0:\boldsymbol\gamma_{ij}\ne\boldsymbol0,\text{ At least one i and j}\), rejecting \(H_0\) for small values of the ratio \(\Lambda^*=\displaystyle\frac{|SSE|}{|SSTR_{f1\times f2}+SSE|}\) For large samples, \(-\Bigl[gk(n-1)-\frac{(p+1)-(g-1)(k-1)}{2}\Bigr]ln\Lambda^*\) is approximate a chi-square \(\chi_{(g-1)(k-1)}^2\), Reject \(H_0\) at the \(\alpha\) level if \(-\Bigl[gk(n-1)-\frac{(p+1)-(g-1)(k-1)}{2}\Bigr]ln\Lambda^*>\chi_{(g-1)(k-1)}^2(\alpha)\)
  2. A test of the main effects of factor 1 \(H_0:\boldsymbol\tau_{i}=\boldsymbol0,\text{ for all i}\) versus \(H_0:\boldsymbol\tau_{i}\ne\boldsymbol0,\text{ At least one i}\), rejecting \(H_0\) for small values of the ratio \(\Lambda^*=\displaystyle\frac{|SSE|}{|SSTR_{f1}+SSE|}\) For large samples, \(-\Bigl[gk(n-1)-\frac{(p+1)-(g-1)}{2}\Bigr]ln\Lambda^*\) is approximate a chi-square \(\chi_{(g-1)p}^2\), Reject \(H_0\) at the \(\alpha\) level if \(-\Bigl[gk(n-1)-\frac{(p+1)-(g-1)}{2}\Bigr]ln\Lambda^*>\chi_{(g-1)p}^2(\alpha)\)
  3. A test of the main effects of factor 2 \(H_0:\boldsymbol\beta_{j}=\boldsymbol0,\text{ for all j}\) versus \(H_0:\boldsymbol\beta_{j}\ne\boldsymbol0,\text{ At least one j}\), rejecting \(H_0\) for small values of the ratio \(\Lambda^*=\displaystyle\frac{|SSE|}{|SSTR_{f2}+SSE|}\) For large samples, \(-\Bigl[gk(n-1)-\frac{(p+1)-(k-1)}{2}\Bigr]ln\Lambda^*\) is approximate a chi-square \(\chi_{(k-1)p}^2\), Reject \(H_0\) at the \(\alpha\) level if \(-\Bigl[gk(n-1)-\frac{(p+1)-(k-1)}{2}\Bigr]ln\Lambda^*>\chi_{(k-1)p}^2(\alpha)\)
  • Bonferroni simultaneous confidence intervals for contrasts in the model parameters:
    The \(100(1-\alpha)\%\) simultaneous confidence intervals of each component of the difference vector \(\boldsymbol\tau_{\ell}-\boldsymbol\tau_{m}, \ell, m\in(1,2,\cdots,g)\) is \(\tau_{\ell s}-\tau_{ms},s\in\{1,2,\cdots,p\}\) belongs to \((\overline x_{\ell. s}-\overline x_{m.s})\pm t_{gk(n-1)}(\frac{\alpha}{pg(g-1)})\sqrt{\frac{SSE_{ss}}{gk(n-1)}\frac{2}{kn}}\) Similarly, The \(100(1-\alpha)\%\) simultaneous confidence intervals of each component of the difference vector \(\boldsymbol\beta_{c}-\boldsymbol\beta_{d}, c, d\in(1,2,\cdots,k)\) is \(\beta_{cs}-\beta_{ds},s\in\{1,2,\cdots,p\}\) belongs to \((\overline x_{.cs}-\overline x_{.ds})\pm t_{gk(n-1)}(\frac{\alpha}{pk(k-1)})\sqrt{\frac{SSE_{ss}}{gk(n-1)}\frac{2}{gn}}\) \(SSE_{ss}\) is the \(s^{th}\) diagonal element of \(SSE=\displaystyle\sum_{i=1}^{g}\displaystyle\sum_{j=1}^{k}\displaystyle\sum_{r=1}^{n}(\mathbf x_{ijr}-\overline{\mathbf x}_{ij})(\mathbf x_{ijr}-\overline{\mathbf x}_{ij})^T\)