I have a large dataset containing the peak velocities of different people. I have then split this dataset into two depending on an attribute (for example male vs. female). Each dataset now contains approximately 30000 values. From this I have then created plotted the probability distributions of the two groups to see how they compare. This looks like the following:

enter image description here

I am quite new to statistics so am unsure how I could go about testing how different these two datasets are. Just by looking I would say there is some difference near the peak of both distributions and in the range 100-150 peak velocity. I want to know some statsitical method to show these differences I see are significant or not.

I originally thought of a student t-test, but I believe that is only for gaussian distributed data. From reading online, a two-sample Kolmogorov-Smirnov seems suitable to use as it is used to test whether two underlying one-dimensional probability distributions differ. However when I apply this to the datasets, I get a p-value that is basically 0. This seems a bit unlikely as the two datasets look very similar.

I hope I have given enough information, but if not please let me know. Thanks you.

  • 2
    $\begingroup$ There are different things you can test about two distributions. For instance, you can use the t-test to test differences in means. (Contrary to common misconceptions, this test can definitely be applied in your case with non-normal distributions.) Kolmogorov-Smirnov tests a different thing, namely whether the two samples come from the same distribution. This is a different and stronger question - two samples can come from different distributions, yet have identical means. ... $\endgroup$ Commented Nov 23, 2022 at 11:51
  • 1
    $\begingroup$ ... Your tiny p value comes from your large sample size. Roughly speaking, if you sampled 30,000 observations from the same distribution (which is the null hypothesis the K-S test tests), then it would be exceedingly unlikely to get histograms that differ this much. Yes, the difference is not large. But the key thing about statistical significance testing is that tiny observed differences will be statistically significant if your sample size is large enough. $\endgroup$ Commented Nov 23, 2022 at 11:54
  • 2
    $\begingroup$ So, for us to help you, it would be good to understand what you are most interested in (differences in means, differences in overall distributions, etc.), and what the substantive question you are looking at is. $\endgroup$ Commented Nov 23, 2022 at 11:54
  • $\begingroup$ @StephanKolassa Thank you for the reply. The main thing I am most intersted in is the difference in overall distribution. So for example I want to be able to say something along the lines of "members of group B are more likely to have a higher peak velocity in the region X by an amount Y, with a significance of Z" Perhaps that is not the best way to phrase it, but the general idea is I'm interested in how the two groups velocities are differing distribution wise primarily. $\endgroup$
    – matte_fin
    Commented Nov 23, 2022 at 13:43
  • $\begingroup$ @StephanKolassa adding to your point regarding my large sample size, is there some way I can account for this to get a more reasonable p value? $\endgroup$
    – matte_fin
    Commented Nov 23, 2022 at 13:44


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.