IMSLS_STAT, float*adstat (Output) The Anderson‑Darling statistic.
IMSLS_N_MISSING, int*nmiss (Output) The number of missing observations.
Description
Given a data sample {Xi, i = 1 .. n}, where n = nobs and Xi = x[i-1], function imsls_f_ad_normality_test computes the Anderson-Darling (AD) normality statistic A = adstat and the corresponding Return Value (p‑value) P= P == {probability that a normally distributed n element sample would have an AD statistic > A}. If P is sufficiently small (e.g. P < .05), then the AD test indicates that the null hypothesis that the data sample is normally-distributed should be rejected. A is calculated:
where and and s are the sample mean and standard deviation respectively. P is calculated by first transforming A to an “n‑adjusted” statistic A*:
and then calculating P in terms of A* using a parabolic approximation taken from Table 4.9 in Stephens (1986).
Example
The following example is taken from Conover (1980, pages 364 and 195). The data consists of 50 two‑digit numbers taken from a telephone book. The AD test fails to reject the null hypothesis of normality at the .05 level of significance.