Tutorials › VEE Mathematical Statistics › A Model-Selection Workshop for Finite Sampling

VEE Mathematical Statistics · Hypergeometric and Discrete Uniform Models · Tutorial 148 of 880

A Model-Selection Workshop for Finite Sampling

Identify how a finite selection is made, determine the possible outcomes, and choose the matching probability model without confusing item counts with uniformly selected values.

Intermediate 11 min read

What You'll Learn

  • Identify when sampling without replacement calls for a hypergeometric model.
  • Find the support of a hypergeometric count from population and sample sizes.
  • Calculate hypergeometric probabilities for exact counts and ranges of counts.
  • Recognize a discrete uniform variable from its finite, equally likely support.
  • Translate combined conditions into a count of qualifying discrete uniform values.
  • Avoid model-selection errors caused by ignoring how the sample is drawn.

Start With the Selection Mechanism

A finite-sampling problem is not solved by recognizing a familiar-looking formula. First determine what is selected, how it is selected, and what the random variable records. A sample of several objects drawn without replacement leads naturally to a count model. A single value selected with equal probability from a finite set leads to a discrete uniform model. These models can both involve finite populations, but their random variables and probability calculations are different.

The essential questions are: What is the population? Are selections made with or without replacement? Are the possible outcomes equally likely? What event is being asked about? Answering them in this order prevents a frequent error: applying a correct formula to a random experiment that does not satisfy its assumptions.

Definition: Suppose a population contains \(N\) distinct objects, of which \(K\) are designated successes. A simple random sample of size \(n\) is selected without replacement, so every subset of \(n\) objects is equally likely. If \(X\) is the number of successes in the sample, then \(X\) has a hypergeometric distribution with parameters \(N\), \(K\), and \(n\).
Definition: A discrete uniform random variable on a finite set \(A\) has the same probability for every value in \(A\). If \(A\) contains \(m\) values, then each value has probability \(1/m\), and the probability of an event is the number of values in \(A\) that satisfy the event divided by \(m\).

The word success in a hypergeometric model is only a label for the category being counted. It need not describe a favorable outcome. For example, it could mean “requires review,” “is defective,” or “belongs to a specified group.” A discrete uniform model, by contrast, concerns a random variable whose individual possible values have equal probabilities. Selecting one numbered token uniformly from a set of tokens numbered 1 through 8 gives a discrete uniform number. Selecting four objects from a stock and counting how many are marked does not.

Hypergeometric Model: Parameters, Support, and Probability

Under the definition above, the hypergeometric probability mass function is

$$ P(X=x)=\frac{\binom{K}{x}\binom{N-K}{n-x}}{\binom{N}{n}}. $$

Here \(\binom{N}{n}\) counts all possible samples of size \(n\). For a sample to contain exactly \(x\) successes, it must contain \(x\) of the \(K\) successes and \(n-x\) of the \(N-K\) non-successes. The numerator counts those samples. Dividing by the total number of equally likely samples gives the probability.

The support must respect both the sample size and the available objects in each category. The smallest possible count is the larger of zero and the number of draws that cannot be filled by non-successes. The largest possible count is the smaller of the number drawn and the number of successes in the population.

$$ \max\bigl(0,\ n-(N-K)\bigr)\ \leq x\leq\ \min(n,K), \qquad x\text{ an integer}. $$

This support check is useful before calculating. If a requested count is outside these bounds, its probability is zero. For an event such as “at least two,” add the point probabilities for every supported integer at least two, or count the same samples directly if that is simpler.

Why the formula holds: In a simple random sample without replacement, each of the \(\binom{N}{n}\) subsets has equal probability. Exactly \(x\) successes can be chosen in \(\binom{K}{x}\) ways, while the remaining \(n-x\) objects can be chosen in \(\binom{N-K}{n-x}\) ways. These choices are disjoint and determine the sample, so the number of qualifying subsets is their product. The ratio of qualifying subsets to all subsets is the stated probability.

Worked Example: At Least Two Flagged Units in a Sample

A hypothetical warehouse has 12 distinct units ready for a check. Five are flagged for additional inspection, and seven are not. Four units are chosen as a simple random sample without replacement. Find the probability that at least two chosen units are flagged.

