Your mistake is in choosing the Wilcoxon/Mann-Whitney rank-sum tests as your *post hoc* tests following the rejection of the Kruskal-Wallis. The appropriate *pos hoc* test is *Dunn's test*<sup>*</sup> which properly (1) accounts for *pooled variance* assumed by the null hypothesis, and (2) uses *the same ranks* for your data as used in the construction of the Kruskal-Wallis test. The vanilla rank-sum tests entail separate estimates of variance for each pair-wise test, and ignore the rankings of the total data set as performed with a Kruskal-Wallis test. Dunn's test is implemented for Stata in the [**dunntest**][2] package (within Stata type `net describe dunntest, from(https://alexisdinno.com/stata)`), and for R in the [**dunn.test**][1] package. Not sure about implementations in SAS. <br> **Reference** Dunn, O. J. (1964). Multiple comparisons using rank sums. *Technometrics*, 6(3):241–252. <sup>*</sup> There are some far less used alternatives to Dunn's test including the Conover-Iman (like Dunn, but based on the *t* distribution, rather than the *z* distribution, implemented for Stata in the [**conovertest**][3] package, and for R in the [**conover.test**](http://cran.r-project.org/web/packages/conover.test/) package), and the Dwass-Steel-Citchlow-Fligner tests. [1]: http://cran.r-project.org/web/packages/dunn.test/ [2]: https://alexisdinno.com/stata/dunntest.html [3]: https://alexisdinno.com/stata/conovertest.html