Welcome to the website of the e-documents "**The Kruskal-Wallis Test with Excel 2010 in 3 Simple Steps**," and "**The Kruskal-Wallis Test with Excel 2007 in 3 Simple Steps**." The purpose of these documents is to show you a few simple steps for implementing the Kruskal-Wallis test using MS Excel (versions 2003, 2007, or 2010). The proposed solution is based on
a user-friendly Excel Macro program called Kruskal-Wallis2007.xlsm (for Excel 2007 or earlier versions), or Kruskal-Wallis2010.xlsm (for Excel 2010 or a more recent version). These macro programs require no
installation at all and will do all the work for you. They come in the form of a stand-alone Excel workbook that you use to capture your input data and to perform the Kruskal-Wallis test. This is the simplest and most user-friendly method for conducting the Kruskal-Wallis test.

- If you are using MS Excel 2007 or an older version, download (
**free of charge**) the PDF document along with the Excel program "*The Kruskal-Wallis Test for Excel 2007 in 3 Simple Steps*." - If you are using MS Excel 2010, download (
**free of charge**) the PDF document along with the Excel program "*The Kruskal-Wallis Test for Excel 2010 in 3 Simple Steps*."

The free versions of these documents provide a detailed description of the Excel solutions for the Kruskal-Wallis test, and have the trial version of the Kruskal-Wallis Excel macro program attached to them. When you are statisfied with the solution (and you will surely be) then download the full version of the PDF document for only $9.95, with the full version of the Excel macro attached. Click here to see some screenshots. If you are unable to run this macro, it is likely due to a security update recently released by Microsoft that was installed on your computer. Please check the link http://support.microsoft.com/kb/3025036/EN-US

to see what Microsoft suggests to do to get the program running.

Order Kruskal-Wallis with Excel 2010 for only $9.95 | Order Kruskal-Wallis with Excel 2007 for only $9.95 | Visit Advanced Analytics Press Online |

##### What is the Kruskal-Wallist Test?

The single-factor ANOVA requires the law of probability underlying the data to be reasonably close to the Normal distribution, and the population variances to show some homogeneity. You may not feel comfortable with one or both of these assumptions. An alternative approach widely used by researchers is the Kruskal-Wallis test. It was suggested by Kruskal (1952) and, Kruskal and Wallis (1952), and requires the data to be ordinal. This test was designed primarily to compare population medians, and not population means. Should this

be a problem ? Not really. In fact, if the underlying populations are symmetric, population means and medians become identical. Otherwise, the median is what you should be interested in.

The Kruskal-Wallis test generalizes the Mann-Whitney test to 3 populations or more. Both tests are based on ranks instead of raw data, which makes them applicable to a variety of data types. In that sense, the Kruskal-Wallis test is another nonparametric test, which does not require the data to follow a particular law of probability. The downside being the loss of power due to the use of ranks in place of actual measurements.

The Kruskal-Wallis Test Statistic

Assuming that you want to compare *k* population means, the hypotheses would be formulated as follows:

Whether represents the population mean or the population median is irrelevant when defining the Kruskal-Wallis test. You will not be estimating these parameters. Instead, you will merely be comparing them.

The Kruskal-Wallis test statistic will be denoted by H. It is calculated by
first ranking all observations (all samples combined) in ascending order from 1 to . Let be the average of the ranks associated with sample *i*, and the average of all ranks. The test staistic labeled as **H** is calculated as follows:

where is the number of observations in sample *i*. The law of probability associated with this test statistic is well approximated by the Chi-square distribution with k−1 degrees of freedom, when the null hypothesis is true. If the null hypothesis is true, then all population distributions would be the same. Any random sample taken from any population would yield approximately the same mean rank Ri·. This would lead to a small value for the H statistic, which by the way tells you how far you expect the mean rank from any given sample

to be away from the overall mean rank.

Let be the percentile of the chi-square distribution, where is the significance level of the test. The decision rule for the Kruskal- Wallis test if formulated as follows:

Validity Conditions

Several authors including Conover (1980, 1999), Daniel (1990), or Marascuilo and McSweeney (1977) mentioned a series of assumptions upon which they indicated the Kruskal-Wallis was based. These are:

- Each of the k samples is randomly selected from the population it represents. (A key aspect of this assumption is the need to avoid a large number of duplicates in the observations)
- The k samples under study are independent. (A key aspect of this assumption is to avoid using the Kruskal-Wallis test on repeated measurements taken on several occasions. Special repeated-measure procedures should be used (see Gwet (2011).)
- The analytic variable used for ranking is continuous. (This assumption is not critical to ensuring the validity of the Kruskal-Wallis test, and is often ignored by practitioners. The concern here is that if the null hypothesis of true, you want all k populations to be homogeneous, which may not quite be the case with discrete variables. If you are dealing with an unusual dataset, you may want to pay attention to this issue.)
- The probability distributions underlying the sample data are identical in their shape. (The purpose of this assumption is to ensure that a rejection of the null hypothesis can only be attributed to the difference in means.)
- Each independent sample has a size of 5 or more. (This ensures the validity of the chi-square approximation)

Download the e-book to learn more about the Kruskal-Wallis, and how ties for example are handled, and more ...