pingouin.multivariate_normality

pingouin.
multivariate_normality
(X, alpha=0.05)[source] HenzeZirkler multivariate normality test.
 Parameters
 Xnp.array
Data matrix of shape (n_samples, n_features).
 alphafloat
Significance level.
 Returns
 normalboolean
True if X comes from a multivariate normal distribution.
 pfloat
Pvalue.
See also
normality
Test the univariate normality of one or more variables.
homoscedasticity
Test equality of variance.
sphericity
Mauchly’s test for sphericity.
Notes
The HenzeZirkler test has a good overall power against alternatives to normality and is feasable for any dimension and any sample size.
Adapted to Python from a Matlab code by Antonio TrujilloOrtiz and tested against the R package MVN.
Rows with missing values are automatically removed using the
remove_na()
function.References
 1
Henze, N., & Zirkler, B. (1990). A class of invariant consistent tests for multivariate normality. Communications in StatisticsTheory and Methods, 19(10), 35953617.
 2
TrujilloOrtiz, A., R. HernandezWalls, K. BarbaRojo and L. CupulMagana. (2007). HZmvntest: HenzeZirkler’s Multivariate Normality Test. A MATLAB file.
Examples
>>> import pingouin as pg >>> data = pg.read_dataset('multivariate') >>> X = data[['Fever', 'Pressure', 'Aches']] >>> normal, p = pg.multivariate_normality(X, alpha=.05) >>> print(normal, round(p, 3)) True 0.717