Running a Wilcoxon signed rank test on two paired samples with XLSTAT

Principle of the Wilcoxon signed test

The Wilcoxon test is a non parametric test that allows to compare two paired samples.

Two tests have been proposed for the cases where samples are paired: the sign test and the Wilcoxon signed rank test.

The sign test is based on a simple principle: we compare the number of cases where the first sample is greater than the second sample to the number of cases where the second sample is greater that the first sample. The disadvantage of the sign test is that it does not take into account the size of the difference between each pair, data which is often available.

Wilcoxon proposed a test which takes into account the size of the difference within pairs. This test is called the Wilcoxon signed rank test, as the sign of the differences is also involved.

Dataset for a sign test and a Wilcoxon signed rank test

An Excel sheet with both the data and the results can be downloaded by clicking here.

The data correspond to an experiment in which depression is studied. Patients have been followed at two different times (0: pre-test and 6: 6 months follow-up). The variable to be compared is a depression score.

The goal of this tutorial is to compare the two periods with respect to the depression score.

Setting up a sign test and a Wilcoxon signed rank test on two paired samples

Once XLSTAT-Pro is activated, select the XLSTAT / Nonparametric tests / Comparison of two samples (Wilcoxon, Mann-Whitney, ...) command, or click on the corresponding button of the Nonparametric test menu (see below).

menu test mann whitney 

Once you've clicked the button, the dialog box appears. You can then select the data on the Excel sheet. Select the paired samples option.

 dialog box test wilcoxon general

In the options tab, we suppose that the difference between samples is equal to 0. XLSTAT allows to compute the exact p-value for this test, we will not use it in this tutorial and will use the classical approximation of the p-value.

 dialog box test wilcoxon options

After you have clicked on the OK button, the results are displayed on a new Excel sheet (because the Sheet option has been selected for outputs).

Interpreting the results of a sign test and a Wilcoxon signed rank test on two paired samples

The first results displayed are the statistics for the samples.

For the sign test, we can see that the null hypothesis of equality is rejected. We can consider that patient state of depression has evolved.

results test sign test

Regarding the Wilcoxon signed rank test, the hypothesis is also rejected, which confirm the results of the sign test.

results test wilcoxon test

Click here for other tutorials.

About KCS

Kovach Computing Services (KCS) was founded in 1993 by Dr. Warren Kovach. The company specializes in the development and marketing of inexpensive and easy-to-use statistical software for scientists, as well as in data analysis consulting.

Mailing list Join our mailing list

Home | Order | MVSP | Oriana | XLStat
QDA Miner | Accent Composer | Stats Books
Stats Links | Anglesey

Share: FacebookFacebook TwitterTwitter RedditReddit
Del.icio.usDel.icio.us Stumble UponStumble Upon

 

Like us on Facebook

Get in Touch

  • Email:
    sales@kovcomp.com
  • Address:
    85 Nant y Felin
    Pentraeth, Isle of Anglesey
    LL75 8UY
    United Kingdom
  • Phone:
    (UK): 01248-450414
    (Intl.): +44-1248-450414