# Wilcoxon Signed-Rank Test

Not sure this is the right statistical method? Use the Choose Your StatsTest workflow to select the right method.

## What is the Wilcoxon Signed-Rank Test?

The Wilcoxon Signed-Rank Test is a statistical test used to determine if 2 measurements from a single group are significantly different from each other on your variable of interest. Your variable of interest should be continuous and your group randomly sampled to meet the assumptions of this test.

The Wilcoxon Signed-Rank Test is also called the Matched Pairs Wilcoxon Test, Wilcoxon T-Test, Wilcoxon Sign Test, and the Wilcoxon Matched Pairs Signed-Rank Test.

## Assumptions for the Wilcoxon Signed-Rank Test

Every statistical method has assumptions. Assumptions mean that your data must satisfy certain properties in order for statistical method results to be accurate.

The assumptions for the Wilcoxon Signed-Rank Test include:

1. Continuous
2. Skewed Distribution
3. Random Sample

Let’s dive in to each one of these separately.

#### Continuous

The variable that you care about (and want to see if it is different between the two groups) must be continuous. Continuous means that the variable can take on any reasonable value.

Some good examples of continuous variables include age, weight, height, test scores, survey scores, yearly salary, etc.

If the variable that you care about is a proportion (48% of males voted vs 56% of females voted) then you should probably use the McNemar Test instead.

#### Skewed Distribution

The variable that you care about does not need to be bell shaped. In statistics, this is called being normally distributed (it looks like a bell curve when you graph the data). You are free to use the Wilcoxon Signed-Rank Test when the variable you care about is skewed rather than normally distributed.

If your variable is normally distributed, you should use a Paired Samples T-Test instead.

#### Random Sample

The data points for each group in your analysis must have come from a simple random sample. This means that if you wanted to see if drinking sugary soda makes you gain weight, you would need to randomly select a group of soda drinkers for your soda drinker group, and then randomly select a group of non-soda drinkers for your non-soda drinking group.

The key here is that the data points for each group were randomly selected. This is important because if your groups were not randomly determined then your analysis will be incorrect. In statistical terms this is called bias, or a tendency to have incorrect results because of bad data.

If you do not have a random sample, the conclusions you can draw from your results are limited. You should try to get a simple random sample. If you want to compare independent samples from two groups, then you should use a Mann-Whitney U Test instead.

#### Similar Shape Between Groups

In order to say that your 2 groups are different based on their average (or median in this case), your 2 groups must be similarly shaped when you graph them as histograms. If they are similarly shaped, you can say the medians (or averages) are different if the Wilcoxon Signed-Rank Test is significant.

If your 2 groups are not similarly shaped, then you can talk about the difference between the groups in your results, but you cannot argue for a difference in average value (or median).

## When to use a Wilcoxon Signed-Rank Test?

You should use a Wilcoxon Signed-Rank Test in the following scenario:

1. You want to know if two groups are different on your variable of interest
2. Your variable of interest is continuous
3. You have two and only two groups
4. You have independent samples
5. You have a skewed variable of interest

Let’s clarify these to help you know when to use the Wilcoxon Signed-Rank Test.

#### Difference

You are looking for a statistical test to see whether two groups are significantly different on your variable of interest. This is a difference question. Other types of analyses include examining the relationship between two variables (correlation) or predicting one variable using another variable (prediction).

#### Continuous Data

Your variable of interest must be continuous. Continuous means that your variable of interest can basically take on any value, such as heart rate, height, weight, number of ice cream bars you can eat in 1 minute, etc.

Types of data that are NOT continuous include ordered data (such as finishing place in a race, best business rankings, etc.), categorical data (gender, eye color, race, etc.), or binary data (purchased the product or not, has the disease or not, etc.).

#### Two Groups

A Wilcoxon Signed-Rank Test can only be used when you have two observations from a single group on your variable of interest.

If you have three or more groups, you should use One-Way Repeated Measures ANOVA if your variable of interest is normally distributed or a Friedman Test if your variable of interest is skewed.

#### Paired Samples

Paired samples means that your two “groups” consist of data from the same group observed at multiple points in time. For example, if you randomly sample men at two points in time to get their IQ score, then the two observations are paired.

If you want to compare two independent groups, then you probably want to use the Mann-Whitney U Test.

#### Skewed Variable of Interest

Normality was discussed earlier on this page and simply means your plotted data is bell shaped with most of the data in the middle. If you actually would like to prove that your data is normal or skewed, you can use the Kolmogorov-Smirnov test or the Shapiro-Wilk test.

## Wilcoxon Signed-Rank Test Example

Observation 1: A group of people were evaluated at baseline.
Observation 2: This same group of people were evaluated after a 12-week exercise program.
Variable of interest: Number of pushups performed in 1 minute.

In this example, we have one group with two observations, meaning that the data are paired.

The null hypothesis, which is statistical lingo for what would happen if the exercise program has no effect, is that there will be no difference in number of pushups performed before and after the exercise program.

We typically use the Wilcoxon Signed-Rank Test when our variable of interest is skewed, meaning it is not normally distributed (skewed means leaning left or right with the majority of the data on the edge). In this case, the number of pushups performed in 1 minute is skewed both before and after the exercise program.

When we run the analysis, we get a test statistic (typically a Z or a T) and a p-value.

The test statistic is a measure of how different the group is on our pushups variable of interest. A p-value is the chance of seeing our results assuming the exercise program actually doesn’t do anything. A p-value less than or equal to 0.05 means that our result is statistically significant and we can trust that the difference is not due to chance alone.

Q: How do I run a Wilcoxon Signed-Rank test in SPSS or R?
A: This resource is focused on helping you pick the right statistical method every time. There are many resources available to help you figure out how to run this method with your data:
SPSS article: https://statistics.laerd.com/spss-tutorials/wilcoxon-signed-rank-test-using-spss-statistics.php 