Talk:Kruskal–Wallis test

message: It would be good to mention what types of data this can be applied to. eg: numerical vs. ordinal vs. categorical vs. binary?   — Preceding unsigned comment added by Drevicko (talk • contribs) 04:54, 28 February 2023 (UTC)
thread_title: Assumptions on type of data missed

message: The statement "A significant Kruskal–Wallis test indicates that at least one sample stochastically dominates one other sample" is already false for the Wilcoxon-Mann-Whitney test the Kruskal-Wallis is meant to extend to more than two samples. It could then only be true if the model were specified to "equal or at least stochastically ordered" or similar, or if Kruskal-Wallis were not an extension of Wilcoxon-Mann-Whitney. 
Have forgotten how to log in; I am Lutz Mattner.  — Preceding unsigned comment added by 2003:C0:8F0A:CD00:7306:7998:C852:DB14 (talk) 09:50, 23 January 2023 (UTC)
thread_title: Meaning of significance is misstated

message: The Kruskal-Wallis test is designed to detect stochastic dominance, so the null hypothesis is the absence of stochastic dominance. Using multi-modal distributions you can quickly generate counter examples to the claim "the null hypothesis of the Kruskal-Wallis is equal distribution of the samples". For example, if you have three sets of samples with the same median but from a uni-modal, bi-modal, and tri-modal distribution respectively, then necessarily the Kruskal-Wallis test will fail to reject the null hypothesis, as there is no stochastic dominance. Yet this does not indicate the samples are from the same distribution.  — Preceding unsigned comment added by 198.161.4.94 (talk) 16:59, 21 June 2018 (UTC)
thread_title: Null Hypothesis is misstated

message: Response: Don't lose site of the assumptions. This test is performed under the assumption that the distributions all have the same shape. The assumption is not tested in a hypothesis test, rather the hypothesis is. The assumptions are there to let us know when the method is supposed to work. So your example of three differently shaped distributions does not qualify as a counter example to any inference drawn by applying this test. The test shouldn't be applied in your setting.   
Secondly, regarding the statement of the null hypothesis, one could argue that it is commonly misinterpreted, but I wouldn't agree that it is misstated. If we really are (that's what an assumption means) acquiring data from k data generating processes that can only differ in their location, then a test of common location can be based on their medians. The standard null hypothesis is that all the distributions have the same median. It could just as well be that they all have the same 10th percentile, or the same mean since when the distributions have the same shape they have the same 10th percentiles and the same means etc. I've heard people say the Kruskal-Wallis test only compares medians and that it can't be used to compare means. That is a misinterpretation of the null hypothesis since under the assumptions (so when the distributions really have the same shape and can only differ in their locations) by rejecting the claim that they all have the same median, we are also rejecting that they all have the same 10th percentile and that they all have the same mean etc.2601:183:C801:A350:5D2D:6EA3:7E3A:7E32 (talk) 01:47, 10 September 2021 (UTC)
thread_title:  Disagreement 

message: The formula of the test statistic K is unnecessarily complicated. There is a much simpler form:
:K = \frac{12}{n(n+1)}\sum_{i=1}^m n_i\left(R_{i\cdot} - \frac{n+1}{2}\right)^2=\frac{12}{n(n+1)}\sum_{i=1}^m \left(\frac 1{n_i} \left(\sum_{j=1}^{n_i} R_{ij}\right)^2 \right) - 3(n+1)
Nijdam 21:17, 18 August 2006 (UTC)
thread_title: Untitled

message: the kruskal-wallis test does not test the significance of medians between samples, it tests the means. So this sentence is wrong:
"In statistics, the Kruskal-Wallis one-way analysis of variance by ranks (named after William Kruskal and W. Allen Wallis) is a non-parametric method for testing equality of population medians among groups"  —Preceding unsigned comment added by 71.76.4.55 (talk) 03:18, 4 October 2007 (UTC)
replies: text: Both the above comments are in error. The Kruskal-Wallis test is, in its most general application, a test of the null hypothesis that there is no stochastic dominance between any of the groups tested (i.e. H0: P(Xi > Xj) = 0.5 for all groups i and j, with HA: P(Xi > Xj) ≠ 0.5 for at least one i ≠ j). These hypotheses, and this test are not about means. I have cleaned up the article to refer correctly to stochastic dominance.--Lexy-lou (talk) 15:56, 23 July 2014 (UTC)
thread_title:  not testing medians 

message: The null hypothesis is that all populations have the same distribution. Kruskal-Wallis assumes that the errors in observations are i.i.d. (in the same way that parametric ANOVA assumes i.i.d. N(0,\sigma^2) errors; Kruskal-Wallis drops only the normality assumption). The test is designed to detect simple shifts in location (mean or median - same thing here) among the populations. If one starts allowing more complicated differences between distributions (e.g. changes in shape), then all bets are off. It's easy to construct examples of populations with equal medians, or examples of populations with equal means, that will lead to inflated K-W statistics and high probability of rejection of "equality".
Not surprisingly many web sites, software manuals, texts, etc get carried away by the word "nonparametric", and make interpretations of the K-W statistic that simply aren't true.
--Zaqrfv (talk) 05:39, 12 August 2008 (UTC)
replies: text: The Kruskal-Wallis test is indeed, in its most general application, a test of the null hypothesis that there is no stochastic dominance between any of the groups tested (i.e. H0: P(Xi > Xj) = 0.5 for all groups i and j, with HA: P(Xi > Xj) ≠ 0.5 for at least one i ≠ j). These hypotheses, and this test are not about means. I have cleaned up the article to refer correctly to stochastic dominance.--Lexy-lou (talk) 15:56, 23 July 2014 (UTC)
thread_title:  not testing means or medians. 

message: So far i can see the (N-1) factor in first formular is correct a (N-2) factor.
The denominator is not (N-1)*N*(N+1). The true is (N-2)*(N-1)*N.
With this we get the same conclusions as in the article.  
also: it looks as though it should be sigma R^2/n, not sigma nR^2
—Preceding unsigned comment added by 217.10.60.85 (talk) 07:45, 18 May 2009 (UTC)
thread_title:  Error in first formular 

message: Every other variable seems to be explained immediately after the equation except the upper bound of the sums "g".
161.208.26.33 (talk) 15:29, 3 June 2019 (UTC)
thread_title:  "g" variable is undefined in equation stating test 

message: In this edit  restored an edit that I had previously reverted in which the Kruskal-Wallis test is applied to a set of ozone level readings. The cited source (Chambers et al. Graphical Methods for Data Analysis) provides the data, but the analysis was unsourced, and so I reverted it as original research. Quantile restored the example, with the edit summary The application to the ozone data is not original research. It is taken directly from the R documentation. See for example https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/kruskal.test. I would argue that this may not be a reliable source since R modules may be user-generated. WikiDan61ChatMe!ReadMe!! 19:55, 16 March 2023 (UTC)
thread_title:  Recent addition of example based on [[R (programming language)|R]] documentation site