Tutorials › Statistical Theory I - Probability and Distribution Theory › Complement Symmetry in Hypergeometric Sampling

Geometric and Count Distributions · Tutorial 140 of 994

Complement Symmetry in Hypergeometric Sampling

Translate hypergeometric counts and events between successes and failures without changing the underlying sampling experiment.

Beginner 10 min read

What You'll Learn

  • Define the sampled failure count as the complement of the sampled success count.
  • Translate the support when success and failure labels are exchanged.
  • Prove the equality between corresponding hypergeometric probabilities.
  • Convert exact, lower-tail, and upper-tail events under the transformation.
  • Distinguish exchanging labels from considering the units not sampled.

Why Count Failures as Well as Successes?

In a fixed-size sample from a finite population, the numbers of successes and failures in the sample are linked: every sampled unit is one or the other. Consequently, a probability question stated in terms of failures may be answered by translating it into a question about successes, or vice versa. This is a symmetry of the same experiment, not a new sampling model.

The translation is useful when one label makes the event easier to describe or calculate. It also provides a direct check on a calculation: the probability of exactly \(x\) successes must equal the probability of exactly \(n-x\) failures in the same sample.

Setup and Definition

Suppose a population contains \(N\) distinct units, of which \(K\) are designated successes and \(N-K\) are failures. A sample of size \(n\) is selected uniformly from all subsets of \(n\) population units, without replacement. Let \(X\) count the sampled successes. The number of sampled failures is \(Y=n-X\).

Definition: Under this sampling scheme, \(X\) has a hypergeometric distribution with population size \(N\), \(K\) successes, and sample size \(n\), written \(X\sim\operatorname{Hypergeometric}(N,K,n)\). Its probability mass function is $$ P(X=x)=\frac{\binom{K}{x}\binom{N-K}{n-x}}{\binom{N}{n}}, $$ for integer \(x\) in the support $$ \max(0,n-(N-K))\leq x\leq \min(n,K). $$ Outside this support, \(P(X=x)=0\). The variable \(Y=n-X\) counts sampled failures.

The support records the constraints imposed by the population. A sample cannot contain more successes than the \(K\) available, more failures than the \(N-K\) available, or more than \(n\) units altogether. Its lower endpoint is positive when there are too few failures in the whole population to fill the sample without taking successes.

Worked Example: Translating the Support

A population has \(N=12\) units, \(K=5\) successes, and \(7\) failures. A sample of size \(n=4\) is drawn. Find the possible values of the success count \(X\) and failure count \(Y\).

For successes, the support endpoints are $$ \max(0,4-7)=0 \quad\text{and}\quad \min(4,5)=4. $$ Thus \(X\) can be \(0,1,2,3,\) or \(4\).

Since \(Y=4-X\), the corresponding failure counts are also \(0,1,2,3,\) or \(4\), but the values correspond in reverse order: \(X=0\) means \(Y=4\), while \(X=4\) means \(Y=0\). In this example both types are numerous enough to fill the sample by themselves. If the population had only two failures, a sample of four would have to contain at least two successes.

The Complement-Symmetry Result

When successes and failures are exchanged as labels, the number of successes in the original description becomes the number of failures in the relabeled description. The total number of sampled units remains \(n\), so a sample with \(x\) original successes has \(n-x\) original failures.

Theorem: If \(X\sim\operatorname{Hypergeometric}(N,K,n)\) and \(Y=n-X\), then $$ Y\sim\operatorname{Hypergeometric}(N,N-K,n). $$ For every integer \(x\), $$ P_{\operatorname{Hypergeometric}(N,K,n)}(X=x) = P_{\operatorname{Hypergeometric}(N,N-K,n)}(Y=n-x). $$ The equality includes values outside the relevant supports, where both sides are zero.

Here the subscript identifies which population composition is used to calculate the probability. The theorem does not assert that \(X\) and \(Y\) have the same distribution in general. Rather, it identifies the distribution of the failure count, or equivalently the success count after the labels are exchanged.

