bundles / scipy latest / scipy / stats / _stats_py / tiecorrect
function
scipy.stats._stats_py:tiecorrect
source: build-install/usr/lib/python3.14/site-packages/scipy/stats/_stats_py.py:8451
Signature
def tiecorrect(rankvals)Summary
Tie correction factor for Mann-Whitney U and Kruskal-Wallis H tests.
Extended Summary
Parameters
rankvals: array_likeA 1-D sequence of ranks. Typically this will be the array returned by rankdata.
Returns
factor: floatCorrection factor for U or H.
Notes
Array API Standard Support
tiecorrect is not in-scope for support of Python Array API Standard compatible backends other than NumPy.
See dev-arrayapi for more information.
Examples
from scipy.stats import tiecorrect, rankdata
✓tiecorrect([1, 2.5, 2.5, 4])
✗np.float64(0.9)
ranks = rankdata([1, 3, 2, 4, 5, 7, 2, 8, 4])
✓ranks tiecorrect(ranks)✗
np.float64(0.9833333333333333)
See also
Aliases
scipy.stats.tiecorrect