Hypergeometric(stats)
Hypergeometric()所属R语言包:stats
The Hypergeometric Distribution
超几何分布
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Density, distribution function, quantile function and random generation for the hypergeometric distribution.
密度分布函数,超几何分布的分位数的功能和随机生成。
用法----------Usage----------
dhyper(x, m, n, k, log = FALSE)
phyper(q, m, n, k, lower.tail = TRUE, log.p = FALSE)
qhyper(p, m, n, k, lower.tail = TRUE, log.p = FALSE)
rhyper(nn, m, n, k)
参数----------Arguments----------
参数: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.
从瓮中绘制的球数。
参数:p
probability, it must be between 0 and 1.
概率,它必须是介于0和1。
参数:nn
number of observations. If length(nn) > 1, the length is taken to be the number required.
观测数。如果length(nn) > 1,长度是所需的数量。
参数:log, log.p
logical; if TRUE, probabilities p are given as log(p).
逻辑;如果为TRUE,概率P日志(P)。
参数:lower.tail
logical; if TRUE (default), probabilities are P[X ≤ x], otherwise, P[X > x].
逻辑;如果是TRUE(默认),概率P[X ≤ x],否则,“P[X > x]。
Details
详情----------Details----------
The hypergeometric distribution is used for sampling without replacement. The density of this distribution with parameters m, n and k (named Np, N-Np, and n, respectively in the reference below) is given by
超几何分布是用于采样,无需更换。这种分布密度与参数m,n和k(名为Np,N-Np,n,分别在下面的参考)
for x = 0, …, k.
x = 0, …, k。
The quantile is defined as the smallest value x such that F(x) ≥ p, where F is the distribution function.
位数被定义为最小的值x等F(x) ≥ p,其中F是分布函数。
值----------Value----------
dhyper gives the density, phyper gives the distribution function, qhyper gives the quantile function, and rhyper generates random deviates.
dhyper给人的密度,phyper给出了分布函数,qhyper给人的分量功能,rhyper产生随机的偏离。
Invalid arguments will result in return value NaN, with a warning.
无效的参数将导致返回值NaN,一个警告。
源----------Source----------
dhyper computes via binomial probabilities, using code contributed by Catherine Loader (see dbinom).
dhyper通过二项式概率计算,使用由凯瑟琳装载机贡献的代码(见dbinom)。
phyper is based on calculating dhyper and phyper(...)/dhyper(...) (as a summation), based on ideas of Ian Smith and Morten Welinder.
phyper根据计算dhyper和phyper(...)/dhyper(...)(求和),伊恩·史密斯和Morten Welinder的思想基础。
qhyper is based on inversion.
qhyper是基于反转。
rhyper is based on a corrected version of
rhyper是基于更正版本
Kachitvichyanukul, V. and Schmeiser, B. (1985). Computer generation of hypergeometric random variates. Journal of Statistical Computation and Simulation, 22, 127–145.
kachitvichyanukul,五和施迈泽,B.(1985)。计算机生成的超几何随机变数。中国统计计算和仿真,22,127-145。
参考文献----------References----------
Univariate Discrete Distributions, Second Edition. New York: Wiley.
参见----------See Also----------
Distributions for other standard distributions.
其他标准分布的分布。
举例----------Examples----------
m <- 10; n <- 7; k <- 8
x <- 0k+1)
rbind(phyper(x, m, n, k), dhyper(x, m, n, k))
all(phyper(x, m, n, k) == cumsum(dhyper(x, m, n, k)))# FALSE[假]
## but error is very small:[但错误是非常小的:]
signif(phyper(x, m, n, k) - cumsum(dhyper(x, m, n, k)), digits=3)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|