hyper2binomP | R Documentation |
Transform the three parameters of the hypergeometric distribution function to the probability parameter of the “corresponding” binomial distribution.
hyper2binomP(x, m, n, k)
x , m , n , k |
see |
a number, the binomial probability.
See those in phyperBinMolenaar
.
phyper
,
pbinom
.
dhyperBinMolenaar()
, phyperBinMolenaar.1()
,
*.2()
, etc, all of which are crucially based on hyper2binomP()
.
hyper2binomP(3,4,5,6) # 0.38856
## The function is simply defined as
function (x, m, n, k) {
N <- m + n
p <- m/N
N.n <- N - (k - 1)/2
(m - x/2)/N.n - k * (x - k * p - 1/2)/(6 * N.n^2)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.