1

I want to use scipy.stats.kstest to test for performing a two-sample Kolmogorov–Smirnov, that is, testing whether two columns (samples)of data to test whether the underlying poplation distribution function is different. Can kstest do this?

My problem is that I could only find in the documentation how to use kstest for comparing a given sample to a known distribution such as normal, t, etc.

splinter
  • 3,727
  • 8
  • 37
  • 82

1 Answers1

2

There is a dedicated function ks_2samp which targets your use case.

This is a two-sided test for the null hypothesis that 2 independent samples are drawn from the same continuous distribution.

sascha
  • 32,238
  • 6
  • 68
  • 110