Probability distribution of a hypergeometric variable is known as hypergeometric distribution. If there are $K$ successes in population size $N$, where there are $n$ successes $n$ sample size $n$ then the probability of getting random variable $X = n$ is, (pmf)
$P(X = n)$ = $\frac{\binom{K}{k}\binom{N-K}{n-k}}{\binom{N}{n}}$

Word Problems

Problem 1: 

There are $10$ black marbles and $10$ white marbles out of which $5$ marbles are being chosen. Find the probability that there are $2$ white marbles in them.

Solution:

Total population, $N = 20$

Sample size, $n = 5$

Number of successes in $N,\ K = 10$

Number of successes in sample, $k = 2$

Probability of getting $2$ white marbles, $P(X = 2)$ = $\frac{\binom{K}{k}\binom{N-K}{n-k}}{\binom{N}{n}}$

$P(X = 2)$ = $\frac{\binom{10}{2}\binom{10}{3}}{\binom{20}{5}}$ = $0.08707430341$
Problem 2: 

Out of $100$ students qualifying an exam, $10$ were drawn randomly. If $35$ out of $100$ qualified students are female, then find the probability that $6$ out of $10$ chosen are females.

Solution: 

Total population, $N = 100$

Sample size, $n = 10$

Number of successes in $N,\ K = 35$

Number of successes in sample, $k = 6$

Probability of getting $2$ white marbles, $P(X = 6)$ = $\frac{\binom{K}{k}\binom{N-K}{n-k}}{\binom{N}{n}}$

$P(X = 6)$ = $\frac{\binom{35}{6}\binom{65}{4}}{\binom{100}{10}}$ = $0.06348495671$
Problem 3: 

There are $6$ bulbs in a house out which $3$ are defective. If $2$ bulbs are picked randomly, find the probability that at least one is defective.

Solution: 

Total population, $N = 6$

Sample size, $n = 2$

Number of successes in $N,\ K = 3$

Number of successes in sample, $k = 0$

Probability of getting $2$ white marbles, $P(X = 0)$ = $\frac{\binom{K}{k}\binom{N-K}{n-k}}{\binom{N}{n}}$

$P(X = 0)$ = $\frac{\binom{3}{0}\binom{3}{2}}{\binom{6}{2}}$ = $0.2$

Probability of at least one defective bulb = $1 - P(X = 0) = 1 - 0.2 = 0.8$
Problem 4:

If $6$ cards are drawn from a deck of $52$ cards, find the probability of getting all kings in the draw.

Solution: 

Total population, $N = 52$

Sample size, $n = 6$

Number of successes in $N,\ K = 4$

Number of successes in sample, $k = 4$

Probability of getting $2$ white marbles, $P(X = 4)$ = $\frac{\binom{K}{k}\binom{N-K}{n-k}}{\binom{N}{n}}$

$P(X = 4)$ = $\frac{\binom{4}{4}\binom{48}{2}}{\binom{52}{6}}$ = $0.00005540678$