Skip to Content
R 语言经典实例(原书第 2 版)
book

R 语言经典实例(原书第 2 版)

by J.D. Long, Paul Teetor
June 2020
Beginner to intermediate
522 pages
9h 6m
Chinese
China Machine Press
Content preview from R 语言经典实例(原书第 2 版)
242
9
9.16 比较两个非参数样本的位置
9.16.1 问题
你有来自两个总体的样本。你不知道总体的分布,但你知道它们有相似的形状。你想知
道:其中一个总体与另一个相比是否偏左或者偏右?
9.16.2 解决方案
你可以使用非参数检验,即 Wilcoxon-Mann-Whitney 检验,该检验由 wilcox.test
数实现。对于配对观测值(每个
x
i
y
i
配对),设置参数 paired= TRUE
wilcox.test(x, y, paired = TRUE)
对于不配对的观测值,参数 paired 默认为 FALSE
wilcox.test(x, y)
检验的输出结果包括一个
p
值。通常,
p
值小于 0.05 表示第二个总体可能相对于第一个
总体偏左或偏右,而
p
值超过 0.05 则没有提供这样的证据。
9.16.3 讨论
当我们不再对总体分布做出假设时,我们进入了非参数统计世界。 Wilcoxon-Mann-
Whitney 检验是非参数的,因此它比
t
检验适用于更多的数据集,因为
t
检验需要数据是
正态分布的(对于小样本)。该检验唯一的假设是两个总体具有相同的形状。
在这个方法中,我们要问:第二个总体相对于第一个总体偏左或者偏右了吗?这类似于
询问第二个总体的平均值是小于还是大于第一个总体的平均值。然而,Wilcoxon-Mann-
Whitney 检验回答了一个不同的问题:它告诉我们两个总体的中心位置是否有显著差异,
或者等效地说,它们的相对频率是否不同。
假设我们随机选择一组员工,并要求每个员工在两种不同的情况下完成相同的任务:在 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

大规模数据分析和建模:基于 Spark 与 R

大规模数据分析和建模:基于 Spark 与 R

Javier Luraschi, Kevin Kuo, Edgar Ruiz
解密金融数据

解密金融数据

Justin Pauley
数据压缩入门

数据压缩入门

Colt McAnlis, Aleks Haecky

Publisher Resources

ISBN: 9787111656814