Expand description
Tests of normality, following scipy.stats: Shapiro-Wilk (shapiro, Royston’s algorithm
AS R94), Anderson-Darling (anderson_normal), Jarque-Bera (jarque_bera) and
D’Agostino and Pearson’s omnibus test (normaltest, from skewtest and kurtosistest).
See the book entry More hypothesis tests.
Structs§
- Anderson
Result - The result of
anderson_normal.
Functions§
- anderson_
normal - The Anderson-Darling test of normality with estimated mean and standard deviation (SciPy’s
anderson(x, 'norm')):A² = −n − Σ (2i − 1)/n [ln Φ(zᵢ) + ln(1 − Φ(z₍ₙ₊₁₋ᵢ₎))], with the Stephens critical values adjusted forn. The null hypothesis is rejected at a level if the statistic exceeds its critical value. - jarque_
bera - The Jarque-Bera test:
JB = n/6 (S² + K²/4)from the sample skewnessSand excess kurtosisK(biased), asymptotically χ² with 2 degrees of freedom (SciPy’sjarque_bera). - kurtosistest
- Anscombe and Glynn’s test that the kurtosis is that of a normal distribution (SciPy’s
kurtosistest, n ≥ 5). - normaltest
- D’Agostino and Pearson’s omnibus test (SciPy’s
normaltest):K² = Z_skew² + Z_kurt², approximately χ² with 2 degrees of freedom. - shapiro
- The Shapiro-Wilk test (SciPy’s
shapiro):Wmeasures how well the ordered sample matches the expected normal order statistics,W = (Σ aᵢ x₍ᵢ₎)² / Σ (xᵢ − x̄)², with Royston’s approximations (AS R94) to the coefficientsaᵢand to the null distribution ofln(1 − W). Valid for 3 ≤ n ≤ 5000. - skewtest
- D’Agostino’s test that the skewness is that of a normal distribution (SciPy’s
skewtest, n ≥ 8): the sample skewness is transformed to an approximately standard normalZ.