Wilcoxon Rank-Sum Test Calculator

Non-parametric test using rank sums to compare two independent samples

Test Configuration

Detected 0 valid values

Detected 0 valid values

Example: Sleep Quality Study

Control Group (A)

Data: 5.2, 6.1, 4.8, 5.9, 5.5, 6.0, 5.7

Sample size: n₁ = 7

Sleep hours: Standard treatment

New Treatment (B)

Data: 7.2, 8.1, 7.8, 8.5, 7.9, 8.0

Sample size: n₂ = 6

Sleep hours: New sleep aid

Expected Result

New treatment shows higher sleep quality

Conclusion: Significant evidence of treatment effectiveness

When to Use Wilcoxon Rank-Sum Test

Two Independent Samples

Comparing two groups with different subjects

Non-Normal Data

Data doesn't follow normal distribution

Small Sample Sizes

Works well with small samples (n < 30)

Rank-Based Analysis

Uses sum of ranks as test statistic

Wilcoxon vs Mann-Whitney

Same Test: Both tests are mathematically equivalent and always give the same conclusion

Different Statistics: Wilcoxon uses rank sums (W), Mann-Whitney uses U statistic

Relationship: U₁ = W - n₁(n₁+1)/2

Choice: Use whichever statistic you prefer or is required by your context

Understanding the Wilcoxon Rank-Sum Test

What is the Wilcoxon Rank-Sum Test?

The Wilcoxon rank-sum test is a non-parametric statistical test used to determine whether two independent samples come from populations with the same distribution. It uses the sum of ranks from one sample as the test statistic, making it robust to outliers and non-normal data.

Key Advantages

  • Distribution-free: No assumption of normality required
  • Robust: Less sensitive to outliers than parametric tests
  • Small samples: Works well with small sample sizes

Key Formulas

W Statistic (Rank Sum)

W = Σ ranks in sample A

Sum of all ranks assigned to sample A

Normal Approximation

z = (W - μw) / σw

μw = n₁(n₁+n₂+1)/2, σw² = n₁n₂(n₁+n₂+1)/12

Ties Correction

σw² = σw²(1 - Ct)

Ct adjusts for tied ranks

Step-by-Step Process

  1. 1.Combine and rank all observations from both samples
  2. 2.Handle ties by assigning average ranks
  3. 3.Calculate sum of ranks for sample A (W statistic)
  4. 4.Compare with critical values or use normal approximation

Interpretation Guidelines

  • p-value < α: Reject null hypothesis (significant difference)
  • p-value ≥ α: Fail to reject null hypothesis
  • Large W: Sample A tends to have higher values
  • Small W: Sample A tends to have lower values