dist_hypergeometric {distributional} | R Documentation |
The Hypergeometric distribution
Description
To understand the HyperGeometric distribution, consider a set of
objects, of which
are of the type I and
are of the type II. A sample with size
(
)
with no replacement is randomly chosen. The number of observed
type I elements observed in this sample is set to be our random
variable
.
Usage
dist_hypergeometric(m, n, k)
Arguments
m |
The number of type I elements available. |
n |
The number of type II elements available. |
k |
The size of the sample taken. |
Details
We recommend reading this documentation on https://pkg.mitchelloharawild.com/distributional/, where the math will render nicely.
In the following, let be a HyperGeometric random variable with
success probability
p
= .
Support:
Mean:
Variance:
Probability mass function (p.m.f):
Cumulative distribution function (c.d.f):
See Also
Examples
dist <- dist_hypergeometric(m = rep(500, 3), n = c(50, 60, 70), k = c(100, 200, 300))
dist
mean(dist)
variance(dist)
skewness(dist)
kurtosis(dist)
generate(dist, 10)
density(dist, 2)
density(dist, 2, log = TRUE)
cdf(dist, 4)
quantile(dist, 0.7)
[Package distributional version 0.4.0 Index]