The Wilcoxon Sign Test in SPSS

The Wilcoxon sign test is a statistical comparison of average of two dependent samples. The Wilcoxon sign test works with metric (interval or ratio) data that is not multivariate normal, or with ranked/ordinal data. Generally it the non-parametric alternative to the dependent samples t-test. The Wilcoxon sign test tests the null hypothesis that the average signed rank of two dependent samples is zero.

We demonstrate how to run the Wilcox sign test in SPSS with the same example as used in the section ‘How to conduct the Wilcoxon sign test.

A research team wants to test whether a new teaching method increases the literacy of children. Therefore the researchers take measure the literacy of 20 children before and after the teaching method has been applied. The literacy is measured on a scale from 0 to 10, with 10 indicating high literacy. The initial baseline shows an average literacy score of 5.9 and after the method has been used the average increases to 7.6.

A dependent samples t-test can not be used, as the distribution does not approximate a normal distribution. Also both measurements are not independent from each other and therefore the Mann-Whitney U-test can not be used.

Wilcoxon Sign Test help?

Option 1: User-friendly Software

Transform raw data to written interpreted results in seconds.

Option 2: Professional Statistician

Collaborate with a statistician to complete and understand your results.

In SPSS we need to have two variables representing the before and after measurements.

The Wilcoxon sign test can be found in Analyze/Nonparametric Tests/2 Related Samples…
Wilcoxon sign test

In the next dialogue box for the nonparametric two dependent samples tests we need to define the paired observations. Enter X as variable 1 of the first pair and Y as Variable 2 of the first pair.
Wilcoxon sign test
We also need to select the Test Type. The Wilcoxon Signed Rank Test is marked by default.

Wilcoxon – The Wilcoxon signed rank test has the null hypothesis that both samples are from the same population. The Wilcoxon test creates a pooled ranking of all observed differences between the two dependent measurements. It uses the standard normal distributed z-value to test of significance.

Sign – The sign test has the null hypothesis that both samples are from the same population. The sign tests compares the two dependent observations and counts the number of negative and positive differences. It uses the standard normal distributed z-value to test of significance.

McNemar – The McNemar test has the null hypothesis that differences in both samples are equal for both directions. The test uses dichotomous (binary) variables to test whether the observed differences in a 2×2 matrix including all 4 possible combinations differ significantly from the expected count. It uses a Chi-Square test of significance.

Marginal Homogeneity – The marginal homogeneity test has the null hypothesis that the difference in both samples are equal in both directions. The test is similar to the McNemar test, but it uses nominal variables with more than 2 levels. It tests whether the observed differences in a n*m matrix including all possible combinations differ significantly from the expected count. It uses a Chi-Square test of significance.

We select Wilcoxon to calculate the Wilcoxon signed rank test.

If the values in the sample are not already ranked. SPSS will sort the observations according to the test variable and assign ranks to each observation, correcting for tied observations.

The dialogue box Exact… allows us to specify an exact test of significance and the dialogue box Options… defines how missing values are managed and if SPSS should output additional descriptive statistics.

The SPSS Syntax for the Wilcoxon test is

NPAR TESTS
/WILCOXON=X WITH Y (PAIRED)
/MISSING ANALYSIS.

The Wilcox sign test output contains only two tables.
Wilcoxon sign test

The first table contains all statistics that are required to calculate the Wilcoxon signed ranks test’s W. These are the sample size and the sum of ranks. It also includes the mean rank, which is not necessary to calculate the W-value but helps with the interpretation of the data.

In our example we see that 20*2 observations were made for X and Y. The Wilcox Sign Test answers the question if the difference is significantly different from zero, and thus if the observed difference in mean ranks (4.5 vs. 10.65) can also be found in the general population.

The answer to this question is in the second table, which contains the test of significance statistics.
Wilcoxon sign test

The SPSS output contains the z-value of -3.472. The test value z is approximately normally distributed for large samples that are n>10, so that p = 0.001.

A write-up of the test could be

20 pupils learned reading with a novel method. A before and after measurement of the literacy of each student was taken on a scale, where 0 = little literacy to 10 = high literacy. The results seem to indicate that the after measurements show an increase literacy (average rank of 4.5 vs. average rank of 10.65). The Wilcoxon signed rank test shows that the observed difference between both measurements is significant. Thus we can reject the null hypothesis that both samples are from the same population, and we might assume that the novel teaching method caused a significant increase in literacy scores.