In probability theory and statistics, the hypergeometric distribution is a discrete probability distribution that describes the probability of k successes (random draws for which the object drawn has a specified feature) in n draws, without replacement, from a finite population of size N that contains exactly K objects with that feature, wherein each draw is either a success or a failure. In contrast, the binomial distribution describes the probability of k successes in n draws with replacement. Wikipedia
Probability density function of the hypergeometric distribution is
is the number of combinations of m from n or binomial coefficient
Cumulative distribution function of the hypergeometric distribution is
is the generalized hypergeometric function
Mean or expected value for the hypergeometric distribution is
The calculator below calculates mean and variance of negative binomial distribution and plots probability density function and cumulative distribution function for given parameters n, K, N.