I occasionally find that I want to apply a K-S test in the context of unit-testing software that involves random behaviors. Unit testing with sampling statistics is a bit tricky because you want to minimize false-failures.
Extreme value distributions are one likely approach to minimizing false positives, since they make it possible to run a series of experiments, find a maximum D statisic between experimental results and an expected distribution, and measure the probability that D is an outlier using Extreme Value theory.
The idea is that I might run (n) K-S tests, comparing n pairs of samples. This will result in n D-statistic values; the maximum of these values will adhere to some variation of extreme value distribution.
I am looking for some closed-form expression for the extreme value distribution for the K-S D statistic. I suspect it at least adheres to the Weibull form of the EV distribution since its value has a finite maximum, but not even sure of that. I might do some empirical fitting but a more general formula would be even nicer.
UPDATE: Although I have posted an answer that works for a given sample size, it would also be interesting to derive a limiting cdf, that is identify $\alpha$ for the Weibull family of EVD: $$ F(x) = e^{-(-(\frac{x - \mu}{\sigma}))^\alpha} $$
I believe I see the solution. Provided you know the cdf of your iid random variables F(x), the cdf for the maximum value over n iid samples is just (F(x))^n, for example see here.
And I can compute the cdf I need. For a Kolmogorov-Smirnov D statistic over a sample size n (Dn), the quantity sqrt(n)*Dn converges to the Kolmogorov distribution, and its cdf is known; there are also numeric algorithms for computing it, including implementations.