## What Is the Wilcoxon Test?

The Wilcoxon test, which can refer to either the Rank Sum test or the Signed Rank test version, is a nonparametric statistical test that compares two paired groups. The tests essentially calculate the difference between sets of pairs and analyzes these differences to establish if they are statistically significantly different from one another.

### Key Takeaways

- The Wilcoxon test is a nonparametric statistical test that compares two paired groups, and comes in two versions the Rank Sum test or the Signed Rank test.
- The goal of the test is to determine if two or more sets of pairs are different from one another in a statistically significant manner.
- Both versions of the model assume that the pairs in the data come from dependent populations, i.e. following the same person or share price through time or place.

## The Basics of the Wilcoxon Test

The Rank Sum and Signed Rank tests were both proposed by American statistician Frank Wilcoxon in a groundbreaking research paper published in 1945. The tests laid the foundation for hypothesis testing of nonparametric statistics, which are used for population data that can be ranked but do not have numerical values, such as customer satisfaction or music reviews. Nonparametric distributions do not have parameters and cannot be defined by an equation as parametric distributions can.

The types of questions that the Wilcoxon Test can help us answer include things like:

- Are test scores different from 5th grade to 5th grade for the same students?
- Does a particular drug have an effect on health when tested on the same individuals?

These models assume that the data comes from two matched, or dependent, populations, following the same person or stock through time or place. The data is also assumed to be continuous as opposed to discrete. Because it is a non-parametric test it does not require a particular probability distribution of the dependent variable in the analysis.

## Versions of the Wilcoxon Test

- The Wilcoxon Rank Sum test can be used to test the null hypothesis that two populations have the same continuous distribution. The base assumptions necessary to employ this method of testing is that the data are from the same population and are paired, the data can be measured on at least an interval scale, and the data were chosen randomly and independently.
- The Wilcoxon Signed Rank test assumes that there is information in the magnitudes and signs of the differences between paired observations. As the nonparametric equivalent of the paired student's t-test, the Signed Rank can be used as an alternative to the t-test when the population data does not follow a normal distribution.

## Calculating a Wilcoxon Test Statistic

The steps for arriving at a Wilcoxon Signed-Ranks Test Statistic, *W, *are as follows:

- For each item in a sample of
*n*items, obtain a difference score D_{i}between two measurements (i.e., subtract one from the other). - Neglect then positive or negative signs and obtain a set of
*n*absolute differences |D_{i}|. - Omit difference scores of zero, giving you a set of
*n*non-zero absolute difference scores, where*n' ≤ n*. Thus,*n'*becomes the actual sample size. - Then, assign ranks R
_{i}from 1 to*n*to each of the |D_{i}| such that the smallest absolute difference score gets rank 1 and the largest gets rank*n*. If two or more |D_{i}| are equal, they are each assigned the average rank of the ranks they would have been assigned individually had ties in the data not occurred. - Now reassign the symbol “+” or “–” to each of the
*n*ranks R_{i}, depending on whether Di was originally positive or negative. - The Wilcoxon test statistic
*W*is subsequently obtained as the sum of the positive ranks.

In practice, this test is easily performed using statistical analysis software or a spreadsheet.