| Under the assumption that <math>F(x)</math> is non-decreasing and right-continuous, with countable (possibly infinite) number of jumps, the KS test statistic can be expressed as: | | Under the assumption that <math>F(x)</math> is non-decreasing and right-continuous, with countable (possibly infinite) number of jumps, the KS test statistic can be expressed as: |
| From the right-continuity of <math>F(x)</math>, it follows that <math>F(F^{-1}(t)) \geq t</math> and <math>F^{-1}(F(x)) \leq x </math> and hence, the distribution of <math>D_{n}</math> depends on the null distribution <math>F(x)</math>, i.e., is no longer distribution-free as in the continuous case. Therefore, a fast and accurate method has been developed to compute the exact and asymptotic distribution of <math>D_{n}</math> when <math>F(x)</math> is purely discrete or mixed , implemented in C++ and in the KSgeneral package of the [[R (programming language)|R language]]. The functions <code>disc_ks_test()</code>, <code>mixed_ks_test()</code> and <code>cont_ks_test()</code> compute also the KS test statistic and p-values for purely discrete, mixed or continuous null distributions and arbitrary sample sizes. The KS test and its p-values for discrete null distributions and small sample sizes are also computed in as part of the dgof package of the R language. Major statistical packages among which [[SAS (software)|SAS]] <code>PROC NPAR1WAY</code> , [[Stata]] <code>ksmirnov</code> implement the KS test under the assumption that <math>F(x)</math> is continuous, which is more conservative if the null distribution is actually not continuous (see [15] [16] [17]). | | From the right-continuity of <math>F(x)</math>, it follows that <math>F(F^{-1}(t)) \geq t</math> and <math>F^{-1}(F(x)) \leq x </math> and hence, the distribution of <math>D_{n}</math> depends on the null distribution <math>F(x)</math>, i.e., is no longer distribution-free as in the continuous case. Therefore, a fast and accurate method has been developed to compute the exact and asymptotic distribution of <math>D_{n}</math> when <math>F(x)</math> is purely discrete or mixed , implemented in C++ and in the KSgeneral package of the [[R (programming language)|R language]]. The functions <code>disc_ks_test()</code>, <code>mixed_ks_test()</code> and <code>cont_ks_test()</code> compute also the KS test statistic and p-values for purely discrete, mixed or continuous null distributions and arbitrary sample sizes. The KS test and its p-values for discrete null distributions and small sample sizes are also computed in as part of the dgof package of the R language. Major statistical packages among which [[SAS (software)|SAS]] <code>PROC NPAR1WAY</code> , [[Stata]] <code>ksmirnov</code> implement the KS test under the assumption that <math>F(x)</math> is continuous, which is more conservative if the null distribution is actually not continuous (see [15] [16] [17]). |
− | 从F(x)的右连续性,可以得出{\displaystyle F(F^{-1}(t))\geq t}和{\displaystyle F^{-1}(F(x))\leq x},因此Dn的分布取决于零分布F(x),即在连续情况不再无分布。目前已经开发出一种快速,准确的方法,以C ++和R语言的KSgeneral软件包来实现,当F(x)是纯离散或混合时,可以计算Dn的精确且渐近分布。函数disc_ks_test(),mixed_ks_test()和cont_ks_test()还针对纯离散,混合或连续的零分布和任意样本大小,计算KS检测统计量和p值。作为R语言的dgof软件包的一部分,还可以计算出KS检测及其用于离散零分布和小样本量的p值。另外主要统计软件包,其中SAS PROC NPAR1WAY和Stata ksmirnov是假设F(x)是连续的,因此执行KS检验时,如果零分布实际上不是连续的,则该检验更为保守。详情请见: | + | 从F(x)的右连续性,可以得出<math>F(F^{-1}(t)) \geq t</math>和<math>F^{-1}(F(x)) \leq x </math>,因此Dn的分布取决于零分布F(x),即在连续情况不再无分布。目前已经开发出一种快速,准确的方法,以C ++和R语言的KSgeneral软件包来实现,当F(x)是纯离散或混合时,可以计算Dn的精确且渐近分布。函数disc_ks_test(),mixed_ks_test()和cont_ks_test()还针对纯离散,混合或连续的零分布和任意样本大小,计算KS检测统计量和p值。作为R语言的dgof软件包的一部分,还可以计算出KS检测及其用于离散零分布和小样本量的p值。另外主要统计软件包,其中SAS PROC NPAR1WAY和Stata ksmirnov是假设F(x)是连续的,因此执行KS检验时,如果零分布实际上不是连续的,则该检验更为保守。详情请见: |
| 2. 《皮尔逊卡方检验和Kolmogorov拟合优度检验在有效性方面的比较A Comparison of the Pearson Chi-Square and Kolmogorov Goodness-of-Fit Tests with Respect to Validity》 | | 2. 《皮尔逊卡方检验和Kolmogorov拟合优度检验在有效性方面的比较A Comparison of the Pearson Chi-Square and Kolmogorov Goodness-of-Fit Tests with Respect to Validity》 |