Proof by Relabeling and by the Probability Formula

There are \(\binom{N}{n}\) equally likely samples. Fix an integer \(x\) in the support of \(X\). A sample has exactly \(x\) successes and \(n-x\) failures if and only if it has exactly \(n-x\) failures and \(x\) successes. Counting such samples gives the original probability as $$ P(X=x)=\frac{\binom{K}{x}\binom{N-K}{n-x}}{\binom{N}{n}}. $$ If failures are now called successes, the relabeled population has \(N-K\) successes and \(K\) failures. The probability of exactly \(n-x\) relabeled successes is $$ \frac{\binom{N-K}{n-x}\binom{K}{n-(n-x)}}{\binom{N}{n}} = \frac{\binom{N-K}{n-x}\binom{K}{x}}{\binom{N}{n}}. $$ This is exactly the original probability. Since every sample has \(n\) units, the relabeled success count is \(n-X=Y\), proving the distribution statement as well.

The support also transforms consistently. The support of \(X\) is $$ \max(0,n-(N-K))\leq x\leq\min(n,K). $$ Setting \(y=n-x\) reverses the endpoints, giving $$ \max(0,n-K)\leq y\leq\min(n,N-K), $$ which is precisely the support of a hypergeometric count with \(N-K\) successes in the relabeled population. Thus the probability identity and the support agree. \(\square\)

The same result follows directly from the mass functions: substitute \(y=n-x\) into the relabeled formula. The combination terms then match because \(n-y=x\). This algebraic check is often the quickest way to verify that a proposed success–failure translation has not reversed the wrong quantity.

Worked Example: An Exact Probability in Two Descriptions

In a batch of \(12\) items, \(5\) are defective and \(7\) are not. Four items are selected without replacement. Find the probability of exactly \(2\) defective items, then calculate the corresponding probability in terms of nondefective items.

The number of possible samples is $$ \binom{12}{4}=495. $$ To get exactly \(2\) defective items, choose \(2\) of the \(5\) defective items and \(2\) of the \(7\) nondefective items: $$ P(X=2)=\frac{\binom{5}{2}\binom{7}{2}}{\binom{12}{4}} =\frac{10\cdot21}{495} =\frac{210}{495} =\frac{14}{33}. $$

A sample of four items has exactly \(2\) defective items precisely when it has \(4-2=2\) nondefective items. Counting that event directly gives $$ P(Y=2)=\frac{\binom{7}{2}\binom{5}{4-2}}{\binom{12}{4}} =\frac{21\cdot10}{495} =\frac{14}{33}. $$ The agreement is the complement-symmetry identity, not a coincidence in the arithmetic.

Translating Events, Not Just Exact Counts

The relation \(Y=n-X\) also translates sets of possible count values. If \(A\) is any set of integers, then the event \(X\in A\) is exactly the event \(Y\in\{n-x:x\in A\}\). In particular, reversing an inequality changes which tail is involved: $$ P(X\geq a)=P(Y\leq n-a), \qquad P(X\leq a)=P(Y\geq n-a), $$ for integer \(a\). These formulas follow by subtracting each side of the inequalities from \(n\); for instance, \(X\geq a\) is equivalent to \(n-X\leq n-a\).

Worked Example: Rewriting an Upper-Tail Event

A population contains \(3\) successes and \(7\) failures, and \(4\) units are sampled. Find the probability of at least \(2\) successes by rewriting it as an event about failures.

Let \(X\) be the number of successes and \(Y=4-X\) the number of failures. The event \(X\geq2\) is equivalent to \(Y\leq2\). Using the success count, $$ P(X\geq2) = \frac{\binom{3}{2}\binom{7}{2}+\binom{3}{3}\binom{7}{1}}{\binom{10}{4}} = \frac{3\cdot21+1\cdot7}{210} = \frac{70}{210} = \frac{1}{3}. $$

