I am using the Kolmogorov–Smirnov two-sample test to compare distributions, and I noticed a -value is frequently reported as the test statistic. How is this -value determined? I know it's the probability of obtaining a result at least as large as the one obtained, but how is this -value determined given this is a nonparametric test? That is, we can't assume Gaussian fluctuations in the distribution and compute the -value using a -test.
Thanks!