bundles / scipy 1.17.1 / scipy / stats / _mstats_extras / compare_medians_ms
function
scipy.stats._mstats_extras:compare_medians_ms
Signature
def compare_medians_ms ( group_1 , group_2 , axis = None ) Summary
Compares the medians from two independent groups along the given axis.
Extended Summary
The comparison is performed using the McKean-Schrader estimate of the standard error of the medians.
Parameters
group_1: array_likeFirst dataset. Has to be of size >=7.
group_2: array_likeSecond dataset. Has to be of size >=7.
axis: int, optionalAxis along which the medians are estimated. If None, the arrays are flattened. If
axisis not None, thengroup_1andgroup_2should have the same shape.
Returns
compare_medians_ms: {float, ndarray}If
axisis None, then returns a float, otherwise returns a 1-D ndarray of floats with a length equal to the length ofgroup_1alongaxis.
Examples
from scipy import stats a = [1, 2, 3, 4, 5, 6, 7] b = [8, 9, 10, 11, 12, 13, 14]✓
stats.mstats.compare_medians_ms(a, b, axis=None)
✗import numpy as np rng = np.random.default_rng() x = rng.random(size=(3, 7)) y = rng.random(size=(3, 8))✓
stats.mstats.compare_medians_ms(x, y, axis=1)
✗Aliases
-
scipy.stats._mstats_extras.compare_medians_ms