Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to optimize a physical model using kolmogorov-smirnov test between the experimental data and generated data. The output of ks.text(x,y) give me the distance D and the p-value. Which is the relation between them and which is suitable for my task? namely i should take the model that give me a smaller distance or a smaller p-value?

share|improve this question
up vote 2 down vote accepted

A low p-value means that it is likeley that the data is different from the model. So you want a high p-value to have a good fitting.

share|improve this answer
This is not entirely true. Small p-value (smaller than your threshold 0.01, 0.05) tells you that the null hypothesis is false while having a big p-value tells that you can't false it (this it's not the same as saying that null hypothesis is true). – Daniel Sep 6 '14 at 18:35
@Daniel: Yes that's right. But I thought at that level the answer is "good enough". Don't you agree? – Dr. Manuel Kuehner Sep 8 '14 at 7:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.