超几何测试(phyper) [英] Hypergeometric test (phyper)

查看:72
本文介绍了超几何测试(phyper)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个关于超几何测试的问题.

I've a question about the hypergeometric test.

我有这样的数据:

流行大小:5260
样本量:131
流行音乐中被归类为成功的项目数:1998
样本中归类为成功的项目数:62

pop size : 5260
sample size : 131
Number of items in the pop that are classified as successes : 1998
Number of items in the sample that are classified as successes : 62

要计算超几何测试,正确吗?

To compute a hypergeometric test, is that correct?

phyper(62, 1998, 5260, 131)

推荐答案

几乎正确.如果您查看 ?phyper:

Almost correct. If you look at ?phyper:

phyper(q, m, n, k, lower.tail = TRUE, log.p = FALSE)

x, q vector of quantiles representing the number of white balls drawn
without replacement from an urn which contains both black and white
balls.

m the number of white balls in the urn.

n the number of black balls in the urn.

k the number of balls drawn from the urn.

因此使用您的数据:

phyper(62,1998,5260-1998,131)
[1] 0.989247

这篇关于超几何测试(phyper)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