# Two-dimensional Kolmogorov-Smirnov

I would like to run some two dimensional Kolmogorov-Smironov tests to determine whether a two-dimensional distribution fits with a reference.

Is there any package or application that I could I use in a relatively straightforward fashion? Or is there a different algorithm that is preferrable? I have just a basic statistical knowledge.

-
 Perhaps I am missing something, but I think the Kolmogorov–Smirnov test applies to one-dimensional distributions. If you are interested on one of the proposal extensions (there are several because there is no natural extension to the multivariate case), please specify which one. – user10525 Apr 28 '12 at 10:42 I'd rather say there is a natural extension to the multivariate case, but it involves the distribution of $\sup |K(t)|$ where $K$ is the Kiefer process (two-dimensional Brownian bridge), and this distribution is badly known. – Stéphane Laurent Apr 28 '12 at 11:47 @StéphaneLaurent Thanks, that is interesting. – user10525 Apr 28 '12 at 12:45

A two-dimensional extension of the Kolmogorov-Smirnov test has been described by Justel, Pena and Zamar in a "A multivariate Komogorov-Smirnov test of goodness of fit". @Procrastinator's comments suggests there may be other such proposals.

However, I haven't seen a package with a straightforward implementation.

Depending on what you want to do, kde.test() in Tarn Duong's ks package for R might be more useful.

-

you may find this Matlab code to be useful.

http://www.mathworks.com/matlabcentral/fileexchange/38617-two-dimensional-2d-paired-kolmogorov-smirnov-test

-
Welcome to this site! Could you provide a brief description of the resources available on that page? – chl Apr 10 at 17:43

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer: please explain why you're recommending it as a solution. Answers that don't explain anything will be deleted. See Good Subjective, Bad Subjective for more information.