Why Counting Gives the Hypergeometric Model
When a sample is drawn without replacement from a finite population, the chance of success changes from draw to draw. The hypergeometric model handles this dependence by counting possible samples directly. Its key condition is that the sample is a simple random sample: every subset of the specified size is equally likely.
For example, an auditor might select a fixed number of records from a finite file and count how many are flagged for review. The count is hypergeometric if the file has a fixed number of flagged records and the selected records form a simple random sample without replacement. The derivation below does not require draws to be independent; it relies on equally likely subsets.
The items are treated as distinct for counting, even when they share the same success/failure label. Thus two different subsets of items count as different samples. For a possible value \(k\), the sample must contain \(k\) of the \(K\) successes and \(n-k\) of the \(N-K\) failures. The support is \( \max(0,n-(N-K))\leq k\leq \min(n,K)\), with \(k\) an integer.
Deriving the Probability Mass Function
There are \(\binom{N}{n}\) possible samples of size \(n\) from \(N\) distinct items. Since the sample is simple random, each of these subsets has probability \(1/\binom{N}{n}\). To obtain exactly \(k\) successes, choose \(k\) items from the \(K\) successes and \(n-k\) items from the \(N-K\) failures. The number of favorable subsets is therefore \(\binom{K}{k}\binom{N-K}{n-k}\).
Outside this support, \(P(X=k)=0\). The numerator counts favorable samples, not sequences of draws. The denominator and numerator use the same kind of outcome: unordered subsets.
Choose \(n\) items from the \(N\) distinct population items. This gives \(\binom{N}{n}\) equally likely subsets.
For exactly \(k\) successes, choose \(k\) from the \(K\) successes and \(n-k\) from the \(N-K\) failures. The choices are independent as counting decisions, so multiply their counts.
Because every possible subset has the same probability, the ratio of the two counts is \(P(X=k)\).
Worked Example: Building the Mass Function for a Small Sample
A hypothetical kit contains 8 distinct sensor units, 3 of which have a designated calibration flag. An inspector selects 2 units as a simple random sample without replacement. Let \(X\) be the number of flagged units selected. Derive the mass function and verify its total.
Method and model. Here \(N=8\), \(K=3\), and \(n=2\). The sample can contain \(k=0,1,\) or \(2\) flagged units: \(k\) cannot be negative or exceed the sample size, and the population has 3 flagged units. There are \(\binom{8}{2}=8\cdot7/(2\cdot1)=28\) possible unordered samples.
For \(k=0\), choose no flagged units and both units from the 5 unflagged units: \(\binom{3}{0}\binom{5}{2}=1\cdot10=10\). Thus \(P(X=0)=10/28=5/14\).
For \(k=1\), choose 1 of the 3 flagged units and 1 of the 5 unflagged units: \(\binom{3}{1}\binom{5}{1}=3\cdot5=15\). Thus \(P(X=1)=15/28\).
For \(k=2\), choose both units from the 3 flagged units: \(\binom{3}{2}\binom{5}{0}=3\cdot1=3\). Thus \(P(X=2)=3/28\).
Check. The probabilities sum to \(10/28+15/28+3/28=28/28=1\). The favorable-sample counts also sum to \(10+15+3=28\), the number of possible samples. The common mistake to avoid is counting the ordered draw sequences in the numerator while using the 28 unordered samples in the denominator.
Why the Probabilities Sum to One
The mass function is normalized because every possible sample has exactly one number of successes. Grouping all samples according to that number partitions the set of all samples into disjoint groups. No sample is omitted, and no sample belongs to two groups.
For each feasible \(k\), the group contains \(\binom{K}{k}\binom{N-K}{n-k}\) samples. Summing these group sizes must therefore recover the total number \(\binom{N}{n}\). Dividing that count identity by \(\binom{N}{n}\) proves that the probabilities sum to one.
This counting argument is also a justification of the identity in the first display: count all \(n\)-item subsets of the population once directly, and once by first specifying how many of their items are among the \(K\) successes. Values outside the feasible range contribute no subsets, which is why the sum can be restricted to the support.
Worked Example: Checking Normalization by Grouping Samples
A hypothetical archive has 11 distinct files, 4 of which are marked for follow-up. A reviewer selects 3 files by simple random sampling without replacement. Let \(X\) count marked files. Find the number of possible samples in each success-count group and verify the normalization.
Method and model. Set \(N=11\), \(K=4\), and \(n=3\). The possible counts are \(k=0,1,2,3\). There are \(\binom{11}{3}=11\cdot10\cdot9/(3\cdot2\cdot1)=165\) possible samples.
For \(k=0\), the count is \(\binom{4}{0}\binom{7}{3}=1\cdot35=35\). For \(k=1\), it is \(\binom{4}{1}\binom{7}{2}=4\cdot21=84\). For \(k=2\), it is \(\binom{4}{2}\binom{7}{1}=6\cdot7=42\). For \(k=3\), it is \(\binom{4}{3}\binom{7}{0}=4\cdot1=4\).
The corresponding probabilities are \(35/165\), \(84/165\), \(42/165\), and \(4/165\). Their sum is \((35+84+42+4)/165=165/165=1\). The check confirms that the success-count groups exhaust all subsets. The common mistake to avoid is counting only the ways to choose marked files; every favorable sample must also specify which unmarked files complete the sample.
Worked Example: Applying the Support When the Sample Is Large
A hypothetical shipment has 12 distinct packages, 5 of which carry a handling label. A quality analyst samples 9 packages without replacement, with all 9-package subsets equally likely. Let \(X\) count labeled packages. Derive the feasible values, count each group, and verify the total.
Method and model. Here \(N=12\), \(K=5\), and \(n=9\). At least \(9-(12-5)=2\) labeled packages must be selected, because there are only 7 unlabeled packages. At most 5 can be selected. Thus the support is \(k=2,3,4,5\). The total number of samples is \(\binom{12}{9}=\binom{12}{3}=12\cdot11\cdot10/(3\cdot2\cdot1)=220\).
For \(k=2\), there are \(\binom{5}{2}\binom{7}{7}=10\cdot1=10\) samples. For \(k=3\), there are \(\binom{5}{3}\binom{7}{6}=10\cdot7=70\). For \(k=4\), there are \(\binom{5}{4}\binom{7}{5}=5\cdot21=105\). For \(k=5\), there are \(\binom{5}{5}\binom{7}{4}=1\cdot35=35\).
The mass is these counts divided by 220, so the four probabilities are \(10/220\), \(70/220\), \(105/220\), and \(35/220\). They sum to \((10+70+105+35)/220=220/220=1\). The common mistake is to assume \(k\) can be zero just because zero is a valid count in general. Here selecting 9 packages from only 7 unlabeled packages forces at least 2 labeled packages.
Conditions and Common Counting Traps
The combination formula applies when the population is finite, the numbers of successes and failures are fixed, and all subsets of size \(n\) are equally likely. In particular, the sample is taken without replacement. If items are drawn with replacement, subsets do not describe the outcomes and the hypergeometric model does not apply. If subsets have unequal selection probabilities, the ratio of counts is not sufficient to determine probabilities.
- Mixing ordered and unordered outcomes. The denominator \(\binom{N}{n}\) counts subsets. Do not pair it with a numerator counting draw sequences.
- Omitting the failures. A sample with \(k\) successes must also include \(n-k\) failures; its favorable count includes both combination factors.
- Using an impossible count. A value outside \(\max(0,n-(N-K))\leq k\leq\min(n,K)\) has probability zero.
- Assuming independent draws. Without replacement, the draws are dependent. The counting derivation handles this dependence rather than ignoring it.
For a quick internal check, add the favorable-sample counts across the entire support. They must equal \(\binom{N}{n}\). If they do not, revisit the support or the combination factors before interpreting any probability.
Check Your Understanding
For each problem, identify the counting model and use combinations; assume simple random sampling without replacement unless stated otherwise.
- A tray contains 9 distinct cards, 2 of them gold-marked. Four cards are selected as a simple random sample. State the support of the number of gold-marked cards and the denominator in its mass function. (Answer: support \(k=0,1,2\); denominator \(\binom{9}{4}=126\).)
- A collection has 10 distinct devices, 3 with a certain alert and 7 without it. A sample of 2 is selected. Give the favorable-sample count and probability for exactly one alert. (Answer: \(\binom{3}{1}\binom{7}{1}=21\), so \(P(X=1)=21/\binom{10}{2}=21/45=7/15\).)
- A batch has 8 distinct parts, 5 acceptable and 3 not acceptable. A sample of 4 is taken. Give the feasible support and the number of samples in each success-count group. (Answer: support \(k=1,2,3,4\); counts \(5,30,30,5\), respectively; total \(\binom{8}{4}=70\).)
- A population has 13 distinct records, 4 flagged and 9 unflagged. A sample of 10 is selected. Write the mass function using the feasible support and verify the favorable counts sum to the total number of samples. (Answer: support \(k=1,2,3,4\); counts \(4,54,144,84\), summing to \(\binom{13}{10}=286\).)
- A box contains 6 distinct green tokens and 5 distinct orange tokens. Four tokens are selected. An analyst counts ordered sequences but divides by the number of four-token subsets. Explain the mismatch and state the correct denominator. (Answer: ordered sequences and unordered subsets are different outcome spaces; for a simple random sample of four tokens, use \(\binom{11}{4}=330\) unordered subsets and count favorable subsets with combinations.)