Test covariance equality across multiple groups fast. Upload CSV or enter matrices with smart options. See corrected statistics, then export CSV and PDF instantly.
| Group | V1 | V2 | V3 |
|---|---|---|---|
| A | 10 | 21 | 30 |
| A | 11 | 20 | 29 |
| A | 10 | 22 | 31 |
| A | 12 | 19 | 30 |
| A | 11 | 21 | 32 |
| B | 8 | 18 | 24 |
| B | 9 | 17 | 25 |
| B | 8 | 19 | 23 |
| B | 10 | 18 | 26 |
| B | 9 | 16 | 24 |
For g groups and p variables, let each group have sample size ni and sample covariance Si. The pooled covariance is:
Box’s M statistic is:
A small-sample correction factor can be applied:
The test uses χ² = C · M with degrees of freedom df = (g − 1)·p·(p + 1)/2. The p-value comes from the chi-square distribution.
Box's M checks whether multiple groups share the same covariance matrix, a key assumption behind linear discriminant analysis and many MANOVA procedures. Use it when each observation has p quantitative variables and groups are independent. The calculator supports raw data or direct covariance entry, so you can work from datasets or summary outputs. In reporting confirm that group labels are correct and variables are measured on consistent units.
The test pools within-group covariances into Sp using sum(ni-1)Si divided by (N-g). It then compares log determinants: M=(N-g)ln|Sp|-sum(ni-1)ln|Si|. Determinants summarize multivariate spread; bigger |S| implies larger generalized variance. The result is mapped to a chi-square reference distribution. Because the logdet uses LU decomposition, tiny rounding errors can matter when p is large.
A correction factor C improves the chi-square approximation when sample sizes are modest or unequal. The calculator computes C from p, g, and the terms 1/(ni-1) and 1/(N-g). Degrees of freedom are df=(g-1)p(p+1)/2, matching the number of unique covariance elements compared across groups. For balanced designs C stays near one; for imbalance it decreases slightly.
If the p-value is below your alpha, conclude covariances differ and consider methods robust to heteroscedasticity, such as quadratic discriminant analysis, separate covariance estimates, or resampling approaches. If the p-value is large, equality is plausible, but remember power depends on N, p, and effect size. Report M, chi-square, df, and p-value together. If significant inspect which groups drive differences by comparing variances, correlations, and condition numbers first.
Box's M is sensitive to non-normality and outliers because covariances depend on squared deviations. Inspect distributions, standardize units when variables have different scales, and confirm each group has at least two observations. If matrices are near singular, enable diagonal regularization lambda and optional symmetrization to stabilize determinants without rewriting your data. Also remove duplicated rows and check for errors in imports.
Box's M evaluates whether group covariance matrices are statistically equal. It compares pooled and within-group determinants to detect differences in multivariate dispersion and correlation structure across groups.
A significant p-value suggests unequal covariances. Consider quadratic discriminant analysis, robust MANOVA alternatives, or resampling. Also check for outliers and scaling issues that can inflate covariance differences.
The chi-square reference works best under multivariate normality. With skewed or heavy-tailed data, Box's M can be overly sensitive. Use diagnostics, transformations, or permutation approaches when normality is doubtful.
The correction factor improves the chi-square approximation when samples are small or group sizes differ. It reduces bias in M's distribution and often yields more reliable p-values in practical datasets.
Lambda adds a small value to each diagonal element, improving numerical stability when covariance matrices are near singular. This can prevent non-positive determinants and makes the log-determinant computation more robust.
Prefer covariances. Correlations remove scale information and can distort pooled determinants unless variances are all one. If you only have correlations, convert them to covariances using variable standard deviations.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.