I want to validate that two samples of data with ties do not come from the same underlying distribution. The data itself describes the repair cost of cars and has a continuous value range. My solution would be to use a 2-sample test to show this. If the H0 hypothesis is rejected I can infer that the two samples are generated by different distributions. My question refers to the choice of appropriate tests.

In the following post, it was argued that chi-squared is probably a bad choice and that even KS-test with ties would give better results: Test for difference between 2 empirical discrete distributions

Question 1: Could someone explain to me in more detail, why the chi-squared test is not a good choice and what problems it suffers from?

Question 2: If the data itself is continuous but the number of observations of the 2 samples is fixed (e.g., ranging between 60 and a couple of hundred), can I use the KS-test? In other words: Is the KS test applicable if I compare two samples with a fixed number of observations? Or would this test require two continuous probability density functions give proper results?

Question 3: Is there any other alternative test for this data apart from assessing the similarity visually or by comparing its moments?

Characteristics of the data:
In total I have 6 samples with sample sizes between 60 and a couple of hundred observations. The data describes repair costs of different types of cars, so there are almost as many levels as there are data points. Ties differ between 5 and 30 depending on the samples compared.

  • $\begingroup$ Can you say more? Are these data ordered? How many levels do they have? What's your sample size? $\endgroup$
    – AdamO
    Jun 16, 2017 at 17:11
  • 1
    $\begingroup$ This does not sound like discrete data. Are you just calling it discrete because repair costs are rounded to the nearest dollar? For the purposes of statistical analysis, this discreteness is only relevant if ties are very common. When you say "there are almost as many levels as there are data points", I think this is not a problem, and a straightforward KS test should be fine. (Also, a chi-square test would totally fail, because most "bins" would only have 0-1 counts.) $\endgroup$ Jun 16, 2017 at 18:23
  • $\begingroup$ I think essentatially, the question goes down to this: Does the KS test require two continuous probability density functions to be applicable or does it merely require two samples with continuous data? $\endgroup$
    – BjoSch
    Jun 17, 2017 at 8:17


Your Answer

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