What is a Wilcoxon Signed-Rank Test?
The Wilcoxon signed-rank test is a non-parametric statistical technique and an alternative to the paired sample t-test. We use the Wilcoxon signed rank test when there is one continuous variable measured two times or under two conditions. To clarify, we use the Wilcoxon test to compare two sets of scores that come from the same participants but we should measure in two different periods or before and after some event for example, before and after the training.
The Wilcoxon Signed-Rank Test is a statistical test used to determine if two measurements from a single group are significantly different from each other on your variable of interest. The Wilcoxon Signed Rank test is a nonparametric alternative to a Paired Samples t-test. Non-parametric means that the test doesn’t assume your data comes from a particular distribution. The test doesn’t require the data to be normal but instead uses the rank of the data values instead of the actual data values for the analysis.
An Example Of Wilcoxon Signed Rank Test
For example, the researcher wants to examine the effect of psychotherapy on anxiety levels; therefore, the researcher measures the level of anxiety before psychotherapy and after psychotherapy.
What are the use of null and alternative hypothesis for the Wilcoxon Signed Rank?
Therefore, we test the following hypotheses:
Null hypothesis: There is no significant effect of psychotherapy on anxiety levels.
Alternative hypothesis: There is a significant effect of psychotherapy on anxiety levels.
R function to Compute Wilcoxon Signed Rank Test
The code to run a Wilcoxon Signed Rank test using R is as follows:
wilcox.test(x, y, Paired=TRUE, data = dataframe)
x: numeric vector (pre-scores)
y: numeric vector (post or follow-up scores)
paired: a logical value specifying that we want to compute a paired t-test