# One-Sample Wilcoxon Test

The Wilcoxon signed-rank test is a non-parametric statistical test that is used to test the location of a population based on sample data or to compare the locations of two populations. The one-sample Wilcoxon signed rank test is a non-parametric alternative to the sample t-test when the data does not follow a normal distribution. It helps to determine whether there is a significant difference between the median of a sample and a hypothesized median value. Here, the test statistic is computed based on the ranks of the difference between observed values and the hypothesized value.

The one sample Wilcoxon signed rank test makes the assumption that the parent population is symmetric about the median. As the random samples come from a population with a continuous cumulative distribution function and are symmetric about the median, under the null hypothesis, the differences between observed values and hypothesized value are symmetrically distributed about zero so that the positive and negative differences of equal absolute magnitude have the same probability of occurrence.

**Example**

Suppose that a new startup company is interested in hiring software engineers but wants to ensure that they are offering competitive salaries. Assume that they have collected salary data from a sample of 30 software engineers who are currently employed at various companies in the same industry. If the company wants to determine whether the median salary they are offering to their potential hires is significantly different from the median salary of software engineers in the industry, then one sample Wilcoxon sign rank can be used for this purpose. Here, we assume the null hypothesis that the median salary offered by the startup is not significantly different from the median salary in the industry, that is, the median salary difference is zero.

**To run the one-sample Wilcoxon test**

(This feature requires the Statistics Base option.)

From the menu choose:

**Analyze > Nonparametric Tests > One Sample...**- Click
**‘Settings’**. - Under
**‘Select an item’**, select**‘Choose Tests’**. - Choose
**‘Customise Tests’**. - Select
**‘Compare median to hypothesized (Wilcoxon signed rank test)’**. - Enter the value of the
**‘Hypothesized median’**and click**‘Run’**.

For more information, see https://www.ibm.com/support/pages/can-spss-statistics-produce-one-sample-wilcoxon-test