# 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 descriptive statistics plot such as box-plot, distribution histogram, and density distribution plot 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.

#### 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 descriptive statistics plot such as box-plot, distribution histogram, and density distribution plot 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.

#### 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 descriptive statistics plot such as box-plot, distribution histogram, and density distribution plot 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.

#### 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)