@Reference(authors="F. W. Scholz, M. A. Stephens",title="K-sample Anderson\u2013Darling tests",booktitle="Journal of the American Statistical Association, 82(399)",url="https://doi.org/10.1080/01621459.1987.10478517",bibkey="doi:10.1080/01621459.1987.10478517") @Reference(authors="D. A. Darling",title="The Kolmogorov-Smirnov, Cramer-von Mises tests",booktitle="Annals of mathematical statistics 28(4)",url="https://doi.org/10.1214/aoms/1177706788",bibkey="doi:10.1214/aoms/1177706788") @Reference(authors="A. N. Pettitt",title="A two-sample Anderson-Darling rank statistic",booktitle="Biometrika 63 (1)",url="https://doi.org/10.1093/biomet/63.1.161",bibkey="doi:10.1093/biomet/63.1.161") public class StandardizedTwoSampleAndersonDarlingTest extends java.lang.Object implements GoodnessOfFitTest
To access the non-standardized A2 scores, use the function
unstandardized(double[][])
.
Compared to the Cramer-van Mises test, the Anderson-Darling test puts more weight on the tail of the distribution. This variant only uses the ranks.
References:
Darling's note on this equation
D. A. Darling
The Kolmogorov-Smirnov, Cramer-von Mises tests.
Annals of Mathematical Statistics 28(4)
More detailed discussion by Pettitt
A. N. Pettitt
A two-sample Anderson-Darling rank statistic
Biometrika 63 (1)
F. W. Scholz, M. A. Stephens
K-sample Anderson–Darling tests
Journal of the American Statistical Association, 82(399)
Modifier and Type | Field and Description |
---|---|
static StandardizedTwoSampleAndersonDarlingTest |
STATIC
Static instance.
|
Constructor and Description |
---|
StandardizedTwoSampleAndersonDarlingTest() |
Modifier and Type | Method and Description |
---|---|
double |
deviation(double[][] samples)
K-samples version of the Anderson-Darling test.
|
double |
deviation(double[] sample1,
double[] sample2)
Measure the deviation of a full sample from a conditional sample.
|
private int |
totalLength(double[][] samples)
Total length of a set of Samples.
|
double |
unstandardized(double[][] samples)
Compute the non-standardized A2 test statistic for the k-samples test.
|
private double |
unstandardized(double[][] samples,
int N)
Compute the non-standardized A2 test statistic for the k-samples test.
|
double |
unstandardized(double[] sample1,
double[] sample2)
Compute the non-standardized A2 test statistic for the k-samples test.
|
public static final StandardizedTwoSampleAndersonDarlingTest STATIC
public StandardizedTwoSampleAndersonDarlingTest()
public double deviation(double[] sample1, double[] sample2)
GoodnessOfFitTest
deviation
in interface GoodnessOfFitTest
sample1
- Full samplesample2
- Conditional samplepublic double deviation(double[][] samples)
samples
- Samplespublic double unstandardized(double[][] samples)
samples
- Samplesprivate double unstandardized(double[][] samples, int N)
This is based on Scholz and Stephens, Equation 7.
samples
- SamplesN
- total lengthpublic double unstandardized(double[] sample1, double[] sample2)
This is based on Scholz and Stephens, Equation 7.
sample1
- First samplesample2
- Second sampleprivate int totalLength(double[][] samples)
samples
- SamplesCopyright © 2019 ELKI Development Team. License information.