Introduction

Let ๐—1i,๐—2i,โ€ฆ,๐—Nii\mathbf{X}_{1i}, \mathbf{X}_{2i}, \ldots, \mathbf{X}_{N_i i} be a random sample from the population Np(๐›g,๐šบg)N_p(\boldsymbol{\mu}_g, \boldsymbol{\Sigma}_g) indexed by i=1,2,โ€ฆ,gi = 1,2,\ldots,g. In other words, we have gg samples as follows

๐—11,๐—21,โ€ฆ,๐—N11๐—12,๐—22,โ€ฆ,๐—N22โ‹ฎ๐—1g,๐—2g,โ€ฆ,๐—Ngg \begin{matrix} \mathbf{X}_{11}, \mathbf{X}_{21}, \ldots, \mathbf{X}_{N_1 1} \\ \mathbf{X}_{12}, \mathbf{X}_{22}, \ldots, \mathbf{X}_{N_2 2} \\ \vdots \\ \mathbf{X}_{1g}, \mathbf{X}_{2g}, \ldots, \mathbf{X}_{N_g g} \end{matrix}

It is not necessary to have equal NiN_i. The main objective in this vignette is to use test to study the following hypothesis.

H0:ฮฃ1=ฮฃ2=โ‹ฏ=ฮฃg=ฮฃ H_{0}: \Sigma_{1} = \Sigma_{2} = \cdots = \Sigma_{g} = \Sigma

HA:at least one ฮฃ is different H_{A}: \text{at least one } \Sigma \text{ is different}

Box-M test

Box (1949) proposed this test and the statistic test ฯ†\varphi is given by:

ฯ†=โˆ’2ฯlog(ฮป) \varphi = -2 \rho \log(\lambda)

Under true H0H_{0}, the statistic

ฯ†โˆผฯ‡p(p+1)(gโˆ’1)/22 \varphi \sim \chi^{2}_{p(p+1)(g-1)/2}

Where ฯ\rho, log(ฮป)\log(\lambda) and SS are obtained by as

ฯ=1โˆ’2p2+3pโˆ’16(p+1)(gโˆ’1)(โˆ‘i=1g1niโˆ’1n) \rho = 1 - \frac{2p^{2} + 3p - 1}{6(p + 1)(g - 1)} \left( \sum_{i=1}^{g} \frac{1}{n_i} - \frac{1}{n} \right)

log(ฮป)=nlog(|S|)โˆ’โˆ‘i=1gnilog(|Si|)โˆ’2 \log(\lambda) = \frac{n \, \log(|S|) - \sum_{i=1}^{g} n_i \, \log(|S_i|)}{-2}

S=1nโˆ‘i=1gniSi S = \frac{1}{n} \sum_{i=1}^{g} n_i S_i

with

ni=Niโˆ’1 n_i = N_i - 1

n=n1+n2+โ€ฆng n = n_1 + n_2 + \ldots n_g

This test seems to be good if each NiN_i exceeds 20, and if gg and pp do not exceed 5 (Mardia, Bibby, and Kent (1992), page 140).

Bartlettโ€™s test or modified LRT

xxx proposed this test and the statistic is given by:

M=nlog(|S|)โˆ’โˆ‘i=1gnilog(|Si|) M = n \log(|S|) - \sum_{i=1}^{g} n_i \log(|S_i|)

Under true H0H_{0}, the statistic

Mโˆผฯ‡p(p+1)(gโˆ’1)/22 M \sim \chi^{2}_{p(p+1)(g-1)/2}

The matrix SS and nn are the same as in the Box-M test.

Note: Schott (2007) claims that since the sample covariance matrix SiS_i is singular if ni<pn_i < p, this likelihood ratio test is valid only if niโ‰ฅpn_i \ge p for i=1,2,โ€ฆ,gi = 1,2, \ldots, g.

Wald Schott test

Schott (2001) (page 27) proposed this test and the statistic is given by:

W=n2{โˆ‘i=1gnintr(SiSโˆ’1SiSโˆ’1)โˆ’โˆ‘i=1gโˆ‘j=1gninjn2tr(SiSโˆ’1SjSโˆ’1)}. W = \frac{n}{2} \left\{ \sum_{i=1}^{g} \frac{n_i}{n} \, \mathrm{tr}(S_i S^{-1} S_i S^{-1}) - \sum_{i=1}^{g} \sum_{j=1}^{g} \frac{n_i n_j}{n^{2}} \, \mathrm{tr}(S_i S^{-1} S_j S^{-1}) \right\}.

Under true H0H_{0}, the statistic

Wโˆผฯ‡p(p+1)(gโˆ’1)/22 W \sim \chi^{2}_{p(p+1)(g-1)/2}

The matrix SS and nn are the same as in the Box-M test.

References

Box, George EP. 1949. โ€œA General Distribution Theory for a Class of Likelihood Criteria.โ€ Biometrika 36 (3/4): 317โ€“46.
Mardia, Kanti V., John M. Bibby, and J. T. Kent. 1992. Multivariate Analysis. Acad. Pr.
Schott, James R. 2001. โ€œSome Tests for the Equality of Covariance Matrices.โ€ Journal of Statistical Planning and Inference 94 (1): 25โ€“36.
โ€”โ€”โ€”. 2007. โ€œA Test for the Equality of Covariance Matrices When the Dimension Is Large Relative to the Sample Sizes.โ€ Computational Statistics & Data Analysis 51 (12): 6535โ€“42.