[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
anderson-darling test
From: |
Paul Kienzle |
Subject: |
anderson-darling test |
Date: |
Mon, 2 Aug 2004 03:03:12 -0400 |
A question for the stats gurus in the audience:
When testing rand/randn I came across a description of
the Anderson-Darling (AD) statistic for testing normality for
a set of data. There is no simple closed form solution
for the AD CDF, but I was able to find the critical values for
p=[.1 .05 .025 .01] listed a couple of places on the web
along with a small-n correction (citing [2]). I implemented this
in octave-forge/main/stats/anderson_darling_test.m
Later, I found a paper by Marsaglia[1] giving a closed
form 6-digit approximation to the AD CDF. I implemented
this as octave-forge/main/stats/anderson_darling_cdf.m.
The problem is that Marsaglia's values are 3x the values
I find elsewhere.
I threw a bunch of randomly generated data at Marsaglia's CDF
and it seems to give reasonable results. That is, for 10000
randomly generated distributions the histogram of the p-values
calculated from the Marsaglia's CDF is approximately flat. That
means that, e.g., the critical value corresponding to a p-value
of .9 really is above about 90% of the AD values for random
selections from the distribution, which is what I would expect
from a test statistic.
Anyone care to inform me what I'm doing wrong?
Thanks,
- Paul
[1] Marsaglia, G; Marsaglia JCW; (2004) "Evaluating the Anderson Darling
distribution", Journal of Statistical Software, 9(2).
[2] D'Agostino and Stephens, Goodness-Of-Fit Techniques,
Marcel-Dekker, New York, 1986, Table 4.7, p.123.
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- anderson-darling test,
Paul Kienzle <=