2
$\begingroup$

In this article, it is said that the test statistic tends to be more sensitive near the center of the distribution than at the tails. Can some please explain this what it means? (with a simple example if possible). Also please let me know when should the KS test test is preferred and not preferred for testing normality.

$\endgroup$
2
$\begingroup$

The variance of the sample cdf in the tails is smaller than near the median.

I assume we're talking about a one-sample Kolmogorov-Smirnov (though similar comments come into the two-sample case).

Specifically, the variance is proportional to $F(1-F)$, so as $F$ approaches $0$ or $1$ the variance goes to zero, and so does the standard error of the ecdf.

This means that even small deviations in the tail can be a strong indication of a problem with the null distribution.

However, the Kolmogorov-Smirnov "sees" a given difference in the tail and in the middle as equally serious (they both give the same statistic), but it's much "harder" for the data to deviate that much in the tail so the test is relatively insensitive to what's going on in the tails compared to some other tests.

In particular, try looking at the uniform case (since any other case can be reduced to the uniform by transforming the data by the hypothesized cdf under the null). Here's 500 uniform ecdfs with n=20

500 ecdfs of standard uniform samples of size 20

If you look at the width of the spread near $x=0.5$, it's much wider than it is at $x=0.05$ or $x=0.95$. So it's "harder" to achiever the critical value of D in the tail region than in the middle -- so the test generally finds deviations more toward the middle than right up at the ends.

$\endgroup$
  • $\begingroup$ Thanks for the detailed explanation, In this case can we always go for the Anderson–Darling test for normality which gives more weight to the tails than does the K-S test? $\endgroup$ – Venkatesh Gandi Nov 27 '19 at 6:51
  • $\begingroup$ It does, and also uses information from all of the differences, not just the largest one. It often has better power against interesting alternatives, but also has worse test bias against some alternatives. $\endgroup$ – Glen_b -Reinstate Monica Nov 27 '19 at 11:09
  • $\begingroup$ There's also a KS-type test that accounts for not only the sample variance differences but the exact finite-sample distribution/skew seen in the graph of the above (nice) answer, in order to spread power evenly across the distribution; see this 2018 Journal of Econometrics article and references therein (esp. the Buja and Rolke 2006 working paper); open draft available here. $\endgroup$ – David M Kaplan Jan 18 at 2:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.