ARBIMETRA · Financial intelligence, made practical.

ARBIMETRA LAB

Mann-Whitney U Test

Compares two independent groups using ranks, without assuming normality.

What it does

Compares two independent groups using ranks, without assuming normality.

Use it for skewed or ordinal outcomes.

Data you need

  • Outcome
  • Two groups

Supported data: Numeric, Categorical. Level: Intermediate.

Formula and method

U₁ = R₁ − n₁(n₁+1)/2 · r = 2U₁/(n₁n₂) − 1

All values are ranked together, with ties sharing a mid-rank. U counts how often a value from one group exceeds a value from the other. Small samples without ties use the exact distribution, and others a normal approximation.

Assumptions

  • Observations are independent

Input checks

  • Exact method requires no ties
  • Ties use mid-ranks

How to read the result

The rank-biserial correlation and probability of superiority show the size of the difference.

Worked example

Illustrative run on Simulated study data (teaching data). These figures are the actual output of this model on that example, and they say nothing about your own data.

  • U = 6,970.00, p = 0.7685, rank-biserial correlation = -0.0222.
  • The difference is not statistically significant at the 5% level.

Limitations

  • It compares medians only if the distributions share a shape

Numerical validation

Validated 16 of 16 automated checks passed, including numerical results, invalid input, missing values, small samples, constant variables, charts and the interpretation text.

CheckReferenceResultAbs. errorToleranceSource
U statistic35350.0e+01e-12Hollander and Wolfe example, as published in R documentation
Exact one-sided p0.12720.127206136.1e-61e-3Hollander and Wolfe example, as published in R documentation
p-value by full enumeration0.127206130.127206130.0e+01e-10Exhaustive permutation

Computed with python 3.13.2, numpy 2.2.5, scipy 1.14.1, pandas 2.3.3, statsmodels 0.14.4, scikit-learn 1.7.0, in your browser. A passing check confirms the listed comparison only. It does not make any result suitable for your data, and it is not a claim of equivalence with other statistical software.

Questions

Is this the same as the Wilcoxon rank-sum test?

Yes. The two names refer to equivalent tests for two independent samples.

ARBIMETRA LAB is an educational and research tool. Results should be checked by the researcher and are not professional advice.