Time commitment
5 - 10 minutes
Description
The purpose of this video is to explain the Wilcoxon Signed-Rank Test, a nonparametric statistical method used to compare the median of a continuous or ordinal variable with a specified constant. We will guide you through the assumptions, step-by-step process, and how to interpret the results using SPSS.
Video
Transcript
What is a Wilcoxon signed-rank test? A Wilcoxon signed-rank test is used to determine whether the median of a single continuous variable differs from a specified constant.
I think I forgot to put something on the slide here, you can use a continuous variable or an ordinal variable here. So if you failed normality on a one-sample t-test, you could use the Wilcoxon signed-rank test, or if you were looking to check an ordinal variable for some reason, you could also do that here.
This is a nonparametric test, it does not assume normality; the data does not have to follow that standard bell-shaped curve.
And I've left some additional links on the slide in case you were looking for help. We have the U of G SPSS LibGuide or the SPSS documentation for help on that.
Assumptions [0:55]
What are the assumptions of the Wilcoxon signed-rank test? There's only one! You need one variable and it can be continuous or it can be ordinal.
Check assumption (continuous / ordinal) [1:05]
[Slide contains a screenshot of a table in SPSS within Data View. The table’s column headers are as follows: Gender, Fake_Data1, Fake_Data2, Fake_Data3, Fake_Data4, Colour, and Group.]
How do we check this assumption? Well, we can look at our data.
[Fake_Data1 column is highlighted.]
Here, we're going to be looking at Fake_Data1, and we're looking to see is this continuous, is this ordinal. If we glance at this dataset, we can see that we've got a range of values. We've got a bunch of decimals. Decimals are a pretty big giveaway that it's probably continuous. So we have passed this assumption, we've got continuous data in our Fake_Data1 dataset [variable].
Step 1 [1:30]
[Slide shows the table with the Analyze menu open and Nonparametric Tests selected. From the Nonparametric Tests sub-menu One Sample is highlighted.]
If you have passed your assumption, you can proceed to conducting the Wilcoxon signed-rank test. Make sure you always check your assumptions, though. To run a Wilcoxon signed-rank test, this one is one that SPSS hides a little bit. You're going to click where it says Analyze > Nonparametric Tests > One Sample.
It doesn't have the exact name of the test. If it helps, you can remember that this is the nonparametric equivalent of the one-sample t-test. To find this you go to where it says Analyze > Nonparametric Tests (because it's a nonparametric, it does not assume normality), and then the trick is you have to remember which other button to click. It's the nonparametric one-sample t-test, so you click where it says, “One Sample”.
Step 2 [2:23]
[One-Sample Nonparametric Tests dialog box with the Objective tab selected. The other tabs are labelled Fields and Settings. Under “What is your objective?”, three options are presented: "Automatically compare observed data to hypothesized," "Test sequence for randomness," and "Customize analysis" (which is selected).]
If you have clicked that, it will open the One-Sample Nonparametric Tests dialog box.
The non-parametric tests are a little frustrating, it's just more options that you need to do. You might have remembered when we did the t-test, we moved one thing, we added one number, we were good to go. Non-parametric is slightly more complicated. In the “Objective” tab, which is the tab that opens automatically, you need to click where it says, “Customize analysis”. In the Objective tab you click Customize analysis, then you click the “Fields” tab, because there's three different tabs for non-parametric tests.
Step 3 [3:02]
[One-Sample Nonparametric Tests dialog box with the Fields tab selected. Two options are available: "Use predefined roles" and "Use custom field assignments", with the latter selected. The Fields panel on the left lists available variables, including "0 = Male, 1 = Female," "Fake data: =90 + 5*rand()," and others. The Test Fields panel on the right contains "Fake data: =85 + 5*ran[Null d()", which has been selected for analysis.]
In the Fields tab, you have to take your one continuous or ordinal column (here we're using Fake_Data1, it's continuous, it's got that little yellow ruler next to it), and you move it from the “Fields:” section to the “Test Fields:” section. So you take your one piece, put it where it says Test Fields.
In the “Settings” tab, one last thing we have to do.
Step 4 [3:26]
[One-Sample Nonparametric Tests dialog box with the Settings tab selected. The Select and item panel lists Choose Tests, Test Options, and User-Missing Values, with Choose Tests selected. Two options are available: "Automatically choose the tests based on the data" and "Customize tests," with the latter selected. The customization options include checkboxes for Binomial test, Chi-Square test, Kolmogorov-Smirnov test, Wilcoxon signed-rank test, and Runs test. The Wilcoxon signed-rank test is checked, with a hypothesized median set to 85.]
You're going to click again where it says “Customize tests” because nonparametric tests, there are a lot of different options, you have to tell it which one you need. You have to say “Compare median to hypothesized” and then in brackets that says “(Wilcoxon signed-rank test)”. This is our non-parametric equivalent to the one-sample t-test, it's the Wilcoxon signed-rank test. You have to include a hypothesized median; so this might come from research, this might come from…Statistics Canada might have a mean or a median for you to put in here, but this will come from somewhere else. Maybe it's just something you hypothesized, you're like “Well, the median cats’ tail length might be “blank”.”, you put it into your spreadsheet. So here we're going to add a value of 85 and then we click “Run”.
Output [4:16]
[Nonparametric Tests output displayed in the Statistics Viewer window. The left panel shows the Output Navigator. The right panel presents results for a One-Sample Wilcoxon Signed Rank Test on Fake data: =85 + 5*rand(). The Hypothesis Test Summary table indicates a significance level (Sig.) < .001, leading to the rejection of the null hypothesis. The One-Sample Wilcoxon Signed Rank Test Summary displays a total N of 30, test statistic of 465.000, a standard error of 48.618, a standardized test statistic of 4.782, and asymptotic sig. (2-sided test) of < .001. Below, a bar chart visualizes the test results, with the hypothesized median (85.000) marked in green and the observed median (87.19) labeled in blue.]
And if you have done that, you will get an output that looks something like this. It looks clunky and a little weird if you're used to parametric tests, but it will give you a Hypothesis Test Summary table, which is essentially going to write out for you: What are you testing? What-test did you run? What's the p-value of that-test, and what should you do about it? This same p-value is going to be further down where it says One-Sample Wilcoxon Signed Rank Test Summary. This table tells you the N, or number of observations used, what your test statistic is, your standard error of the test, and then your p-value is going to be this last piece.
So you can either read it up top [in the Hypothesis Test Summary] and get the words of what you're supposed to be doing, or you can get it down here at the bottom [in the One-Sample Wilcoxon Signed Rank Test Summary].
[The asymptotic sig. (2-sided test) of < .001 is highlighted in the One-Sample Wilcoxon Signed Rank Test Summary.]
If your p-value is less than (<) .05, it means that the median of your column of data is different than the test median you've given it. So here we gave a value of 85, our median value is different than 85 because the p-value is less than (<) .05. If p is greater than (>) .05, we would be able to say, well, we can't say whether our median is different than the test median.
It will also give you a nice little graph that shows you in green the hypothesized median so that test value you put in (we put in 85), and it'll also show you the median of your actual data. So we can see that the green and blue lines are quite far apart and our p-value is less than (<) .05. We have found a difference between our median and the hypothesized median. And that's how you do a Wilcoxon signed-rank test.
License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
- Ask Chat is a collaborative service
- Ask Us Online Chat hours
- Contact Us