A bag holds twelve wooden tokens. Five are blue and seven are natural wood. You mix the bag, draw four tokens without putting any back and count the blue ones. What is the chance of drawing exactly two blue tokens? A calculation that uses five twelfths as the probability of blue on every draw would describe a bag that resets each time. Here the first token stays on the table, so what remains in the bag depends on what you drew.
The hypergeometric distribution answers this kind of question by counting groups of tokens. You can work through the count with a few small combinations and check it independently with a probability tree. Keep the meaning of “exactly” visible from the first line. Two blue tokens in a draw of four also means two natural tokens.
When the hypergeometric distribution fits
Start with a fixed group of distinguishable objects. Some have the property you want to count and the rest do not. Take a fixed number uniformly at random without replacement. The objects may come out in sequence or all at once. If the question counts how many have the chosen property and ignores the order, both procedures give the same model under uniform sampling.
Use N for the total number of objects, K for the number with the chosen property, n for the sample size and X for the number of chosen objects in the sample with that property. In the bag, N = 12, K = 5 and n = 4. The value of X can change from one sample to another. Asking for exactly two blue tokens means evaluating P(X = 2). Blue plays the role sometimes called a success in probability notation. That word just names the property being counted.
Uniform sampling matters as much as the absence of replacement. If the blue tokens are heavier and you can identify them by feel, a draw made by reaching into the bag may favor one color. The standard count assumes that every group of four labeled tokens is equally likely. Emory’s probability notes introduces the hypergeometric distribution using this fixed population and sampling setup.

Count the possible samples before counting the favorable ones
Temporarily label the tokens, even when they share a color. Four particular tokens form a single sample regardless of the order in which they leave the bag. There are 12 × 11 × 10 × 9 ordered lists of four distinct tokens. Each group gives exactly 4 × 3 × 2 × 1 such lists, so divide to get 495 possible groups. Write this as C(12, 4), read as “twelve choose four.”
Using labeled tokens prevents a subtle counting error. The color pattern with four natural tokens and the pattern with two of each color are two categories, but each category contains many groups. Those categories need not be equally likely. The elementary samples in the denominator are sets of particular tokens, so each one can carry the same probability under the sampling rule.
To make a favorable group, choose two of the five blue tokens in C(5, 2) = 10 ways. Then choose two of the seven natural tokens in C(7, 2) = 21 ways. For each blue pair you can use any natural pair. Multiplying gives 210 groups. The ratio is 210/495 = 14/33, about 42.4%. This is the same counting principle used when deciding whether to use combinations or permutations. Notice that the two choices in the numerator determine different parts of the same sample.

Write the formula so each input has a job
In general, a sample with exactly k objects of the chosen type has k objects from the K marked ones and n − k from the N − K others. Thus P(X = k) = C(K, k) × C(N − K, n − k) / C(N, n). Read every argument before entering it in a calculator. The first lower number is the requested count. The second fills the remaining slots. The denominator counts groups of size n from the whole population.
A requested count has to be possible in both groups. It cannot exceed K or n. It also has to be large enough that the remaining slots can be filled with the available N − K other objects. Those conditions give a minimum of max(0, n − (N − K)) and a maximum of min(n, K). Outside that range the probability is zero.
For example, imagine eight tokens, six blue and two natural, and draw five. At least three must be blue, because there are only two natural tokens in the entire bag. At most five can be blue, because there are only five draws. A request for exactly two blue tokens has probability zero. A group with two blue tokens would require three natural ones, so the impossible event is apparent before you touch the formula. Checking the range also tells you which terms to add when the question asks for several possible counts.
Verify the result with ordered draws
As a second route, consider the specific sequence blue, blue, natural, natural. Its probability is (5/12) × (4/11) × (7/10) × (6/9). The denominators shrink by one each time. After the first blue draw there are four blue tokens left. After two blue draws all seven natural tokens are still in the bag. This produces 7/99 for that one order.
There are six choices of positions for the two blue tokens among the four draws. Each choice gives a disjoint sequence with the same product. The two blue factors have numerators 5 and 4 in the order the blue tokens appear, and the two natural factors have numerators 7 and 6 in the order the natural tokens appear. Changing the positions moves those numerators between fractions without changing the product. Adding six identical probabilities gives 6 × 7/99 = 14/33, which matches the count of groups.
A quick tree is particularly helpful when you want to see which probability changes after a draw. Counting combinations is usually shorter when many orders lead to the same event. The choice of method can depend on what the question records. If the question specifies that the first two tokens must be blue and the next two must be natural, use 7/99. If it specifies exactly two blue tokens anywhere in the sample, use 14/33.

