KolmogorovOneSample Class |
Namespace: Imsl.Stat
The KolmogorovOneSample type exposes the following members.
Name | Description | |
---|---|---|
KolmogorovOneSample |
Constructs a one sample Kolmogorov-Smirnov goodness-of-fit test.
|
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
MaximumDifference | ,
the maximum difference between the theoretical and empirical CDF's.
| |
MinimumDifference | ,
the minimum difference between the theoretical and empirical CDF's.
| |
NumberMissing |
The number of missing values in the data.
| |
NumberOfTies |
The number of ties in the data.
| |
OneSidedPValue |
Probability of the statistic exceeding D under
the null hypothesis of equality and against the
one-sided alternative. An exact probability
is computed if the number of observation is less than or equal to 80,
otherwise an approximate probability is computed.
| |
TestStatistic |
The test statistic, .
| |
TwoSidedPValue |
Probability of the statistic exceeding D under
the null hypothesis of equality and against the
two-sided alternative.
| |
Z |
The normalized D statistic without the continuity correction applied.
|
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.