Wilcoxon Signed-Rank Test for One Sample

This method is an alternative to a one-sample t-test when the data cannot be assumed to be normally distributed. This method is based on the ranks of observations rather than on their actual values

1. Functionalities

  • To determine if the median/location of the population from which your data is drawn statistically significantly different from the specified median
  • To know the basic descriptive statistics about your data
  • To know the descriptive statistics plot such as box-plot, distribution histogram, and density distribution plot about your data

2. About your data

  • Your data contain only 1 group of values (or 1 numeric vector)
  • Your data are meaningful to measure the distance from the specified median
  • The values are independent observations
  • No assumption on the distributional shape of your data, which means your data may be not normally distributed

Case Example

Suppose we collected the Depression Rating Scale (DRS) measurements of 9 patients from a particular group of patients. DRS Scale > 1 indicated Depression. We wanted to know if the DRS of patients was significantly greater than 1.

Please follow the Steps, and Outputs will give real-time analytical results.


Step 1. Data Preparation

1. Give a name to your data (Required)


2. Input data


Data here was the Depression Rating Scale factor measurements of 9 patients from a certain group of patients.

Please follow the example to input your data

Data point can be separated by , ; /Enter /Tab /Space

Data be copied from CSV (one column) and pasted in the box

Missing values are input as NAs


Upload data will cover the example data

2. Show 1st row as column names?

3. Use 1st column as row names? (No duplicates)

Correct separator and quote ensure the successful data input

Find some example data here

Step 2. Specify Parameter

In this default setting, we wanted to know if the group of patients was suffering from Depression (Scale > 1).


Step 3. Choose Hypothesis

Null hypothesis

m = m₀: the population median is equal to the specified median( m₀)

Or, the distribution of the data set is symmetric about the specified median


In this default setting, we wanted to know if the group of patients was suffering from Depression (Scale > 1).

Step 4. Decide the P Value method

In this example, we had only 9 people. So we chose the exact P value

Output 1. Descriptive Results




Explanations
  • The band inside the box is the median
  • The box measures the difference between 75th and 25th percentiles
  • Outliers will be in red, if existing


Explanations
  • Histogram: to roughly assess the probability distribution of a given variable by depicting the frequencies of observations occurring in certain ranges of values
  • Density Plot: to estimate the probability density function of the data

Histogram

When the number of bins is 0, plot will use the default number of bins

Density plot


Output 2. Test Results

Results of the Wilcoxon Signed-Rank Test


Explanations
  • P Value < 0.05, then the population median is significantly different from the specified median. (Accept the alternative hypothesis)
  • P Value >= 0.05, then the population median is NOT significantly different from the specified median. (Accept the null hypothesis)

From the default settings, we concluded that the scales were significantly greater than 1 (P = 0.006), which indicated the patients were suffering from Depression.


Wilcoxon Rank-Sum Test (Mann–Whitney U test) for Two Independent Samples

This method is an alternative to two-sample t-test when the data cannot be assumed to be normally distributed

1. Functionalities

  • To determine if the medians of two population from which your 2 groups data drawn are statistically significantly different from each other
  • To determine if the distributions of 2 groups of data differ in locations
  • To know the basic descriptive statistics about your data
  • To know the descriptive statistics plot such as box-plot, distribution histogram, and density distribution plot about your data

2. About your data

  • Your data contain only 2 groups of values (or 2 numeric vectors)
  • Your data are meaningful to measure the distance between 2 groups values
  • The values are independent observations
  • No assumption on the distributional shape of your data
  • Your data may be not normally distributed

Case Example

Suppose we collected the Depression Rating Scale (DRS) measurements of 19 patients from a particular group of patients. Among 19 people, 9 were women, and 10 were men. We wanted to know if the DRS of patients was significantly different among different genders; or, whether age was related to DRS scores.

Please follow the Steps, and Outputs will give real-time analytical results.


Step 1. Data Preparation

1. Give names to your data (Required)


2. Input data


The example shown here was the Depression Rating Scale factor measurements of 19 patients from two groups of patients.

Please follow the example to input your data

Data point can be separated by , ; /Enter /Tab /Space

Data be copied from CSV (one column) and pasted in the box

Group 1

