bundles / scipy 1.17.1 / scipy / stats / _multivariate / multivariate_hypergeom_gen
class
scipy.stats._multivariate:multivariate_hypergeom_gen
Signature
class multivariate_hypergeom_gen ( seed = None ) Members
-
__call__ -
__init__ -
_checkresult -
_logpmf -
_process_parameters -
_process_quantiles -
cov -
logpmf -
mean -
pmf -
rvs -
var
Summary
A multivariate hypergeometric random variable.
Parameters
%(_doc_default_callparams)s%(_doc_random_state)s
Methods
pmf(x, m, n)Probability mass function.
logpmf(x, m, n)Log of the probability mass function.
rvs(m, n, size=1, random_state=None)Draw random samples from a multivariate hypergeometric distribution.
mean(m, n)Mean of the multivariate hypergeometric distribution.
var(m, n)Variance of the multivariate hypergeometric distribution.
cov(m, n)Compute the covariance matrix of the multivariate hypergeometric distribution.
Notes
%(_doc_callparams_note)s
The probability mass function for multivariate_hypergeom is
where are the number of objects of type , is the total number of objects in the population (sum of all the ), and is the size of the sample to be taken from the population.
Examples
To evaluate the probability mass function of the multivariate hypergeometric distribution, with a dichotomous population of size :math:`10` and :math:`20`, at a sample of size :math:`12` with :math:`8` objects of the first type and :math:`4` objects of the second type, use:from scipy.stats import multivariate_hypergeom
✓multivariate_hypergeom.pmf(x=[8, 4], m=[10, 20], n=12)
✗from scipy.stats import hypergeom
✓multivariate_hypergeom.pmf(x=[3, 1], m=[10, 5], n=4) hypergeom.pmf(k=3, M=15, n=4, N=10)✗
multivariate_hypergeom.pmf(x=[[8, 4], [3, 1]], m=[[10, 20], [10, 5]], n=[12, 4])✗
multivariate_hypergeom.cov(m=[[7, 9], [10, 15]], n=[8, 12])
✗rv = multivariate_hypergeom(m=[10, 20], n=12)
✓rv.pmf(x=[8, 4])
✗See also
- scipy.stats.hypergeom
The hypergeometric distribution.
- scipy.stats.multinomial
The multinomial distribution.
Aliases
-
scipy.stats._multivariate.multivariate_hypergeom_gen