Skip to content

ADescribe · Guide test 305

Hawkins homoscedasticity and normality test

Assesses covariance homogeneity and normality across groups, including groups defined by missingness patterns.

Runs in CodeSplashPython (calls R) example not runR example validated

Do it in CodeSplash

In the app, set it up in Analyze with this method:

In Missing-data patterns and MCAR tests, choose MCAR tests = All three or choose MCAR tests = Hawkins' test of normality and equal covariances or choose MCAR tests = Jamshidian–Jalal (Hawkins + nonparametric test).

Do it in CodeSplash Run this test on your own data, in Python or R.

Bench

Change the design, drag the data, move α. The statistic, its reference distribution and the verdict follow.

Bench · Hawkins test across missingness patterns

120
3
0.50

Missingness mechanism

0.20
1.20

How strongly the driver moves the chance of a value going missing.

0.050

Your data

Simulated with a known mechanism
x1x2x3smallest x₁largest x₁ →

Missing per variable: x1 0 · x2 34 · x3 31. Mean x₁ where a value is missing: 0.44; in complete rows: −0.33. Under MCAR the two agree up to chance.

If H₀ were true

χ² = 6.77
  1. The reference: how χ² varies across samples when H₀ is true (Fisher's combination of per-pattern Neyman tests after one imputation).
  2. Your statistic, from the data above.
  3. The p-value: the area at least as extreme as yours (p = .562).
  4. The hatched rejection region at α = .050: statistics landing here reject H₀.

The formula

Fi=(n−g−p) Vip[(nk−1)(n−g)−Vi],Vi=nk ci⊤S−1ci,X=−2∑kln⁡pk∼χ2g2F_i=\frac{(n-g-p)\,V_i}{p\big[(n_k-1)(n-g)-V_i\big]},\quad V_i=n_k\,\mathbf c_i^\top S^{-1}\mathbf c_i,\qquad X=-2\sum_k\ln p_k\sim\chi^2_{2g}

With your numbers

X=6.77,g=4 patterns,ν=8X = 6.77,\quad g = 4\text{ patterns},\quad \nu = 8
ci\mathbf c_i
each completed row centered on its pattern's mean (after one EM-based imputation)
pkp_k
Neyman's smooth test that pattern k's F tail probabilities are uniform

The verdict

χ²(8) = 6.77, p = .562

p > α = .050: compatible with H₀

A rejection can come from non-normality as well as from unequal covariances, so it is not by itself evidence against MCAR; read it with the nonparametric test.

Statistic
6.766
p-value
0.5621
Hawkins test across missingness patterns on 120 rows × 3 variables, 65 values missing (MAR): χ²(8) = 6.77, p = .562. The p-value is above α = .050, so the data are compatible with H0.

Hawkins test across missingness patterns on 120 rows × 3 variables, 65 values missing (MAR): χ²(8) = 6.77, p = .562. The p-value is above α = .050, so the data are compatible with H₀.

Question and hypotheses

H0: groups have a common covariance and multivariate normality; in incomplete-data use, groups are missingness patterns.

Assumptions

Independent multivariate observations; adequate group sizes and nonsingular pooled covariance; imputation must follow the specified procedure for missing data.

Formula

Fgi=(N−G−p)ngdgi2p[(ng−1)(N−G)−ngdgi2]Agi=1−Fp,N−G−p(Fgi)\begin{gathered}F_{gi}=\frac{(N-G-p)n_gd_{gi}^2}{p[(n_g-1)(N-G)-n_gd_{gi}^2]}\\[5pt] A_{gi}=1-F_{p,N-G-p}(F_{gi})\end{gathered}

Parameters and notation

dgi²=(xgi−x̄g)ᵀSp⁻¹(xgi−x̄g), Sp pooled within-group covariance. Under the joint null transformed A values should be uniform. For each group, Neyman smooth statistic Ng=ng⁻¹Σh=1..4[Σi Ph(Agi)]² uses orthonormal shifted Legendre polynomials.

Structure of the method

Compute within-group Mahalanobis distances using pooled covariance, transform them according to the Hawkins null construction, assess transformed uniformity and combine the group evidence as specified. For incomplete data, imputation and missing-pattern grouping are part of the method rather than interchangeable preprocessing.

Estimated and nuisance parameters

Group means, pooled within-group covariance and any imputation-model quantities are estimated nuisance components. Transformed distances and smooth-test coefficients are computed statistics. Degrees of freedom depend on total observations, number of groups and dimensions; singular covariance or invalid denominators signal violated regularity.

Settings and design choices

Choose Hawkins versus the nonparametric branch, imputation method, pattern-size exclusions, simulation replicates and random seed. MissMech may switch between simulated and asymptotic uniformity calibration by group size. The seed supplied internally can matter independently of an outer set.seed call.

Fitting and adaptation

Fit the stated imputation/covariance model and apply the complete documented workflow. Increase simulation replicates for numerical precision and examine multiple imputations diagnostically when appropriate. There is no neural fine-tuning; arbitrary imputation followed by the same nominal p value is not guaranteed valid.

Sensitivity and robustness

Rejection can indicate nonnormality, covariance heterogeneity or incompatibility with MCAR-related implications. It is not a direct proof of a particular missingness mechanism. Small groups, heavy tails, outliers and sparse-pattern exclusions change behavior. Report both the method branch and analyzed rows rather than only a final combined p value.

How to use and calibrate

Obtain group uniformity p values by simulation/asymptotics and combine with the documented Hawkins procedure; MissMech uses Fisher combination.

Example application

Assess normality/homoscedasticity across missingness patterns after specified imputation.

Interpretation and pitfalls

Watch out

A rejection can reflect nonnormality rather than non-MCAR. This is not a definitive standalone missingness-mechanism test.

What changed in edition 2

  • New sections: structure of the method, estimated and nuisance parameters, settings and design choices, fitting and adaptation, sensitivity and robustness.

Python and R

Hawkins normality/homoscedasticity branch, selected explicitly with method="Hawkins", after the package’s default distribution-free imputation. A rejection can reflect nonnormality, so it is not by itself a definitive rejection of MCAR.

Python · invokes R

Not run — Executed end to end through Rscript · needs Python standard library + Rscript; R packages: MissMech

# Python launcher for the complete R implementation below.
# Requires Rscript on PATH and the listed R packages.
import shutil
import subprocess
rscript = shutil.which("Rscript")
if rscript is None:
    raise RuntimeError("Install R and make Rscript available on PATH.")
r_code = r"""
set.seed(2026)
X<-matrix(rnorm(240*4),240,4);X[1:60,1]<-NA;X[61:120,2]<-NA;colnames(X)<-paste0("v",1:4)
print(MissMech::TestMCARNormality(X,method="Hawkins",imputation.number=1,nrep=999))
"""
# No shell interpolation. A failed R execution raises an error in Python.
result = subprocess.run([rscript, "--vanilla", "-"], input=r_code,
                        text=True, capture_output=True)
print(result.stdout)
if result.stderr:
    print(result.stderr)
result.check_returncode()
R

Validated — Executed successfully in the validation environment · needs MissMech

set.seed(2026)
X<-matrix(rnorm(240*4),240,4);X[1:60,1]<-NA;X[61:120,2]<-NA;colnames(X)<-paste0("v",1:4)
print(MissMech::TestMCARNormality(X,method="Hawkins",imputation.number=1,nrep=999))
Output
Call:
MissMech::TestMCARNormality(data = X, imputation.number = 1, 
    method = "Hawkins", nrep = 999)

Number of Patterns:  3 

Total number of cases used in the analysis:  240 

 Pattern(s) used:
          v1   v2   v3   v4   Number of cases
group.1   NA    1    1    1                60
group.2    1   NA    1    1                60
group.3    1    1    1    1               120


    Test of normality and Homoscedasticity:
  -------------------------------------------

Hawkins Test:

    P-value for the Hawkins test of normality and homoscedasticity:  0.7376102

Sources

Statistics guide v4 (historical):
Python: Executed end to end through Rscript · R: Executed successfully in the validation environment
Reference's record:
Edition 2 review: Python: skip · R: not executed (Rscript unavailable); why not run: Python: Python-to-R bridge; Rscript is unavailable. R code was not executed. Python: Not run in the reference's review: Python-to-R bridge; Rscript is unavailable. R code was not executed. R: Reviewed but not run: R wasn't available to the reference's authors.

From the CodeSplash statistics guide (v4), entry 305, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT305.