bundles / scipy 1.18.0 / scipy / stats / _stats_py / tiecorrect
function
scipy.stats._stats_py:tiecorrect
source: /scipy/stats/_stats_py.py:8419
Signature
def tiecorrect(rankvals)Summary
Tie correction factor for Mann-Whitney U and Kruskal-Wallis H tests.
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.
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