文章目录

  • 1. Mann–Whitney *U*-test (曼-惠特尼U检验)
    • 1.1 曼-惠特尼U检验定义
    • 1.2 曼-惠特尼U检验实现
  • 2. Wilcoxon Signed-Rank Test(威尔科克森符号秩检验)
    • 2.1 威尔科克森符号秩检验
    • 2.2 威尔科克森符号秩检验实现
  • 3. 参考

曼-惠特尼U检验与威尔科克森符号秩检验是最常用的两独立样本非参数检验方法,无需对总体分布做出假定,可以用来比较两组分布未知的样品差异。

1. Mann–Whitney U-test (曼-惠特尼U检验)

1.1 曼-惠特尼U检验定义

曼-惠特尼U检验全称为Mann-Whitney-Wilcoxon Test,用来检验两组独立样品是否来自两组不同的样品。

Two data samples are independent if they come from distinct populations and the samples do not affect each other. Using the Mann-Whitney-Wilcoxon Test, we can decide whether the population distributions are identical without assuming them to follow the normal distribution.

1.2 曼-惠特尼U检验实现

在R中利用wilcox.test函数进行曼-惠特尼U检验。

#载入数据:
data(mtcars)
#1974年US,每加仑汽油行驶的英里数
mtcars$mpg
#0 = automatic, 1 = manual,手动挡与自动挡
mtcars$am
#检验
wilcox.test(mpg ~ am, data=mtcars)

检验结果:

