Performs a Kolmogorov-Smirnov two-sample test.
For a list of all members of this type, see KolmogorovTwoSample Members.
System.Object
Imsl.Stat.KolmogorovTwoSample
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
Class KolmogorovTwoSample
computes Kolmogorov-Smirnov two-sample test statistics for testing that two continuous cumulative distribution functions (CDF's) are identical based upon two random samples. One- or two-sided alternatives are allowed. Exact p-values are computed for the two-sided test when , where n is the number of non-missing X observations and m the number of non-missing Y observation.
Let denote the empirical CDF in the X sample, let denote the empirical CDF in the Y sample and let the corresponding population distribution functions be denoted by and , respectively. Then, the hypotheses tested by KolmogorovTwoSample
are as follows:
Exact probabilities for the two-sided test are computed when , according to an algorithm given by Kim and Jennrich (1973). When , the very good approximations given by Kim and Jennrich are used to obtain the two-sided p-values. The one-sided probability is taken as one half the two-sided probability. This is a very good approximation when the p-value is small (say, less than 0.10) and not very good for large p-values.
Namespace: Imsl.Stat
Assembly: ImslCS (in ImslCS.dll)
KolmogorovTwoSample Members | Imsl.Stat Namespace | Example