Dew Stats Master .NET
GOFKolmogorov Routines
Summary
Two sample Kolmogorov-Smirnov GOF test.

Unit
Statistics

Declaration
Function GOFKolmogorov(Data1, Data2: TVec; out hRes: THypothesisResult; out Signif: TSample; hType: THypothesisType = htTwoTailed; Alpha: TSample = 0.05): TSample;
 Parameter  Description 
Data1 First dataset. 
Data2 Second dataset. 
hRes Returns the result of the null hypothesis (default assumption is that data comes from specific distribution). 
hType Defines the type of the null hypothesis (left, right and two - tailed). 
Signif (Significance level) returns the probability of observing the given result by chance given that the null hypothesis is true. 
Alpha Defines the desired significance level. If the significance probability (Signif) is bellow the desired significance (Alpha), the null hypothesis is rejected. 
Result
K-S statistics.
Description
Performs two-sample Kolmogorov-Smirnov goodnes of fit test on indepentent random samples Data1 and Data2. Test determines if Data1 and Data2 samples are drawn from the same continuous population.
Categories
Hypothesis testing

Declaration
Function GOFKolmogorov(Data: TVec; out hRes: THypothesisResult; out Signif: TSample; CDFx: TVec = nil; CDFy: TVec = nil; hType: THypothesisType = htTwoTailed; Alpha: TSample = 0.05): TSample;
Summary
One sample Kolmogorov-Smirnov GOF test.
 Parameter  Description 
Data Samples to be tested. 
CDFx Defines set of possible x values. 
CDFy Defines set of hypothesized CDF values, evalueted at CDFx. 
hRes Returns the result of the null hypothesis (default assumption is that data comes from specific distribution). 
hType Defines the type of the null hypothesis (left, right and two - tailed). 
Signif (Significance level) returns the probability of observing the given result by chance given that the null hypothesis is true. 
Alpha Defines the desired significance level. If the significance probability (Signif) is bellow the desired significance (Alpha), the null hypothesis is rejected. 
Result
K-S statistics.
Description
Performs one-sample Kolmogorov-Smirnov (KS) goodnes of fit test. The KS test is used to decide if a sample comes from a population with a specific distribution. Test is based on the empirical distribution function (ECDF). An attractive feature of this test is that the distribution of the K-S test statistic itself does not depend on the underlying cumulative distribution function being tested. Another advantage is that it is an exact test (the chi-square goodness-of-fit test depends on an adequate sample size for the approximations to be valid). Despite these advantages, the K-S test has several important limitations:
If CDFx and CDFy vectors are not defined, Data values are compared with standard normal distribution. If defined, CDFx and CDfy vectors represent hypothesized distribution x and CDF(x) values. In this case all Data values must lie within the [Min(CDFx),Max(CDFx)] interval. The KS test assumes CDFx and CDFy are predefined - KS test is not very accurate if CDFx and CDFy values are calculated from Data values.
Categories
Hypothesis testing
 See Also 
GOFLillieTest 
GOFBeraJarqueTest 

Copyright 2008 Dew Research
http://www.dewresearch.com