scipy.stats.anderson¶

scipy.stats.
anderson
(x, dist='norm')[source]¶ AndersonDarling test for data coming from a particular distribution
The AndersonDarling tests the null hypothesis that a sample is drawn from a population that follows a particular distribution. For the AndersonDarling test, the critical values depend on which distribution is being tested against. This function works for normal, exponential, logistic, or Gumbel (Extreme Value Type I) distributions.
 Parameters
 xarray_like
array of sample data
 dist{‘norm’,’expon’,’logistic’,’gumbel’,’gumbel_l’, gumbel_r’,
‘extreme1’}, optional the type of distribution to test against. The default is ‘norm’ and ‘extreme1’, ‘gumbel_l’ and ‘gumbel’ are synonyms.
 Returns
 statisticfloat
The AndersonDarling test statistic
 critical_valueslist
The critical values for this distribution
 significance_levellist
The significance levels for the corresponding critical values in percents. The function returns critical values for a differing set of significance levels depending on the distribution that is being tested against.
See also
kstest
The KolmogorovSmirnov test for goodnessoffit.
Notes
Critical values provided are for the following significance levels:
 normal/exponenential
15%, 10%, 5%, 2.5%, 1%
 logistic
25%, 10%, 5%, 2.5%, 1%, 0.5%
 Gumbel
25%, 10%, 5%, 2.5%, 1%
If the returned statistic is larger than these critical values then for the corresponding significance level, the null hypothesis that the data come from the chosen distribution can be rejected. The returned statistic is referred to as ‘A2’ in the references.
References
 1
https://www.itl.nist.gov/div898/handbook/prc/section2/prc213.htm
 2
Stephens, M. A. (1974). EDF Statistics for Goodness of Fit and Some Comparisons, Journal of the American Statistical Association, Vol. 69, pp. 730737.
 3
Stephens, M. A. (1976). Asymptotic Results for GoodnessofFit Statistics with Unknown Parameters, Annals of Statistics, Vol. 4, pp. 357369.
 4
Stephens, M. A. (1977). Goodness of Fit for the Extreme Value Distribution, Biometrika, Vol. 64, pp. 583588.
 5
Stephens, M. A. (1977). Goodness of Fit with Special Reference to Tests for Exponentiality , Technical Report No. 262, Department of Statistics, Stanford University, Stanford, CA.
 6
Stephens, M. A. (1979). Tests of Fit for the Logistic Distribution Based on the Empirical Distribution Function, Biometrika, Vol. 66, pp. 591595.