### Description

Anderson-Darling(AD) test can be used to carry out distribution equality test and is similar to Kolmogorov-Smirnov test. AD test statistic is defined as:

A^2=n\int_{-∞}^{∞}\frac{[\hat{F}(x)-F(x)]^2}{F(x)[1-F(x)]}dF(x)

which is equivalent to

=-n-\frac{1}{n}∑_{i=1}^n(2i-1)[\ln F(X_i)+\ln(1-F(X_{n+1-i}))]

### Usage

 1 ADTestStat(number.trials, sample.size, confidence.interval) 

### Arguments

 number.trials Number of trials sample.size Sample size confidence.interval Confidence Interval

### Value

Confidence Interval for AD test statistic

Dinesh Acharya

### References

Dowd, K. Measuring Market Risk, Wiley, 2007.

Anderson, T.W. and Darling, D.A. Asymptotic Theory of Certain Goodness of Fit Criteria Based on Stochastic Processes, The Annals of Mathematical Statistics, 23(2), 1952, p. 193-212.

Kvam, P.H. and Vidakovic, B. Nonparametric Statistics with Applications to Science and Engineering, Wiley, 2007.

### Examples

 1 2 3 # Probability that the VaR model is correct for 3 failures, 100 number # observations and 95% confidence level ADTestStat(1000, 100, 0.95) 

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.