Not sure this is the right statistical method? Use the Choose Your StatsTest workflow to select the right method.
What is a Single Sample Wilcoxon Signed-Rank Test?
The Single Sample Wilcoxon Signed-Rank Test is a statistical test used to determine if a single group is significantly different from a known or hypothesized population value on your variable of interest when your variable of interest is skewed (leaning left or right with most of the data on the edge rather than in the middle). Your variable of interest should be continuous and you should have enough data (at least more than 5 values, but often more than 200 values are required).
The One Sample Wilcoxon Signed-Rank Test is also called the One Sample Wilcoxon Test, Single Sample Wilcoxon Test, One Sample Wilcoxon Sign Test, and the Single Sample Wilcoxon Sign Test
Assumptions for a Single Sample 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 Single Sample Wilcoxon Signed-Rank Test include:
- Random Sample
Let’s dive in to each one of these separately.
The variable that you care about (and want to see if it is different between your group and the population) 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) and you have more than 5 in each group then you should use the One-Proportion Z-Test. If your variable of interest is a proportion and you have less than 5 in a group, you should use the Exact Test of Goodness of Fit.
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 you would compare that to a known population weight for non-sugary-soda drinkers.
The key here is that the data points for your group were randomly selected. This is important because if your group is 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 very limited. You should try to get a simple random sample.
If you have paired samples (2 measurements from the same group of subjects) then you should use a Paired Samples T-Test if your variable of interest is normal, or a Wilcoxon Signed-Rank Test if your variable of interest is skewed. If you want to compare 2 groups of subjects instead of a single group with a population mean, then you should use an Independent Samples T-Test if your data are normally distributed, or a Mann-Whitney U Test if your variable of interest is skewed.
The sample size (or data set size) should be greater than 5 in your group.
The more nuanced answer is that it depends on the expected size of the difference between your group and the population. If you expect a large difference between groups, then you can get away with a smaller sample size. If you expect a small difference between groups, then you likely need a larger sample (200+).
If your sample size is greater than 30 (and you know the average and standard deviation or spread of the population values), you should run a Single Sample Z-Test if your variable of interest is normally distributed.
When to use a Single Sample Wilcoxon Signed-Rank Test?
You should use a Single Sample Wilcoxon Signed-Rank Test in the following scenario:
- You want to know if one group is different from a known or hypothesized population value on your variable of interest
- Your variable of interest is continuous
- You have one group
- Your variable of interest is skewed
Let’s clarify these to help you know when to use a Single Sample Wilcoxon Signed-Rank Test.
You are looking for a statistical test to see whether a single group is significantly different from a population value 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).
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.).
A Single Sample Wilcoxon Signed-Rank Test can only be used to compare a single group with a known population value on your variable of interest.
If you have three or more groups, you should use a One Way Anova analysis if your variable of interest is normally distributed, or a Kruskal-Wallis One-Way ANOVA if your variable of interest is skewed. If you have two groups to compare, you should use an Independent Samples T-Test if normally distributed, and the Mann-Whitney U Test if skewed.
Skewed Variable of Interest
Skewed means that your variable of interest leans left or right with most of the data on the edge rather than in the middle when you plot your data in a histogram.
If you get a group of students to take a pre-test and the same students to take a post-test, you have two different variables for the same group of students, which would be paired data, in which case you would need to use a Paired Samples T-Test if your data are normally distributed, or the Wilcoxon Signed-Rank Test if your data are skewed.
Single Sample Wilcoxon Signed-Rank Test Example
Group 1: Received the experimental medical treatment.
Population Value: On average in the population, it takes 12 days to recover from the disease
Variable of interest: Time to recover from the disease in days.
In this example, group 1 is our treatment group because they received the experimental medical treatment. The population value is essentially our control group because they did not receive the treatment.
The null hypothesis, which is statistical lingo for what would happen if the treatment does nothing, is that group 1 and our population will recover from the disease in about the same number of days, on average. We are trying to determine if receiving the experimental medical treatment will shorten the number of days it takes for patients to recover from the disease.
As we run the experiment, we track how long it takes for each patient to fully recover from the disease. In order to use a Single Sample Wilcoxon Signed-Rank Test on our data, our variable of interest should not be normally distributed (bell curve shaped). In this case, recovery from the disease in days is skewed for our treatment group, so we must use the Single Sample Wilcoxon Signed-Rank Test (skewed data) rather than the Single Sample T-Test (normal, as in bell curve shaped data).
After the experiment is over, we compare our treatment group to the population value on our variable of interest (days to fully recover) using a Single Sample Wilcoxon Signed-Rank Test. When we run the analysis, we get a p-value.
The p-value is the chance of seeing our results assuming the treatment 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.
Frequently Asked Questions
Q: What is the difference between a single sample t-test and a single sample wilcoxon signed-rank test?
A: You should use a single sample t-test when you have a normal (or bell curve shaped) variable of interest and the single sample wilcoxon signed-rank test when you have a skewed (leaning left/right) variable of interest.
Q: What if I don’t know the population average for my variable of interest?
A: You cannot run a single sample wilcoxon signed-rank test without a comparison group or value. You either need to collect data for a control group or find data on what the population average is.
Q: How do I run a single sample 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://www.scalelive.com/one-sample-median-test.html
SPSS video: https://www.youtube.com/watch?v=qTmfCjcRKls
R article: https://rcompanion.org/handbook/F_02.html
R video: https://www.youtube.com/watch?v=Smd92470MPo
If you still can’t figure something out, feel free to reach out.