6
$\begingroup$

Let's say, I have 100 students, each of them have 2 scores: reading score and writing score, so basically I will have 2 vectors with the length of each is 100.

I want to test the distribution of reading score and writing score are the same or not, so I want to use Kolmogorov-Smirnov test, but is it okay to run the test with dependent data?

$\endgroup$
  • $\begingroup$ Welcome to our site! I've removed the reference to R in the title, because your question is really completely software-agnostic - it's about the underlying statistical issue of whether the procedure is valid.. $\endgroup$ – Silverfish Nov 4 '15 at 15:58
  • $\begingroup$ Did you find a way to test the distributions for these paired dependent samples? I am facing the same problem and not sure how to proceed. $\endgroup$ – Confounded Apr 13 '18 at 10:10
2
$\begingroup$

the Kolmogorov-Smirnov test is only to be used, if the samples are independent. However, here you can find a script that does the job in form of a permutation test (in R). Hope this helped.

$\endgroup$
  • 2
    $\begingroup$ Can you explain the permutation test you're suggesting? How does it work? $\endgroup$ – Glen_b Nov 4 '15 at 22:04
  • $\begingroup$ No, actually not. When I was posting this answer, I was a bit in a rush and I thought a simple one-liner would be a little rude/insufficient. So, I quickly googled the problem and posted what I found without actually spending much time to check whether the proposed solution is indeed a good one. $\endgroup$ – userE Nov 5 '15 at 8:07
  • 2
    $\begingroup$ For future readers, the linked permuation test is deeply flawed: It calculates a CI for the ks statistics by randomly selecting about half of the data many times, and then comparing it to the ks statisic of the original two datasets. But since the Ks statistic is dependent on the number of observations used (and the resampled use only about half of the full dataset), the resulting pvalue will be way off. $\endgroup$ – Leander Moesinger Sep 18 '18 at 8:19

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.