bundles / scipy 1.17.1 / scipy / stats / _discrete_distns / nchypergeom_wallenius_gen
class
scipy.stats._discrete_distns:nchypergeom_wallenius_gen
Signature
class nchypergeom_wallenius_gen ( a = 0 , b = inf , name = None , badvalue = None , moment_tol = 1e-08 , values = None , inc = 1 , longname = None , shapes = None , seed = None ) Summary
A Wallenius' noncentral hypergeometric discrete random variable.
Extended Summary
Wallenius' noncentral hypergeometric distribution models drawing objects of two types from a bin. M is the total number of objects, n is the number of Type I objects, and odds is the odds ratio: the odds of selecting a Type I object rather than a Type II object when there is only one object of each type. The random variate represents the number of Type I objects drawn if we draw a pre-determined N objects from a bin one by one.
%(before_notes)s
Notes
Let mathematical symbols , , and correspond with parameters N, n, and M (respectively) as defined above.
The probability mass function is defined as
for , , , , , where , ,
and the binomial coefficients are defined as
nchypergeom_wallenius uses the BiasedUrn package by Agner Fog with permission for it to be distributed under SciPy's license.
The symbols used to denote the shape parameters (N, n, and M) are not universally accepted; they are chosen for consistency with hypergeom.
Note that Wallenius' noncentral hypergeometric distribution is distinct from Fisher's noncentral hypergeometric distribution, which models take a handful of objects from the bin at once, finding out afterwards that N objects were taken. When the odds ratio is unity, however, both distributions reduce to the ordinary hypergeometric distribution.
%(after_notes)s
See also
- hypergeom
- nchypergeom_fisher
- nhypergeom
Aliases
-
scipy.stats._discrete_distns.nchypergeom_wallenius_gen