title: difference between Kruskal-Wallis and Wilcoxon tests in R
body: <p>for two datasets (short and long) we carried out NON-parametric hypothesis tests.</p>
  
  <ul>
  <li>The first one is  Wilcoxon gives p-value = 1.824e-06 &lt; 0.025 and we do reject Ho;</li>
  <li>The second one is Kruskal-Wallis gives p-value = 0.4651 > 0.025 and we do NOT reject Ho.</li>
  </ul>
  
  <p>I have different p-values. Why? What did I do wrong?</p>
  
  <pre><code>&gt; wilcox.test(unique(short), unique(long), paired=TRUE) 
  data:  unique(short) and unique(long)
  V = 0, p-value = 1.824e-06
  alternative hypothesis: true location shift is not equal to 0
  
  &gt; kruskal.test(unique(short),unique(long), paired=TRUE)
  Kruskal-Wallis rank sum test
  data:  unique(short) and unique(long)
  Kruskal-Wallis chi-squared = 29, df = 29, p-value = 0.4651
  </code></pre>
  
  <p>PS.</p>
  
  <pre><code>&gt; ks.test(unique(short),"plnorm")
  One-sample Kolmogorov-Smirnov test
  data:  unique(short)
  D = 0.22942, p-value = 0.07181
  alternative hypothesis: two-sided
  
  &gt; ks.test(unique(long),"plnorm")
  One-sample Kolmogorov-Smirnov test
  data:  unique(long)
  D = 0.56416, p-value = 1.539e-09
  alternative hypothesis: two-sided
  </code></pre>