Hypergeometric Distribution Functions
Source:R/hypergeometric_distribution.R
hypergeometric_distribution.Rd
Functions to compute the probability density function, cumulative distribution function, and quantile function for the Hypergeometric distribution.
Usage
hypergeometric_pdf(x, r, n, N)
hypergeometric_lpdf(x, r, n, N)
hypergeometric_cdf(x, r, n, N)
hypergeometric_lcdf(x, r, n, N)
hypergeometric_quantile(p, r, n, N)
Value
A single numeric value with the computed probability density, log-probability density, cumulative distribution, log-cumulative distribution, or quantile depending on the function called.
See also
Boost Documentation for more details on the mathematical background.
Examples
# Hypergeometric distribution with r = 5, n = 10, N = 20
hypergeometric_pdf(3, 5, 10, 20)
#> [1] 0.3482972
hypergeometric_lpdf(3, 5, 10, 20)
#> [1] -1.054699
hypergeometric_cdf(3, 5, 10, 20)
#> [1] 0.8482972
hypergeometric_lcdf(3, 5, 10, 20)
#> [1] -0.1645242
hypergeometric_quantile(0.5, 5, 10, 20)
#> [1] 3