naginterfaces.library.nonpar.gofstat_anddar_unif¶
- naginterfaces.library.nonpar.gofstat_anddar_unif(issort, y)[source]¶
gofstat_anddar_unif
calculates the Anderson–Darling goodness-of-fit test statistic and its probability for the case of standard uniformly distributed data.For full information please refer to the NAG Library document for g08cj
https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/g08/g08cjf.html
- Parameters
- issortbool
Set if the observations are sorted in ascending order; otherwise the function will sort the observations.
- yfloat, array-like, shape
, for , the observations.
- Returns
- yfloat, ndarray, shape
If , the data sorted in ascending order; otherwise the array is unchanged.
- a2float
, the Anderson–Darling test statistic.
- pfloat
, the upper tail probability for .
- Raises
- NagValueError
- (errno )
On entry, .
Constraint: .
- (errno )
and the data in is not sorted in ascending order.
- (errno )
The data in must lie in the interval .
- Notes
Calculates the Anderson–Darling test statistic (see
gofstat_anddar()
) and its upper tail probability by using the approximation method of Marsaglia and Marsaglia (2004) for the case of uniformly distributed data.
- References
Anderson, T W and Darling, D A, 1952, Asymptotic theory of certain ‘goodness-of-fit’ criteria based on stochastic processes, Annals of Mathematical Statistics (23), 193–212
Marsaglia, G and Marsaglia, J, 2004, Evaluating the Anderson–Darling distribution, J. Statist. Software (9(2))