Skip to content

Commit b58012d

Browse files
author
Schulz
committed
Fix rank biserial correlation sign for Mann–Whitney U test
1 parent c939d2d commit b58012d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/pingouin/nonparametric.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,7 @@ def mwu(x, y, alternative="two-sided", **kwargs):
299299
cles = 1 - cles if alternative == "less" else cles
300300

301301
# Effect size 2: rank biserial correlation (Wendt 1972)
302-
uval_y = x.shape[0] * y.shape[0] - uval_x
303-
rbc = 1 - (2 * uval_y) / diff.size # diff.size = x.size * y.size
302+
rbc = 2 * cles - 1
304303

305304
# Fill output DataFrame
306305
stats = pd.DataFrame(

0 commit comments

Comments
 (0)