> wilcox.test(mpg ~ am, data=mtcars)Wilcoxon rank sum test with continuity correctiondata:  mpg by am
W = 42, p-value = 0.001871
alternative hypothesis: true location shift is not equal to 0Warning message:
In wilcox.test.default(x = c(21.4, 18.7, 18.1, 14.3, 24.4, 22.8,  :cannot compute exact p-value with ties

原假设为两种变速器的油耗完全相同,p-value小于0.05,拒绝原假设,因此两种变速器的油耗有显著差异。

2. Wilcoxon Signed-Rank Test(威尔科克森符号秩检验)

2.1 威尔科克森符号秩检验

威尔科克森符号秩检验又叫Wilcoxon Signed-Rank Test, 用来进行配对样品的非参数检验。

Two data samples are matched if they come from repeated observations of the same subject. Using the Wilcoxon Signed-Rank Test, we can decide whether the corresponding data population distributions are identical without assuming them to follow the normal distribution.

2.2 威尔科克森符号秩检验实现

immer数据包含同一块地在1931和1932年的小麦产量。

载入数据:

> library(MASS)         # load the MASS package
> head(immer)Loc Var    Y1    Y2
1  UF   M  81.0  80.7
2  UF   S 105.4  82.3.....

进行检验:

> wilcox.test(immer$Y1, immer$Y2, paired=TRUE)Wilcoxon signed rank test with continuity correctiondata:  immer$Y1 and immer$Y2
V = 368.5, p-value = 0.005318
alternative hypothesis: true location shift is not equal to 0Warning message:
In wilcox.test.default(immer$Y1, immer$Y2, paired = TRUE) :cannot compute exact p-value with ties

根据p-value值,拒绝原假设,因此,产量在这两年之间存在显著的差异。

3. 参考

  1. http://www.r-tutor.com/elementary-statistics/non-parametric-methods/mann-whitney-wilcoxon-test
  2. http://www.r-tutor.com/elementary-statistics/non-parametric-methods/wilcoxon-signed-rank-test

曼-惠特尼U检验与威尔科克森符号秩检验相关推荐

  1. 曼-惠特尼U检验Mann–Whitney U Test

    sklearn实战-乳腺癌细胞数据挖掘(博主亲自录制视频教程) https://study.163.com/course/introduction.htm?courseId=1005269003&am ...

  2. 曼惠特尼U检验与特征筛选

    曼惠特尼U检验与特征筛选 曼-惠特尼U检验(Mann-Whitney U test)曼-惠特尼秩和检验可以看作是对两均值之差的参数检验方式的T检验或相应的大样本正态检验的代用品.由于曼-惠特尼秩和检验 ...

  3. 【SPSS】两独立样本的曼-惠特尼U检验详细操作教程(附案例实战)

  4. Mann-Whitney检验(曼-惠特尼秩和检验)及matlab代码

    目录 1.Mann-whitney 算法简介 2.定义 3.Mann-whitney 算法步骤 4.matlab函数 5.实例及matlab代码 独立双样本的非参数检验,不满足正态分布的小样本,秩和检 ...

  5. 威尔科克森符号秩检验 (Wilcoxon Signed Rank Test)

    文章目录 一.介绍 二.算法流程 [[2]](#AnchorPoint-reference2) 二.举例[[3]](#AnchorPoint-reference3) 三.代码 四.参考文献 一.介绍 ...

  6. 用matlab绘制惠特尼伞形曲面,伞形曲面结构织物的设计与织造

    伞形曲面结构织物在生产生活中有大量的应用,如纤维增强型复合材料天线.飞机雷达罩以及雨伞等.织造纤维增强型复合材料天线的方法是使用蜂窝夹层结构[1],蜂窝夹层结构制造过程复杂并且不可逆,对制造过程要求非 ...

  7. t检验、Wilcoxon 符号秩检验、Mann-Whitney 秩和检验 Python实现

    @创建于:20211216 @修改于:20211216 文章目录 1 理论知识 2 代码实现 3 统计库函数 1 理论知识 知乎:一文详解t检验 知乎:t检验还是Mann-Whitney U检验 电子 ...

  8. 曼慧尼特u检验(两个样本数据间有无差异)

    曼-惠特尼U检验(Mann-Whitney检验) How the Mann-Whitney test works Mann-Whitney检验又叫做秩和检验,是比较没有配对的两个独立样本的非参数检验. ...

  9. Wilcoxon 检验之 rank-sum 与 signed-rank

    前些时候在写作时碰到了 Wilcoxon 检验,仔细一查,发现这里面居然还包含 2 种不同类型的检测,并且极容易混淆,这 2 种分别方法是 Wilcoxon rank-sum test(我翻译为秩和检 ...

最新文章

  1. notification antd 弹窗使用示例
  2. Mysql主从同步延迟问题及解决方案
  3. 实战DeviceIoControl 之中的一个:通过API訪问设备驱动程序
  4. EF架构~在global.asax里写了一个异常跳转,不错!
  5. ffmpeg实现摄像头拉流_[FFmpeg] 如何通过实时摄像头帧图片生成 rtmp 直播流?
  6. OEM 按钮乱码解决办法
  7. iOS应用内购买(In App Purchase)总结
  8. ODAC(V9.5.15) 学习笔记(四)TCustomDADataSet(2)
  9. javah找不到类文件
  10. 硅谷创业者中被遮蔽的“中国现象”
  11. docker-1 初识docker
  12. Linux学习笔记016---CentOS7虚拟机设置使用静态IP上网_配置集群的时候可以用
  13. Atitit 项目源码的架构,框架,配置与环境说明模板 规范 标准化
  14. 在别人电脑登录微信会【泄露隐私】,登录微信后一定要删除这个文件
  15. 2019年新一年目标
  16. 想知道吗?CTO 比普通程序员强在哪?
  17. python---使用QQ邮箱发送邮件
  18. 大学生月入过万的创业好项目——自媒体
  19. 微信小程序数据拼接_最佳方式实现微信小程序分页加载数据
  20. 为什么月薪2万的大数据职位都必须学习Python?

热门文章

  1. 索贝尔算子Sobel operator
  2. html4播放mp3,如何使用ipod shuffle4代?导入和播放mp3文件格式的音乐?
  3. kali破解wifi
  4. iOS App打包上架超详细流程(手把手图文教你)
  5. 代码质量实际上意味着什么?
  6. 我的android应用(提供源码)
  7. [转]Patch文件结构详解
  8. latex数学公式,希腊字母,字体总结
  9. CFI Directives调用栈信息指令
  10. dedecms cookies泄漏导致SQL漏洞 article_add.php 的解决方法