The class KolmogorovOneSample
performs a Kolmogorov-Smirnov goodness-of-fit test in one sample.
For a list of all members of this type, see KolmogorovOneSample Members.
System.Object
Imsl.Stat.KolmogorovOneSample
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
The hypotheses tested follow:
where is the cumulative distribution function (CDF) of the random variable, and the theoretical cdf, , is specified via the user-supplied function cdf. Let n be the number of observations minus the number of missing observations. The test statistics for both one-sided alternatives and and the two-sided alternative are computed as well as an asymptotic z-score and p-values associated with the one-sided and two-sided hypotheses. For , asymptotic p-values are used (see Gibbons 1971). For , exact one-sided p-values are computed according to a method given by Conover (1980, page 350). An approximate two-sided test p-value is obtained as twice the one-sided p-value. The approximation is very close for one-sided p-values less than 0.10 and becomes very bad as the one-sided p-values get larger.The theoretical CDF is assumed to be continuous. If the CDF is not continuous, the statistics will not be computed correctly.
Estimation of parameters in the theoretical CDF from the sample data will tend to make the p-values associated with the test statistics too liberal. The empirical CDF will tend to be closer to the theoretical CDF than it should be.
No attempt is made to check that all points in the sample are in the support of the theoretical CDF. If all sample points are not in the support of the CDF, the null hypothesis must be rejected.
Namespace: Imsl.Stat
Assembly: ImslCS (in ImslCS.dll)
KolmogorovOneSample Members | Imsl.Stat Namespace | Example