The hypergeometric distribution

The binomial model used independent draws with a shared target probability. Suppose instead that an annotation archive contains 30 distinct clauses, nine passive and 21 active, and we choose five distinct clauses without replacement.

The clauses are sampled without replacement. Once a passive clause is selected, only eight passive clauses remain in the archive. The target probability thus changes across draws.

Let

K\equiv\text{the number of passive clauses among the five selected clauses}.

This count has a hypergeometric distribution.

Specifying the finite population

We need three collection sizes.

  1. The archive contains N=30 clauses.
  2. The target set contains M=9 passive clauses.
  3. The audit draws n=5 clauses.

The remaining N-M=21 clauses are active. The support of K contains counts that are compatible with these finite totals. Here

K\in\{0,1,2,3,4,5\}.

Counting samples rather than ordered sequences

To obtain exactly k passive clauses, choose k of the 9 passives and 5-k of the 21 active clauses. The number of favorable samples is

{9\choose k}{21\choose5-k}.

The total number of five clause samples is

{30\choose5}.

Every five clause subset is equally likely under simple random sampling without replacement. The PMF is thus defined by

p_K(k) \equiv\mathbb{P}(K=k) =\frac{{9\choose k}{21\choose5-k}} {{30\choose5}}.

Calculating the probability of two passives

Set k=2:

p_K(2) =\frac{{9\choose2}{21\choose3}} {{30\choose5}}.

The combinations are

{9\choose2}=36, \qquad {21\choose3}=1330, \qquad {30\choose5}=142506.

Thus

p_K(2) =\frac{36\times1330}{142506} \approx.336.

R computes the same mass with

Code
dhyper(2, m = 9, n = 21, k = 5)

Here m is the number of target objects, n is the number of other objects, and k is the sample size. The first argument is the observed target count.

Reading the mean and finite population correction

The target proportion in the archive is

\frac{M}{N}=\frac{9}{30}=.30.

The expected target count in five draws is

\mathbb{E}[K] =n\frac{M}{N} =5(.30) =1.5.

The variance is

\operatorname{Var}(K) =n\frac{M}{N}\left(1-\frac{M}{N}\right) \frac{N-n}{N-1}.

The final factor is the finite population correction. Here it is 25/29, which reduces the variance because removing one clause constrains later draws.

Comparing with independent sampling

If each draw instead came independently from a very large population with passive probability .30, the target count would be binomial. Both models would have mean 1.5, but the without replacement model has smaller variance.

The distinction is not about which curve looks better. It follows from whether the same finite clauses remain available after each draw.

Sampling without replacement changes later probabilities

Draws are not independent after sampled objects have been removed. The passive probability on the second draw depends on what happened on the first draw.

Specify the finite population and sampling rule. If every selected clause is unavailable to later draws, the hypergeometric calculation represents that dependence directly.

The same finite sampling calculation appears when margins of a contingency table are fixed. The Fisher’s exact test page later uses this connection for inference.

Check your understanding

  1. In the PMF, what does {21\choose5-k} count?
  2. Compute the expected passive count when 8 clauses are drawn from the same archive.
  3. Why is the variance smaller than under independent sampling with probability .30?
  4. When would the binomial model become a close approximation to this sampling process?

Sampling without replacement changes probability after each draw. The next page returns to repeated comparable draws and models the wait to the first target outcome.