BCompare groups · Guide test 162
Mardia multivariate kurtosis test
Tests whether multivariate kurtosis matches the multivariate normal model.
Do it in CodeSplash
In the app, set it up in Analyze with this method:
- Multivariate normality tests — Do several variables jointly follow a multivariate normal distribution?
In Multivariate normality tests, choose Test = Mardia kurtosis.
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 · Mardia multivariate kurtosis test
Your data
Simulated with a known ρIf H₀ were true
- The reference: how z varies across samples when H₀ is true.
- Your statistic, from the data above.
- The p-value: the area at least as extreme as yours (p = .483).
- The hatched rejection region at α = .050: statistics landing here reject H₀.
The formula
With your numbers
- squared Mahalanobis distance
- 8 for two normal variables
The verdict
b₂ = 8.89, z = 0.70, p = .483
p > α = .050: compatible with H₀
Large squared Mahalanobis distances raise b2: heavy tails or multivariate outliers.
- Statistic
- 0.701
- p-value
- 0.4835
Mardia multivariate kurtosis test on 40 (x, y) pairs: b₂ = 8.89, z = 0.70, p = .483. The p-value is above α = .050, so the data are compatible with H₀.
Question and hypotheses
H0: multivariate normality, assessed through radial fourth moments.
Assumptions
Independent identically distributed p-dimensional observations; positive definite covariance and sufficient n relative to p. The null is a multivariate normal distribution with unknown mean/covariance.
Formula
Parameters and notation
di²=(xi−x̄)ᵀSn⁻¹(xi−x̄); Sn uses denominator n. Finite sample centering corrections exist.
Structure of the method
Compute each observation's squared Mahalanobis radius using fitted location and covariance, square those radii, and average them. Center and standardize that radial fourth-moment statistic using a matching finite-sample or asymptotic null calculation. The computation targets tail/radial structure, not all departures from a normal joint distribution.
Estimated and nuisance parameters
Mean and covariance estimates are nuisance fits; multivariate kurtosis is the target summary. The reference center p(p+2) is a normal-model quantity, while the finite-sample expectation depends on covariance normalization and sample size.
Settings and design choices
Fix the variable set, covariance divisor, two-sided convention, missing-value policy, and any finite-sample centering correction. Use the same conventions when comparing software; an ordinary univariate kurtosis function applied to pooled values is a different statistic.
Fitting and adaptation
Reestimate mean/covariance when the sample changes. A parametric normal bootstrap must refit those quantities in each simulated dataset. Robust covariance substitution defines a modified procedure requiring its own calibration, rather than a routine accuracy improvement to the classical test.
Sensitivity and robustness
Radial fourth powers make isolated extreme observations influential, while symmetric nonnormal alternatives can have normal kurtosis. Inspect sample size, p-to-n ratio, covariance eigenvalues, and sensitivity to documented data-quality errors. Serial or cluster dependence invalidates the independent-row reference unless explicitly modeled; a small p-value does not identify which variable or tail feature caused rejection.
How to use and calibrate
Use a two sided normal reference or refitted normal simulation.
Example application
Assess whether the distribution has unusual multivariate radial tails.
Interpretation and pitfalls
Watch out
Normal kurtosis can occur in nonnormal distributions; combine scientific diagnostics rather than treating nonrejection as confirmation.
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
Current MVN function interface. Mardia prints skewness and kurtosis components together: use the component named in this entry. Covariance must be estimable and observations independent.
Not run — Python launcher syntax checked; R backend runtime not verified · needs Python standard library + Rscript; R packages: MVN
# 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(120),ncol=3);Y<-matrix(rnorm(150,mean=.3),ncol=3)
print(MVN::mardia(X))
"""
# 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()
Not run — Syntax checked; runtime not verified in the final environment · needs MVN
set.seed(2026)
X<-matrix(rnorm(120),ncol=3);Y<-matrix(rnorm(150,mean=.3),ncol=3)
print(MVN::mardia(X))
Sources
- MVN — MVN · mardiaAuthor documentation/source reviewed: MVN 6.3.rdrr.io
- mardiardrr.io
- mardiasearch.r-project.org
- Statistics guide v4 (historical):
- Python: Python launcher syntax checked; R backend runtime not verified · R: Syntax checked; runtime not verified in the final 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 162, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT162.