Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Kolmogorov–Smirnov test
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Discrete and mixed null distribution=== Under the assumption that <math>F</math> is non-decreasing and right-continuous, with countable (possibly infinite) number of jumps, the KS test statistic can be expressed as: <math display="block">D_n= \sup_x |F_n(x)-F(x)| = \sup_{0 \leq t \leq 1} |F_n(F^{-1}(t)) - F(F^{-1}(t))|.</math> From the right-continuity of <math>F</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</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</math> is purely discrete or mixed,<ref name=DKT2019/> implemented in C++ and in the KSgeneral package <ref name=KSgeneral/> 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 <ref name=arnold-emerson>{{Cite journal |first1=Taylor B. |last1=Arnold |first2=John W. |last2=Emerson |year=2011 |title=Nonparametric Goodness-of-Fit Tests for Discrete Null Distributions |journal=The R Journal |volume=3 |issue=2 |pages=34\[Dash]39 |url=http://journal.r-project.org/archive/2011-2/RJournal_2011-2_Arnold+Emerson.pdf |doi=10.32614/rj-2011-016|doi-access=free }}</ref> as part of the dgof package of the R language. Major statistical packages among which [[SAS (software)|SAS]] <code>PROC NPAR1WAY</code>,<ref>{{cite web|url=https://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_npar1way_toc.htm|title=SAS/STAT(R) 14.1 User's Guide|website=support.sas.com|access-date=14 April 2018}}</ref> [[Stata]] <code>ksmirnov</code><ref>{{cite web|url=https://www.stata.com/manuals15/rksmirnov.pdf|title=ksmirnov — Kolmogorov–Smirnov equality-of-distributions test|website=stata.com|access-date=14 April 2018}}</ref> 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 <ref name=Noether63>{{Cite journal |vauthors=Noether GE |year=1963|title=Note on the Kolmogorov Statistic in the Discrete Case |journal=Metrika |volume=7 |issue=1 |pages=115–116|doi=10.1007/bf02613966|s2cid=120687545}}</ref> <ref name=Slakter65>{{Cite journal |vauthors=Slakter MJ |year=1965|title=A Comparison of the Pearson Chi-Square and Kolmogorov Goodness-of-Fit Tests with Respect to Validity |journal=Journal of the American Statistical Association |volume=60 |issue=311 |pages=854–858 |doi=10.2307/2283251|jstor=2283251}}</ref> <ref name=Walsh63>{{Cite journal |vauthors=Walsh JE |year=1963 |title=Bounded Probability Properties of Kolmogorov–Smirnov and Similar Statistics for Discrete Data |journal=Annals of the Institute of Statistical Mathematics |volume=15 |issue=1 |pages=153–158|doi=10.1007/bf02865912|s2cid=122547015 }}</ref>).
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Kolmogorov–Smirnov test
(section)
Add topic