1
$\begingroup$

While reading this link: http://www.statsdirect.com/help/Default.htm#nonparametric_methods/kruskal_wallis.htm, I came across the following:

"An alternative to Kruskal-Wallis is to perform a one way ANOVA on the ranks of the observations."

What precisely is a one-way ANOVA on the ranks in this context? I thought that is the K-W? If not, how does it differ from K-W exactly?

$\endgroup$
  • $\begingroup$ stats.stackexchange.com/q/115519/3277 or probably elswhere: this question has been already asked here. $\endgroup$ – ttnphns Nov 5 '14 at 10:29
  • 1
    $\begingroup$ It's almost the same as one-way ANOVA -- they no doubt mean to do it using an F-test exactly as in ANOVA; if instead you work out the permutation distribution of the statistic under the null, you should get an equivalent test to the exact K-W. $\endgroup$ – Glen_b -Reinstate Monica Nov 5 '14 at 11:11
1
$\begingroup$

I believe that the intent of 'one way ANOVA on the ranks' in that quote is to do an actual F-test just as in ANOVA; if instead you work out the permutation distribution of the statistic under the null, you'll get an equivalent test to the Kruskal-Wallis.

The F-statistic based on the ranks and the Kruskal-Wallis statistic are monotonically related:

ANOVA:

Let $\text{SSB}=\sum_{i=1}^g n_i(r_{i.}-\bar{r}_{..})^2$

$\quad\:\: \text{SSE} = \sum_{i=1}^{g}\sum_{j=1}^{n_i} (r_{ij}-\bar{r}_{i\cdot})^2$

$\quad\:\: \text{SST} = \sum_{i=1}^g\sum_{j=1}^{n_i}(r_{ij} - \bar{r})^2=\text{SSE}+\text{SSB}$

The usual ANOVA F statistic is $\frac{\text{SSB}/(g-1)}{\text{SSE}/(n-g)}$

Kruskal-Wallis:

The Kruskal-Wallis statistic is

$$K = (n-1)\frac{\sum_{i=1}^g n_i(\bar{r}_{i\cdot} - \bar{r})^2}{\sum_{i=1}^g\sum_{j=1}^{n_i}(r_{ij} - \bar{r})^2} = \frac{\text{SSB}/(g-1)}{SST/(n-1)}$$

$K=\frac{(n-1)}{(g-1)}\frac{\text{SSB}}{SSE+SSB}=\frac{(n-1)}{(g-1)}\frac{1}{1+\frac{\text{SSE}}{\text{SSB}}}$

We can easily see that the reciprocals of the two statistics are linear functions of $\frac{\text{SSE}}{\text{SSB}}$, so the two statistics themselves are monotonically related.

As a result, if we used tests with exactly the same type I error rate with either statistic, it would be an equivalent test.

In practice the difference is we don't usually use the exact distribution of either statistic for either test; except for very small samples, the Kruskal Wallis statistic is typically compared with a chi-square distribution, and one-way ANOVA on the ranks would be compared with an F. Both are approximate and because of those approximations, they don't quite reject exactly the same cases* because they're not conducted at identical significance levels.

* (but they nearly do)

$\endgroup$

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.