@ConfidenceTestAssumptions(name="Kolmogorov-Smirnov test", alsoKnownAs="K-S test", description={"Determines if two datasets were drawn from the same univariate distribution.","Robust, nonparameteric test that makes no assumptions on the underlying distribution (continuous, discrete, etc.)."}, assumptions="The data were sampled independently from each other.", nullHypothesis="The data were drawn from the same distribution.", dataPaired=false, dataSameSize=false, distribution=KolmogorovDistribution.CDF.class, reference=@PublicationReference(author="Wikipedia",title="Kolmogorov-Smirnov test",type=WebPage,year=2009,url="http://en.wikipedia.org/wiki/Kolmogorov-Smirnov_test")) public class KolmogorovSmirnovConfidence extends AbstractCloneableSerializable implements NullHypothesisEvaluator<java.util.Collection<? extends java.lang.Number>>
Modifier and Type | Class and Description |
---|---|
static class |
KolmogorovSmirnovConfidence.Statistic
Computes the ConfidenceStatistic associated with a K-S test
|
Modifier and Type | Field and Description |
---|---|
static KolmogorovSmirnovConfidence |
INSTANCE
Default instance of the K-S test.
|
Constructor and Description |
---|
KolmogorovSmirnovConfidence()
Creates a new instance of KolmogorovSmirnovConfidence
|
Modifier and Type | Method and Description |
---|---|
protected static double[] |
computeAscendingArray(java.util.Collection<? extends java.lang.Number> data)
Returns an array of ascending sorted values from the given Collection
|
static KolmogorovSmirnovConfidence.Statistic |
evaluateGaussianHypothesis(java.util.Collection<java.lang.Double> data)
Evaluates the Hypothesis that the given data were generated according
to a UnivariateGaussian distribution.
|
static <DomainType extends java.lang.Number> |
evaluateNullHypothesis(java.util.Collection<? extends DomainType> data1,
CumulativeDistributionFunction<DomainType> function)
This is the standard K-S test for determining if the given data were
generated by the given CDF.
|
KolmogorovSmirnovConfidence.Statistic |
evaluateNullHypothesis(java.util.Collection<? extends java.lang.Number> data1,
java.util.Collection<? extends java.lang.Number> data2)
This is the standard K-S test for two distributions of data.
|
clone
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone
public static final KolmogorovSmirnovConfidence INSTANCE
public KolmogorovSmirnovConfidence()
protected static double[] computeAscendingArray(java.util.Collection<? extends java.lang.Number> data)
data
- Collection of doubles to sort into ascending order@PublicationReference(author={"William H. Press","Saul A. Teukolsky","William T. Vetterling","Brian P. Flannery"}, title="Numerical Recipes in C, Second Edition", type=Book, year=1992, pages={625,626}, notes={"Section 14.3","Function kstwo()"}, url="http://www.nrbook.com/a/bookcpdf.php") public KolmogorovSmirnovConfidence.Statistic evaluateNullHypothesis(java.util.Collection<? extends java.lang.Number> data1, java.util.Collection<? extends java.lang.Number> data2)
evaluateNullHypothesis
in interface NullHypothesisEvaluator<java.util.Collection<? extends java.lang.Number>>
data1
- First dataset to considerdata2
- Second dataset to consider@PublicationReference(author={"William H. Press","Saul A. Teukolsky","William T. Vetterling","Brian P. Flannery"}, title="Numerical Recipes in C, Second Edition", type=Book, year=1992, pages=625, notes={"Section 14.3","Function ksone()"}) public static <DomainType extends java.lang.Number> KolmogorovSmirnovConfidence.Statistic evaluateNullHypothesis(java.util.Collection<? extends DomainType> data1, CumulativeDistributionFunction<DomainType> function)
DomainType
- Type of Number to considerdata1
- Dataset to considerfunction
- CDF to compare against the given datapublic static KolmogorovSmirnovConfidence.Statistic evaluateGaussianHypothesis(java.util.Collection<java.lang.Double> data)
data
- Data to evaluate the possibility that they were generated according to
a Gaussian Distribution