# Two related samples

↬ Analyse

Description

The Wilcoxon signed-rank test is a test of difference between related or paired samples using non-parametric data.

To undertake a Wilcoxon’s signed-test your data must meet two assumptions:

1. It must be paired and come from the same population.
2. The data must be measured of ordinal (within-pair comparison) or interval level data.

You can find out more about how to assess your data to see if it meets the assumptions for parametric tests here

The Wilcoxon test produces two outputs, a test statistic (‘W’, ‘T’ or ‘Z’)  as well as the p-value. The ‘W’ ‘V’, ‘T’ or ‘Z’ all denote slightly different things:

• T: is the smaller of the rank-totals, created as part of the analysis process. The smaller this value is the greater the probability a true difference is observed.
• W: is the sum of the signed ranks. In R this is reported as ‘V’
• Z: A conversion of the W value into a Z-score (which uses an approximation of a normal distribution)

• Wilcoxon Signed-Rank is a robust statistical test that is not reliant upon assumptions of parametric data.

Limitations

• There are A LOT of ‘Wilcoxon’ tests and this can be confusing! (The Wilcoxon Sum Rank test is actually an alternative name for the Mann-Whitney U test)
• If you have less than five data points, Wilcoxon’s test will always receive a non-significant result.
• If your data is likely to contain many data values with no difference (e.g. 2-2 = 0) then the Wilcoxon test may produce erroneous results. Instead use the Wilcoxon-Pratt test which is modified to account for no difference pairs.

Worked Example • There are two columns ‘before’ and ‘after’ and ‘RandA’ and ‘RandB’
• There are 25 data points in each column. These values are from hypothetical participants but could represent data from before and after an intervention
• A significant difference should be seen when comparing ‘before’ and ‘after’ columns but not when comparing ‘RandA’ and ‘RandB’

Instructions

↬ Analyse

1. Click on Analyse above
4. Specify the ‘before’ variable column
5. Specify the ‘after’ variable column
6. Wait for Analysis to occur

Summary tab'presents quartiles and descriptive statistics

Test statistics tab presents the test statistics

Wilcoxon ranks presents the raw rank differences

Box plot presents the data as a box plot

Interpreting the test statistic

A Wilcoxon Signed-Rank test demonstrated a statistically significant difference between ‘before’ and ‘after’ (Z = -4.0514, p < 0.05) (Z = -4.0514, p-value = 5.722e-06)

By Daniel Richardson

Resources

https://www.sheffield.ac.uk/polopoly_fs/1.885114!/file/64_Wilcoxon.pdf

https://cml.rhul.ac.uk/people/ptocca/Reports/20170227-WilcoxonReport.pdf

https://en.wikipedia.org/wiki/Wilcoxon_signed-rank_test

https://en.wikipedia.org/wiki/Mann–Whitney_U_test