Nonparametric calculator

Wilcoxon signed-rank test calculator

Evaluate paired or repeated ordinal/continuous measurements with the non-parametric Wilcoxon signed-rank test, including W statistic, z-score, p-value, and matched-pairs rank-biserial r.

Run this test live in StatLab npm i @statlab/core

When to use it

Use for paired observations when difference scores are non-normal or ordinal.

Required Inputs

  • Pre / Sample 1 values
  • Post / Sample 2 values
  • Zero-difference handling (Pratt / Wilcoxon / Zero-omit)

Mathematical Formula

W = min(Σ R⁺, Σ R⁻), z = (W - n(n+1)/4) / √(n(n+1)(2n+1)/24)

Reporting Cautions

  • Pairs with zero difference must be explicitly handled.
  • Assumes difference distribution is symmetric around the median.

Code Snippets (Python, R, TypeScript)

Python (SciPy / Statsmodels)
from scipy import stats
res = stats.wilcoxon(pre_values, post_values)
print(f"W={res.statistic:.2f}, p={res.pvalue:.4f}")
R Language
wilcox.test(pre_values, post_values, paired = TRUE)
TypeScript (@statlab/core)
import { wilcoxonSignedRank } from '@statlab/core';
const result = wilcoxonSignedRank(preValues, postValues);

Developer Use Cases & Production Integrations

  • Assessing pre/post deployment metric shifts on paired endpoints when data violates normality.
  • Evaluating paired code review quality ratings or human preference scores in LLM evaluations.

VoxelPulse Telemetry Control Plane

Continuous A/B testing, statistical telemetry analysis, and automated feedback loops for live backend services.

Explore VoxelPulse →

VoxelAssurance Release Readiness

Fixed-price AI release-readiness sprints, automated regression testing, and reliability statistical benchmarks.

Explore VoxelAssurance →

Related Statistical Test Calculators

Explore static calculators across the StatLab inference engine suite.