M - n))`,
:math:`x_u = \min(N, n)`,

.. math::

    D = \omega(n - x) + ((M - n)-(N-x)),

and the binomial coefficients are defined as

.. math:: \binom{n}{k} \equiv \frac{n!}{k! (n - k)!}.

`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

References
----------
.. [1] Agner Fog, "Biased Urn Theory".
       https://cran.r-project.org/web/packages/BiasedUrn/vignettes/UrnTheory.pdf

.. [2] "Wallenius' noncentral hypergeometric distribution", Wikipedia,
       https://en.wikipedia.org/wiki/Wallenius'_noncentral_hypergeometric_distribution

%(example)s

Ú
rvs_walleniusr‰