Method and model. The population is the 12 units, \(N=12\); the flagged category has \(K=5\); and the sample size is \(n=4\). Because the four distinct units are chosen without replacement and every four-unit subset is equally likely, \(X\), the number flagged, is hypergeometric.

The support is \(\max(0,4-(12-5))=0\) through \(\min(4,5)=4\). Thus “at least two” means \(X=2,3,\) or \(4\). There are \(\binom{12}{4}=495\) possible samples.

For exactly two flagged units, the number of samples is \(\binom{5}{2}\binom{7}{2}=10\cdot21=210\). For exactly three, it is \(\binom{5}{3}\binom{7}{1}=10\cdot7=70\). For exactly four, it is \(\binom{5}{4}\binom{7}{0}=5\cdot1=5\).

$$ P(X\geq 2)=\frac{210+70+5}{495} =\frac{285}{495} =\frac{19}{33} \approx 0.5758. $$

The probability is approximately \(0.5758\), or \(57.58\%\). Check: the favorable count, 285, is less than the total count, 495, and the probability is between zero and one. The common mistake this method avoids is calculating only \(P(X=2)\) when the event asks for at least two.

Discrete Uniform Model: Count Values, Not Samples

For a discrete uniform variable on a finite set \(A\), the probability of an event \(E\) is

