International Journal of Statistics and Applications
p-ISSN: 2168-5193 e-ISSN: 2168-5215
2015; 5(3): 113-119
doi:10.5923/j.statistics.20150503.03
Elsayed A. H. Elamir
Department of Statistics and Mathematics, Benha University, Egypt & Management & Marketing Department, College of Business, University of Bahrain, Kingdom of Bahrain
Correspondence to: Elsayed A. H. Elamir, Department of Statistics and Mathematics, Benha University, Egypt & Management & Marketing Department, College of Business, University of Bahrain, Kingdom of Bahrain.
| Email: | ![]() |
Copyright © 2015 Scientific & Academic Publishing. All Rights Reserved.
The Kruskal-Wallis is a non-parametric method for testing whether samples originate from the same distribution. When the null hypothesis is rejected, at least one sample stochastically dominates at least one other sample. The test does not identify where this stochastic dominance occurs. Consequently, a decision limit for Kruskal-Wallis test is derived based on the gamma distribution and Bonferonni approximation that shows graphically where this stochastic dominance occurs. Simulation studies confirm the validity and robustness of the decision limit in small and large samples. An application is given to illustrate the method.
Keywords: Bonferonni approximation, Chi square distribution, Gamma distribution, Nonparametric tests
Cite this paper: Elsayed A. H. Elamir, Kruskal-Wallis Test: A Graphical Way, International Journal of Statistics and Applications, Vol. 5 No. 3, 2015, pp. 113-119. doi: 10.5923/j.statistics.20150503.03.
are obtained from a continuous population with mean
and variance
is the number of groups or treatments and
is the sample size in each group. The model is 
is the global location of the data,
the difference to the location of the
group and
is the residual error; see, for example, [2]. Thus the null hypothesis can be expressed as
versus at least two medians or means are not equal.
are
The Kruskal-Wallis test is defined as
where
and
and it is assumed that the ties are handled by random method.This is distributed as
See, [10] and [1] and [11]. Also,
can be written as
The contribution of each standardized group mean rank in the test is defined as
Therefore, the Kruskal-Wallis test could be plotted as
This is called H-graph. To do this the sampling distribution of
is needed. The first thinking is gamma distribution where [1] used in small sample sizes and the chi square is a special case from it. 
is a gamma distribution or not, a simulation study is conducted to obtain the first four moments of
for
and
using simulated data from normal and exponential distributions with different sample sizes. Three sets of data are investigated (a) small
(b) medium
and large
The following steps are used in simulation:1. Simulate data from a distribution with the same mean for the required design.2. Rank the combined sample, compute
for each group and moments for each
3. Repeat this
times and compute average for each moments.Tables 1 and 2 gives the moments of
for
and
From Tables 1 and 2 it can conclude that 
|
|
for small
The gamma distribution is used to fit the sampling distribution of
by matching the first two moments; see, [1]. Since the first two moments for gamma distribution are
where
is the shape and
is the scale. Therefore,
Using the shape and the
parametrization then
It is clear that for large
the sampling distribution of
approaches chi square distribution with one degree of freedom.
If any point outside the decision limit,
is rejected and this will identify where stochastic dominance occurs.Since the test is written as sum of independent chi square random variables
and each term has almost the same distribution. Rather than working with whole distribution, it can do the test based on
with adjusted
using Bonferonni approximation. The advantage of this (a) it can tell which group is out of the limit (b) it can easily be used to compute the effect size.To find the decision limit for
there are multiple tests
and it is needed to distinguish between two meanings of
when performing multiple tests:1. The probability of making a Type I error when dealing only with a specific test. This probability is denoted
(“alpha per test"). It is also called the test-wise alpha.2. The probability of making at least one Type I error for the whole family of tests. This probability is denoted
(“alpha per family of tests”). It is also called the family-wise or the experiment-wise alpha. The probability of making at least one Type I error for a family of
tests is
This equation can be rewritten as
For more details; see, for example, [12] and [13]. A simpler approximation which is known as the Bonferonni approximation is
For example, to perform
and the risk of making at least one Type I error to an overall value of
with the Bonferonni approximation, a test reaches significance if its associated probability is smaller than
By using the quantile function of gamma distribution (for example, R-software), the decision limit is
Therefore,
is rejected. Note that this technique is related to analysis of means; see, for example, [14], [15] and [16].Figure 1 shows the graphical presentation of Kurskal-Wallis test for simulated data from normal and exponential distributions using
and total sample sizes 40.Figures 1 (a) and (c) show the H graph for data simulated from normal and exponential distributions with no shift in mean and it clear that no points outside the decision limit while Figures 1 (b) and (d) show the H graph for data simulated from normal and exponential distributions with shift in mean and is clear that there are points outside the decision limit.
must be contained in the interval
The choice of Bradley was
and this makes the interval is liberal. Therefore, in this study the choice of
a something in the middle between nothing and 0.025. Therefore, for the five percent level of significance, a test was considered robust in a particular condition if its empirical rate of Type I error fell within the interval
and for the one percent level of significance the choice of
a test was considered robust if its empirical rate of Type I error fell within the interval
. Correspondingly, a test was considered to be nonrobust if, for a particular condition, its Type I error rate was not contained in these intervals. Nonetheless, there is no one universal standard by which tests are judged to be robust, so different interpretations of the results are possible.Tables 3 and 4 contain empirical rates of Type I error for a design containing three and four groups, respectively. The tabled data indicates that 1. When the observations were obtained from normal distributions, rates of Type I error were controlled by KW and H methods for equal and non equal sample sizes.2. When the observations were obtained from non-normal distributions, rates of Type I error were controlled by KW and H methods for equal and non equal sample sizes.
|
|
|
This indicates that there is a systematic difference among the labs at 0.05 and 0.01 level of significance without telling anything about the differences. While H-graph in Figure 2 shows that there are two points outside the decision limit that indicates there is a systematic difference among the labs at 0.05 and 0.01 level of significance. Moreover identify the labs 1 and 4 as different from the overall mean.![]() | Figure 2. H-graph for the amount of chlopheniramine maleate in tablet data |