public class KSTest
extends java.lang.Object
The twosample KS test is one of the most useful and general nonparametric methods for comparing two samples, as it is sensitive to differences in both location and shape of the empirical cumulative distribution functions of the two samples.
The KolmogorovSmirnov test can be modified to serve goodness of fit test. In the special case of testing for normality of the distribution, samples are standardized and compared with a standard normal distribution. This is equivalent to setting the mean and variance of the reference distribution equal to the sample estimates, and it is known that using the sample to modify the null hypothesis reduces the power of a test. Correcting for this bias leads to the Lilliefors test. However, even Lilliefors' modification is less powerful than the ShapiroWilk test or AndersonDarling test for testing normality.
Modifier and Type  Field and Description 

double 
d
KolmogorovSmirnov statistic

java.lang.String 
method
A character string indicating what type of test was performed.

double 
pvalue
Pvalue

Modifier and Type  Method and Description 

static KSTest 
test(double[] x,
Distribution dist)
The onesample KS test for the null hypothesis that the data set x
is drawn from the given distribution.

static KSTest 
test(double[] x,
double[] y)
The twosample KS test for the null hypothesis that the data sets
are drawn from the same distribution.

java.lang.String 
toString() 
public final java.lang.String method
public final double d
public final double pvalue
public java.lang.String toString()
toString
in class java.lang.Object
public static KSTest test(double[] x, Distribution dist)
public static KSTest test(double[] x, double[] y)