$$ P(Y\in E)=\frac{\#\{y\in A:y\in E\}}{\#A}. $$

The numerator is a count of qualifying values, not a count of samples from a larger inventory unless those samples are themselves the equally likely outcomes defining \(Y\). For consecutive integers \(a,a+1,\ldots,b\), the support has \(b-a+1\) values. For an irregular finite set, list or otherwise count its actual elements; do not fill in gaps that are not in the support.

When an event combines conditions, apply all of them to each candidate value. For example, “less than 10 or even” is a union of conditions, and values satisfying both must not be counted twice. One reliable approach is to list the qualifying support values, then count them once.

Worked Example: A Range and Parity Event

A device generates one integer \(Y\) uniformly from the 25 integers \(-4,-3,\ldots,19,20\). Find the probability that \(Y<-1\), or that \(Y\geq14\) and \(Y\) is even.

Method and model. The support contains every integer from \(-4\) through \(20\), inclusive, so its size is \(20-(-4)+1=25\). The stated uniform mechanism assigns probability \(1/25\) to each value.

The first part of the event, \(Y<-1\), gives \(-4,-3,-2\), or 3 values. The second part requires both \(Y\geq14\) and an even value. Its values are \(14,16,18,20\), or 4 values. The two parts do not overlap, since the first values are below \(-1\) and the second are at least 14.

$$ P\bigl(Y<-1\ \text{or}\ (Y\geq14\text{ and }Y\text{ even})\bigr) =\frac{3+4}{25} =\frac{7}{25} =0.28. $$

The probability is \(0.28\). Check: seven of the 25 support values satisfy at least one part of the event. The common mistake this method avoids is counting every even value in the support, rather than only even values that also satisfy \(Y\geq14\).

A Model-Selection Workflow

Use the following sequence before inserting numbers into a probability formula. In particular, distinguish the mechanism that selects objects from the numerical values that may be recorded for those objects.

1
Define the population and unit.
State what the objects or possible values are. For a count from an inventory, identify the total number \(N\) and the category count \(K\).
2
Describe the selection mechanism.
For a sample of distinct objects drawn without replacement, check whether every sample subset of the stated size is equally likely. For a discrete uniform variable, verify that every support value is equally likely.
3
Define the random variable and support.
For a hypergeometric model, define \(X\) as the count in the selected sample and calculate its feasible integer range. For a discrete uniform model, write down the finite support and count its values.
4
Translate the target event.
Convert wording such as “exactly,” “at least,” “between,” “or,” and “and” into the relevant counts or support values before calculating.
5
Calculate and check.
Use combinations to count hypergeometric samples, or count qualifying values for a discrete uniform variable. Confirm that the answer is between zero and one and that the counted outcomes match the event.

Worked Example: Exactly One Priority Packet in a Sample

A hypothetical routing center has 16 distinct packets, of which 6 have a priority tag and 10 do not. Three packets are selected as a simple random sample without replacement. Find the probability that exactly one selected packet has a priority tag.

Method and model. This is a hypergeometric count: \(N=16\), \(K=6\), and \(n=3\). The random variable \(X\) counts priority packets. Its support is from \(\max(0,3-10)=0\) to \(\min(3,6)=3\), so the requested count of one is feasible.

The total number of equally likely samples is \(\binom{16}{3}=(16\cdot15\cdot14)/(3\cdot2\cdot1)=560\). To obtain exactly one priority packet, choose 1 from the 6 priority packets and 2 from the 10 other packets: \(\binom{6}{1}\binom{10}{2}=6\cdot45=270\).

$$ P(X=1)=\frac{\binom{6}{1}\binom{10}{2}}{\binom{16}{3}} =\frac{270}{560} =\frac{27}{56} \approx 0.4821. $$

The probability is approximately \(0.4821\). Check: \(27/56\) is the reduced form of \(270/560\), and 270 qualifying samples are fewer than the 560 total samples. The common mistake this method avoids is treating the three draws as independent: without replacement, the selected packets are distinct and their composition changes as packets are drawn.

Common Model-Selection Traps

The distinction between the models is not simply “a finite situation” versus “a non-finite situation.” Both models have finite outcomes. The key is what the random variable represents and what outcomes are equally likely.

Problem descriptionModel choiceReason
Count marked objects in a simple random sample drawn without replacementHypergeometricEach sample subset is equally likely, and the variable counts marked objects
Select one value uniformly from a stated finite setDiscrete uniformEach support value has the same probability
Count marked objects after a selection mechanism that does not make sample subsets equally likelyDo not assume hypergeometricThe simple-random-sample assumption must be checked
Choose an object uniformly, then record a category shared by several objectsModel the recorded variable from the object selectionDifferent category values need not be equally likely

A common wrong calculation is to assume that every category observed after choosing an object is equally likely. Suppose a set contains 8 objects, 6 labeled “standard” and 2 labeled “priority,” and one object is selected uniformly. The labels are not equally likely: their probabilities are \(6/8\) and \(2/8\), respectively. A discrete uniform model on the two labels would incorrectly assign probability \(1/2\) to each. The correction is to use the actual selection mechanism and count how many objects produce each recorded value.

For a hypergeometric problem, another trap is to use the total population as the denominator of the probability formula rather than the number of possible samples. The formula counts sample subsets: its denominator is \(\binom{N}{n}\), not \(N\). For a discrete uniform problem, the matching trap is to divide by the number of integers in a broad interval when the stated support is a smaller, irregular set. In each case, the denominator must count the equally likely outcomes of the actual experiment.

Key takeaway: Choose a model from the selection mechanism and the random variable, not from the story’s general setting. Hypergeometric probabilities compare counts of sample subsets; discrete uniform probabilities compare counts of equally likely support values.

Check Your Understanding

For each problem, identify the relevant support or sample count before evaluating the event.

  1. A tray has 14 distinct components, 5 of which need a special check. Two are selected without replacement as a simple random sample. What is the probability that at least one needs the check? (Answer: \(55/91\approx0.6044\))
  2. An integer \(Y\) is selected uniformly from \(11,12,\ldots,30\). Find the probability that \(Y\) is a multiple of 4 or \(Y\geq27\). (Answer: \(8/20=0.4000\))
  3. A sample of 5 is drawn without replacement from 18 distinct records, 7 of which are marked. Find the probability that exactly 3 sampled records are marked. (Answer: \(\binom{7}{3}\binom{11}{2}/\binom{18}{5}=1925/8568\approx0.2247\))
  4. A value is selected uniformly from the set \(\{2,5,8,11,14,17,20,23,26,29\}\). Find the probability that it is greater than 15 and odd. (Answer: \(3/10=0.3000\))
  5. A simple random sample of 4 components is drawn without replacement from 20 distinct components, 8 of which are defective. Find the probability that none of the selected components is defective. (Answer: \(\binom{12}{4}/\binom{20}{4}=495/4845=11/107\approx0.1028\))
Clinical Biostats