import mpmath


def hyper(n, a, b, N):
    """Probability mass function of the hypergeometric distribution."""
    return mpmath.binomial(b, n) *\
        mpmath.binomial(N-b, a-n) / mpmath.binomial(N, a)