bundles / scipy latest / scipy / stats / _mstats_basic / brunnermunzel
function
scipy.stats._mstats_basic:brunnermunzel
Signature
def brunnermunzel ( x , y , alternative = two-sided , distribution = t ) Summary
Compute the Brunner-Munzel test on samples x and y.
Extended Summary
Any missing values in x and/or y are discarded.
The Brunner-Munzel test is a nonparametric test of the null hypothesis that when values are taken one by one from each group, the probabilities of getting large values in both groups are equal. Unlike the Wilcoxon-Mann-Whitney's U test, this does not require the assumption of equivariance of two groups. Note that this does not assume the distributions are same. This test works on two independent samples, which may have different sizes.
Parameters
x, y: array_likeArray of samples, should be one-dimensional.
alternative: 'less', 'two-sided', or 'greater', optionalWhether to get the p-value for the one-sided hypothesis ('less' or 'greater') or for the two-sided hypothesis ('two-sided'). Defaults value is 'two-sided' .
distribution: 't' or 'normal', optionalWhether to get the p-value by t-distribution or by standard normal distribution. Defaults value is 't' .
Returns
statistic: floatThe Brunner-Munzer W statistic.
pvalue: floatp-value assuming an t distribution. One-sided or two-sided, depending on the choice of
alternativeanddistribution.
Notes
For more details on brunnermunzel, see scipy.stats.brunnermunzel.
Examples
from scipy.stats.mstats import brunnermunzel import numpy as np x1 = [1, 2, np.nan, np.nan, 1, 1, 1, 1, 1, 1, 2, 4, 1, 1] x2 = [3, 3, 4, 3, 1, 2, 3, 1, 1, 5, 4]✓
brunnermunzel(x1, x2)
✗See also
- mannwhitneyu
Mann-Whitney rank test on two samples.
Aliases
-
scipy.stats._mstats_basic.brunnermunzel