One Sample Wilcoxon

The One-Sample Wilcoxon Signed-Rank Test determines whether the median of a single sample equals a specified target value. Unlike the Sign Test which only considers direction, the Wilcoxon test also uses the magnitude of each difference — ranking the absolute differences and assigning signs based on direction.

Last reviewed

Key takeaway

The One-Sample Wilcoxon Signed-Rank Test determines whether the median of a single sample equals a specified target value.

On this page
  1. What is One Sample Wilcoxon?
  2. When to use One Sample Wilcoxon?
  3. Guidelines for correct usage of One Sample Wilcoxon
  4. Alternatives: When not to use One Sample Wilcoxon
  5. Example of One Sample Wilcoxon
  6. How to do One Sample Wilcoxon

What is One Sample Wilcoxon?

The One-Sample Wilcoxon Signed-Rank Test determines whether the median of a single sample equals a specified target value. Unlike the Sign Test which only considers direction, the Wilcoxon test also uses the magnitude of each difference — ranking the absolute differences and assigning signs based on direction. This makes it significantly more powerful at detecting true departures from the target.

Simple Definitions:A more powerful version of the Sign Test that checks whether the sample median matches a target, using both direction and size of each difference for a more sensitive and reliable result.

When to use One Sample Wilcoxon?

  • Use when testing whether a single sample median equals a specified target and data is approximately symmetric but not normal.
  • Use as a more powerful alternative to the One-Sample Sign Test when symmetry around the median is a reasonable assumption.
  • Use when the data is continuous and not normally distributed with no severe skewness.
  • Use when both direction and magnitude of differences from the target are meaningful.

Guidelines for correct usage of One Sample Wilcoxon

  • The distribution of differences from the target should be approximately symmetric  the Wilcoxon test assumes symmetry even if the original data is not normal.
  • Observations exactly equal to the target are excluded  many ties reduce reliability.
  • Collect at least 10 to 15 observations for adequate statistical power.
  • Define the target median before data collection to avoid biasing the test selection.

Alternatives: When not to use One Sample Wilcoxon

  • If data is normally distributed, use One-Sample T-Test
  • If data is heavily skewed or contains many outliers, use One-Sample Sign Test it does not assume symmetry.
  • If comparing two independent groups, use Mann-Whitney Test
  • If analysing paired measurements (before/after), compute the differences first, then apply this test to those differences.

Example of One Sample Wilcoxon

A pharmaceutical researcher wants to test whether the median reaction time of a newly formulated antacid is shorter than 12 minutes. Sixteen samples of the antacid are prepared, and the reaction time of each sample is recorded. The following steps:

  1. Gathered the necessary data.
One Sample Wilcoxon — figure 1
  1. Now analyse the data in Zometric Statistical Software at https://statsai.zometric.com/.
  2.  To find One Sample Wilcoxon choose Statistical module> Nonparametric  > One Sample Wilcoxon.
  3.  Inside the tool, feeds the data along with other inputs as follows:
One Sample Wilcoxon — figure 2

5. After using the above mentioned tool, fetches the output as follows:

One Sample Wilcoxon — figure 3

How to do One Sample Wilcoxon

The guide is as follows:

  1. Log in to Zometric Statistical Software at https://statsai.zometric.com/
  2. On the home page, choose Statistical Tool> Nonparametric>One Sample Wilcoxon.
  3. Next, update the data manually or can completely copy (Ctrl+C) the data from excel sheet and paste (Ctrl+V) it here.
  4. Next, you need to fill the required options.
  5. Finally, click on calculate at the bottom of the page and you will get desired results.

On the dashboard of One Sample Wilcoxon, the window is separated into two parts.

One Sample Wilcoxon — figure 4

On the left part, Data Pane is present. In the Data Pane, each row makes one subgroup. Data can be fed manually or the one can completely copy (Ctrl+C) the data from excel sheet and paste (Ctrl+V) it here.

Load example: Sample data will be loaded.

Load File: It is used to directly load the excel data.

On the right part, there are many options present as follows:

  • Variable (Required): Select the column containing your measurement data  for example, time, weight, or any continuous quality characteristic. This is the single sample you want to test against a specified target median. The column must contain continuous numeric values and should have no meaningful grouping or pairing structure.
  • Confidence Level (Default 95%): Sets the confidence level for the interval estimate of the population median. The default of 95% means you are 95% confident that the true population median falls within the calculated confidence interval. It is set at 95% by default because it is the widely accepted standard in statistical analysis — balancing sufficient certainty with a practical interval width. A higher confidence level (e.g. 99%) produces a wider interval with greater certainty; a lower level (e.g. 90%) produces a narrower interval but with less confidence that the true median is captured.

Frequently asked questions

What is the one-sample Wilcoxon signed-rank test?

The one-sample Wilcoxon signed-rank test determines whether the median of a single sample equals a specified target value. It ranks the absolute differences from the target and assigns signs based on direction, so it uses both the direction and the magnitude of each difference, making it more powerful than the sign test.

What are the assumptions of the one-sample Wilcoxon test?

The distribution of differences from the target should be approximately symmetric, even if the original data is not normal. The data should be continuous without severe skewness. Observations exactly equal to the target are excluded, so many ties reduce reliability, and the target median should be defined before data collection.

When should you use the Wilcoxon test instead of the sign test or t-test?

Use the Wilcoxon test when data is approximately symmetric but not normal. If data is normally distributed, use the One-Sample T-Test. If data is heavily skewed or contains many outliers, use the One-Sample Sign Test, which does not assume symmetry.

How many observations does the one-sample Wilcoxon test need?

Collect at least 10 to 15 observations for adequate statistical power. The column should contain continuous numeric values with no grouping or pairing structure. For paired before-and-after measurements, compute the differences first and then apply the one-sample Wilcoxon test to those differences.