Using failures gives the same calculation with the cases \(Y=0,1,2\): $$ P(Y\leq2) = \frac{\binom{7}{0}\binom{3}{4} +\binom{7}{1}\binom{3}{3} +\binom{7}{2}\binom{3}{2}}{\binom{10}{4}}. $$ Because \(\binom{3}{4}=0\), this becomes $$ \frac{1\cdot0+7\cdot1+21\cdot3}{210} =\frac{70}{210} =\frac{1}{3}. $$ The zero term makes explicit that a sample of four cannot contain zero failures when there are only three successes in the population.

What the Symmetry Does and Does Not Change

Changing from \(X\) to \(Y=n-X\) preserves the sampling experiment and the set of sampled units. It changes which category is counted. In particular, if the earlier hypergeometric mean and variance formulas are used, the relation gives $$ E[Y]=n-E[X]=n-\frac{nK}{N}=\frac{n(N-K)}{N}, \qquad \operatorname{Var}(Y)=\operatorname{Var}(X). $$ The variance equality follows from \(\operatorname{Var}(n-X)=\operatorname{Var}(X)\). Thus exchanging labels changes the mean count from the success share to the failure share, but does not change the spread of the count.

This is different from taking the complement of the sample, meaning considering the \(N-n\) population units that were not selected. If \(Z\) counts successes among those unselected units, then \(Z=K-X\), not \(n-X\). The variable \(Y=n-X\) counts failures inside the sample; \(Z=K-X\) counts successes outside the sample. These quantities generally have different supports and answer different questions.

Worked Example: Distinguishing the Two Complements

A population has \(N=9\) units, of which \(K=4\) are successes. A sample of \(n=3\) is drawn, and suppose that \(X=2\) successes are observed. Find the numbers of sampled failures and unselected successes.

The number of sampled failures is $$ Y=n-X=3-2=1. $$ There are \(N-n=6\) units outside the sample. Of the population's \(K=4\) successes, \(2\) were sampled, so the number of unselected successes is $$ Z=K-X=4-2=2. $$ Thus the two complement operations produce \(1\) and \(2\), respectively. The first exchanges success and failure labels within the sample; the second moves from the sample to the unselected part of the population.

Common Mistake

  • Wrong reasoning: “There are \(n\) draws, so the number of failures is \(K-X\).” This subtracts the sampled success count from the total number of population successes.
  • Correction: Within the sample, the number of failures is \(n-X\), because the sample contains \(n\) units altogether. The expression \(K-X\) counts successes outside the sample.
  • Wrong tail translation: “At least \(a\) successes means at least \(n-a\) failures.”
  • Correction: Since \(Y=n-X\), the event \(X\geq a\) means \(Y\leq n-a\). Subtraction reverses the inequality.

A reliable check is to write the identity \(X+Y=n\) before translating an event. For exact counts, replace \(x\) by \(n-x\). For inequalities, subtract from \(n\) and reverse the inequality sign.

Key takeaway: In a hypergeometric sample of fixed size \(n\), sampled failures equal \(n-X\). Relabeling successes and failures therefore gives a hypergeometric count with \(N-K\) successes, and every event must be translated using the same identity.

Check Your Understanding

For each question, use \(Y=n-X\) and keep the population composition distinct from the sample size.

  1. If \(N=15\), \(K=6\), and \(n=5\), what is the distribution of the number of sampled failures?
  2. Write \(P(X=3)\) as a probability about the sampled failure count when \(n=7\).
  3. Rewrite the event \(X\leq 2\) as an event about \(Y\) when the sample size is \(6\).
  4. Explain why the number of sampled failures is \(n-X\), while the number of unselected successes is \(K-X\).
  5. For \(N=10\), \(K=4\), \(n=3\), express \(P(X\geq2)\) as a probability involving \(Y\).