Is there a multivariate alternative to two-sample Kolmogorov–Smirnov test? What I mean is a test that can be used to check whenever two underlying multidimensional distributions differ.

  • $\begingroup$ I am facing the same question. Have you learned anything useful and made any conclusions? I do see the answer, but beyond it I wonder about your experience with the suggestions and what worked best. $\endgroup$ Mar 31, 2021 at 14:06
  • $\begingroup$ @RichardHardy nope. $\endgroup$
    – Tim
    Mar 31, 2021 at 14:22

1 Answer 1


A 2004 article On a new multivariate two-sample test by Baringhaus and Franz maybe helpful, they provided a brief literature review on the two-sample multivariate GoF tests and then a R package cramer. As the package name suggested their method is related to Cramer's test, a predecessor of Cramer-von Mises.

For one-sample problem Justel et al. developed a generalization of Kolmogorov-Smirnov test. In general it seems the difficulty in multivariate case rooted from extending the definition of EDF (empirical distribution function), so methods based on other measures are worth exploring, e.g. multivariate tests based on ECF (empirical characteristic function) by Fan.

  • 3
    $\begingroup$ Please spell out abbrevs EDF, ECF $\endgroup$ Apr 13, 2017 at 22:24
  • 2
    $\begingroup$ @kjetilbhalvorsen: fixed, though it's quite clear what they are once click the links provided. $\endgroup$
    – Francis
    Apr 13, 2017 at 23:00
  • $\begingroup$ Is there a python implementation of this? $\endgroup$ May 4 at 21:15
  • 1
    $\begingroup$ @CarlosMougan: Not that I know of. But you can find the source code in the package page I linked (or here), which doesn't seem to be too difficult to convert to python. $\endgroup$
    – Francis
    Jun 15 at 10:02

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.