Turn event wording into a set of counts
For the original bag, the favorable group counts for X = 0, 1, 2, 3 and 4 are 35, 175, 210, 70 and 5. They sum to 495 because every group belongs to exactly one of these categories. You can use the same denominator for each event. “At least two” asks for X = 2, 3 or 4, giving (210 + 70 + 5)/495 = 19/33. “Exactly two” uses just 210 groups. The extra possibilities explain why the first probability is greater.
“At least one” can be computed by excluding the all-natural sample. There are C(7, 4) = 35 such groups, so P(X ≥ 1) = 1 − 35/495 = 92/99. A complement is often faster if the excluded event has fewer counts to consider. The event wording works the same way when you interpret exactly and at least in a binomial question. What changes is the probability attached to each count.
Check the sampling rule when deciding between these two distributions. With replacement, each draw from this bag has probability 5/12 of blue, independent of the previous draws if you mix again. Without replacement, the second draw has probability 4/11 of blue after blue and 5/11 after natural. Even though each position on its own has an unconditional probability of 5/12, the conditional probabilities show why you cannot multiply a constant blue probability across all four draws.
The expected value of a count answers a separate question. Here (175 + 2 × 210 + 3 × 70 + 4 × 5)/495 = 5/3 is the average number of blue tokens over repeated samples.
Check your method on a smaller bag
Imagine nine tokens, three blue and six natural, and draw four without replacement. First find the probability of exactly one blue token. Then find the probability of at least one. Write down the sample size and the two color counts before doing either calculation. The two questions share a denominator, but they ask for different sets of samples.
For exactly one blue token, take C(3, 1) = 3 choices of blue and C(6, 3) = 20 choices of natural. The denominator is C(9, 4) = 126, so the probability is 60/126 = 10/21. For at least one blue, subtract the probability that all four are natural. There are C(6, 4) = 15 such groups, so the answer is 1 − 15/126 = 37/42.
You can check the complement by counting the other events directly. Two blue tokens give C(3, 2) × C(6, 2) = 45 groups. Three blue tokens give C(3, 3) × C(6, 1) = 6 groups. Four blue tokens are impossible. Add 60 + 45 + 6 to get 111, the same numerator as 126 − 15. If your answers disagree, trace the two group counts back to the words in the question. Each sample must contain four tokens and each group should be counted once.

Identify what counts as a sample
Return to the original bag and take just two tokens. The chance that both are blue is (5/12) × (4/11) = 5/33. Counting groups gives the same value because there are ten blue pairs among sixty-six possible pairs. Only one color sequence qualifies, so the factor of six from the four-draw example does not apply.
The bag could also represent a shipment in which some items have a scratch. When you inspect each selected item just once, the sampling is without replacement. Scratched and unscratched pieces play the roles of the two colors. The calculation assumes a fixed number of scratched pieces and a uniform sample. Taking only pieces visible at the top of a box gives you no basis for that uniformity assumption.
For a new problem, write what the population, property and sample represent next to your formula. Then compare the event wording with the counts you used. If “at least two” and “exactly two” give the same answer, decide whether higher counts are impossible or whether you left them out by mistake.