Group 2

Missing values are input as NAs to ensure 2 sets have equal length; otherwise, there will be error


Upload data will cover the example data

2. Show 1st row as column names?

3. Use 1st column as row names? (No duplicates)

Correct separator and quote ensure the successful data input

Find some example data here

Step 2. Choose Hypothesis

Null hypothesis

m₁ = m₂: the medians of two group are equal

Or, the distribution of values for each group are equal

In this default setting, we wanted to know if the Depression Rating Scale from two groups of patients were different.


Step 3. Decide P Value method

The sample sizes in each group were 9 and 10, so we used the exact p value.

Output 1. Descriptive Results





Notes:
  • The band inside the box is the median
  • The box measures the difference between 75th and 25th percentiles
  • Outliers will be in red, if existing


Notes:
  • Histogram: to roughly assess the probability distribution of a given variable by depicting the frequencies of observations occurring in certain ranges of values
  • Density Plot: to estimate the probability density function of the data

Histogram

When the number of bins is 0, plot will use the default number of bins

Density plot


Output 2. Test Results

Results of Wilcoxon Rank-Sum Test



Explanations
  • P Value < 0.05, then the population medians of 2 groups are significantly different. (Accept alternative hypothesis)
  • P Value >= 0.05, no significant differences between the medians of 2 groups. (Accept null hypothesis)

From the default settings, we concluded that there was no significant differences in 2 groups Rating scale (P=0.44).


Wilcoxon Signed-Rank Test for Two Paired Samples

In the paired case, we compare the differences between 2 groups to zero. Thus, it becomes a one-sample test problem.

This method is an alternative to paired-sample t-test when the data cannot be assumed to be normally distributed.

1. Functionalities

  • To determine if the difference of paired data is statistically significantly different from 0
  • To know the basic descriptive statistics about your data
  • To know the descriptive statistics plot such as box-plot, distribution histogram, and density distribution plot about your data

2. About your data

  • Your data contain 2 groups of values (or 2 numeric vectors)
  • Your data are meaningful to measure the distance from the specified median
  • The values are paired or matched observations
  • No assumption on the distributional shape of your data
  • Your data may be not normally distributed

3. Examples for Matched or Paired Data

  • One person's pre-test and post-test scores
  • When two samples have been matched or paired

Case Example

We wanted to know if the DRS of patients before and after were significant; or, whether the differences were significantly different from 0, which could indicate if the treatment was effective.

Please follow the Steps, and Outputs will give real-time analytical results.


Step 1. Data Preparation

1. Give names to your data (Required)


2. Input data


The example shown here was the Depression Rating Scale factor measurements of 9 patients Before and After treatment.

Please follow the example to input your data

Data point can be separated by , ; /Enter /Tab /Space

Data be copied from CSV (one column) and pasted in the box

Before

After

Missing values are input as NAs to ensure 2 sets have equal length; otherwise, there will be error


Upload data will cover the example data

2. Show 1st row as column names?

3. Use 1st column as row names? (No duplicates)

Correct separator and quote ensure the successful data input

Find some example data here

Step 2. Choose Hypothesis

Null hypothesis

m = 0: the difference of medians between X and Y is zero

Or, the distribution of the differences in paired values is symmetric around zero

In this example, we wanted to know if there was a significant difference on the scale after the treatment.


Step 3. Decide P Value method

In this example, we had only 9 people. So we chose the exact P value

Output 1. Descriptive Results





                  
Notes:
  • The band inside the box is the median
  • The box measures the difference between 75th and 25th percentiles
  • Outliers will be in red, if existing


Notes:
  • Histogram: to roughly assess the probability distribution of a given variable by depicting the frequencies of observations occurring in certain ranges of values
  • Density Plot: to estimate the probability density function of the data

Histogram

When the number of bins is 0, plot will use the default number of bins

Density plot


Output 2. Test Results


Results of Wilcoxon Signed-Rank Test
Explanations
  • P Value < 0.05, then the Before and After are significantly different. (Accept the alternative hypothesis)
  • P Value >= 0.05, then the Before and After are NOT significantly different. (Accept the null hypothesis)

From the default settings, we concluded that there was no significant difference after the treatment. (P=0.46)