By. M.A.Yulianto.*)

This test is used for deciding whether k independent samples are from different populations.  Data under study are in ranking form or quantitative but the normality assumption is not fulfilled.  If the data are quantitative and have normality assumption then we can use one way ANOVA test rather than Kruskal-Wallis test.  The one way ANOVA test  will not be explained in this session, it will be explained in another writing session.  The Kruskal-Wallis technique tests the null hypothesis that the k samples come from the same population or from identical populations with the same median.  The alternative hypothesis will specify at least one pair of groups has different medians.

Procedure of Kruskal-Wallis test:

  1. Rank all of the observations for the k groups in a single series, assigning ranks from 1 to n (n = n1 + n2 +…..+ nk).  if the observations are the same, then the ranks are to be averaged.
  2. The form for the Kruskal-Wallis test is the H test as follows


                      Tj is the total of ranks

3.  The rejection area is  H > χ2 , K-1)

If  there are observations involved in ties, the computation of  the H value could be corrected by dividing it with a factor


ti = number of tied ranks in the ith grouping

g = number of groupings of different tied ranks

n = total number of observations for all samples


The fast food restaurant management really wants to know the customers opinion about the service, cleanliness, and food quality of their restaurant.  The management compares the result rating from the customers for the three different shifts that are

Shift 1: 04.00 pm – midnight

Shift 2: midnight – 08.00 am

Shift 3: 08.00 am – 04.00 pm

Customres are given the opportunity to fill out customer comment cards. 10 customer cards were randomly selected  from each shift. Ratings are categorized into four categories

4 = excellent,   3 = good,         2 = fair,                        1 = poor

with 5% significant level, can the management say that their employees have given the same speed of service among the three shifts?

data are listed as follow


H0 : The locations of all three populations are the same

H1 : At least two population locations differ

Test statistic:

From the data above, we have g = 4 si the number of groups of ties,

t1 =3  (observations with values of 1)

t2 =6  (observations with values of 2)

t3 =14  (observations with values of 3)

t4 =7  (observations with values of 4)

Conclution:  There is not enough evidence to infer that a difference in speed of service exists among the three shifts the 95% level of confidence.

Multiple Comparisons Between Treatments

When the obtained value of H is significant, it indicates that at least one of the groups is different from at least one of the others.  It does not tell the researcher which ones are different, nor does it tell the researcher how many of the groups are different from each other.

Because there is no the difference between groups exceeding the critical value, so it may be concluded that no one of these medians are differences.

It should be carefully noted that, if the sample sizes are unequal then each of the observed differences would have to be compared against different critical differences.



See you in other writing sessions, have enjoying statistics.

Any questions, send to the e-mail address:

*)  Writer is a lecturer in The Institute of Statistics, Jakarta, Indonesia.

Bachelor of  Statistics from The Institute of Statistics, Jakarta, Indonesia.

Master of Science in Experimental Statistics from NMSU, USA.














  1. Pingback: Your Questions About Relationship Test | Signs You Met the Right One

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s