【问题标题】:How to calculate effect size of Mann-Whitney U test with unequal sample sizes如何计算样本量不等的 Mann-Whitney U 检验的效应量
【发布时间】:2020-09-30 00:48:55
【问题描述】:

我想计算样本量不等时 Mann-Whitney U 检验的效应量。

import numpy as np
from scipy import stats

np.random.seed(12345678)  #fix random seed to get the same result
n1 = 200  # size of first sample
n2 = 300  # size of second sample

rvs1 = stats.norm.rvs(size=n1, loc=0., scale=1)
rvs2 = stats.norm.rvs(size=n2, loc=0.5, scale=1.5)

print(stats.mannwhitneyu(rvs1, rvs2))

我该怎么办? 我知道效果大小 = 统计量/sqrt(样本大小),但我想知道这个等式是否不能应用于不相等的样本大小。

【问题讨论】:

    标签: python statistics


    【解决方案1】:

    https://en.wikipedia.org/wiki/Effect_size

    r = 1 – (2U)/(n1 n2) 就是答案。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-07-11
      • 1970-01-01
      • 2013-05-28
      • 1970-01-01
      • 2023-03-08
      • 1970-01-01
      • 2020-04-15
      相关资源
      最近更新 更多