statsmodels.stats.diagnostic.anderson_statistic#

statsmodels.stats.diagnostic.anderson_statistic(x, dist='norm', fit=True, params=(), axis=0)[source]#

Calculate the Anderson-Darling a2 statistic

Parameters:
xarray_like

The data to test.

dist{‘norm’, callable}, optional

The assumed distribution under the null of test statistic.

fitbool, optional

If True, then the distribution parameters are estimated. Currently only for 1d data x, except in case dist=’norm’.

paramstuple, optional

The optional distribution parameters if fit is False.

axisint, optional

If dist is ‘norm’ or fit is False, then data can be an n-dimensional and axis specifies the axis of a variable.

Returns:
float or ndarray

The Anderson-Darling statistic.