bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / stats / _mstats_basic / kruskal
function
scipy.stats._mstats_basic:kruskal
source: build-install/usr/lib/python3.14/site-packages/scipy/stats/_mstats_basic.py:1866
Signature
def kruskal(*samples)Summary
Compute the Kruskal-Wallis H-test for independent samples
Parameters
*samples: array_likeTwo or more arrays with the sample measurements can be given as arguments.
Returns
statistic: floatThe Kruskal-Wallis H statistic, corrected for ties
pvalue: floatThe p-value for the test using the assumption that H has a chi square distribution
Notes
For more details on kruskal, see scipy.stats.kruskal.
Examples
from scipy.stats.mstats import kruskal
✓a = [6.3, 5.4, 5.7, 5.2, 5.0] b = [6.9, 7.0, 6.1, 7.9] c = [7.2, 6.9, 6.1, 6.5]✓
kruskal(a, b, c)
✗KruskalResult(statistic=np.float64(7.113812154696133), pvalue=np.float64(0.028526948491942164))The null hypothesis is rejected at the 5% level of significance because the returned p-value is less than the critical value of 5%.
Aliases
scipy.stats._mstats_basic.kruskal