# Statistics confusion

I have two data sets. When I do a QuantilePlot[data1, data2], I get the graph below. However, KolmogorovSmirnovTest[data1, data2] returns 0. While clearly the distributions of the two data sets are somewhat different, it is equally clear that they are not that far apart. Now, to add to the confusion, while the examples for KolmogorovSmirnovTest[] do give an example of two data sets being compared, the actual documentation seems to tell us how to see if data matches a symbolic distribution. So, it all seems rather goofy. Anybody have thoughts?

EDIT I withdraw the "bug" theory, since I have now compared the same data in Matlab (thanks to @Szabolcs's excellent MATLink (matlink.org)) and MATLAB is in agreement with Mathematica (except that Mathematica's 0 is MATLAB's 1)

• I suspect the answer is simply that KolmogorovSmirnovTest goes very quickly to zero for distributions the "look" fairly similar, especially if you have a large number of points. – george2079 Sep 10 '14 at 20:56
• @george2079 that's certainly possible, though the qq plot seems to indicate that the distributions are largely the same away from the tails, which I would think would making them somewhat K-S friendly. But I really don't know enough about the subject (though trying to learn). – Igor Rivin Sep 10 '14 at 21:04
• @george2079 By the way, the data sets had 100000 and 200000 points, for what it's worth, and the K-S value was EXACTLY 0., no fuzz at all, which seems like a possible bug. – Igor Rivin Sep 10 '14 at 21:05
• Regarding the name of this thread, I will mention that 6 out of every 5 people suffer from statistics confusion. – Daniel Lichtblau Sep 12 '14 at 19:29