Tutorials › VEE Mathematical Statistics › Why Binomial Coefficients Count Success Patterns

VEE Mathematical Statistics · Bernoulli and Binomial Models · Tutorial 82 of 880

Why Binomial Coefficients Count Success Patterns

See how selecting success positions gives the number of patterns with exactly a specified number of successes, including when some trial outcomes are fixed.

Beginner 10 min read

What You'll Learn

  • Represent a trial sequence by the positions marked success.
  • Derive the factorial formula for choosing k positions from n.
  • Count patterns when some positions have prescribed outcomes.
  • Handle zero successes, all successes, and impossible values of k.
  • Distinguish choosing positions from ordering the chosen successes.
  • Check constrained pattern counts against the unrestricted count.

From Trial Sequences to Success Positions

A sequence of Bernoulli trial outcomes is an ordered string: the first outcome belongs to trial 1, the second to trial 2, and so on. For counting purposes, each position is labeled by its trial number. A pattern such as \(FSSFS\) therefore records more than the number of successes; it also records where those successes occurred.

If a sequence has exactly \(k\) successes among \(n\) trials, its pattern is determined by selecting which \(k\) of the \(n\) labeled positions contain success. Once those positions are selected, all other positions must contain failure. The counting question is thus a combinations question: how many different groups of \(k\) positions can be selected from \(n\)?

Definition: For integers \(n\geq 0\) and \(0\leq k\leq n\), the binomial coefficient \(\binom{n}{k}\), read “\(n\) choose \(k\),” is the number of ways to select an unordered group of \(k\) distinct objects from \(n\) distinct objects. In a length-\(n\) success-failure sequence, \(\binom{n}{k}\) is the number of patterns with exactly \(k\) successes.

The word unordered matters. For a pattern with successes in positions 2, 4, and 5, the selected group is \(\{2,4,5\}\). Writing those selected positions in the order 2, 4, 5 or 5, 2, 4 does not create a different trial pattern: the outcome in each position stays the same. In contrast, selecting positions \(\{2,4,6\}\) does produce a different pattern, because trial 5 changes from success to failure and trial 6 changes from failure to success.

Why the Binomial Coefficient Counts the Patterns

First imagine choosing the success positions in order. There are \(n\) choices for the first position, \(n-1\) for the second, and so forth, giving \(n(n-1)\cdots(n-k+1)\) ordered selections. But each group of \(k\) positions has been counted \(k!\) times: its \(k\) positions can be arranged in \(k!\) orders, all representing the same group. Dividing by \(k!\) removes that repeated counting.

$$ \binom{n}{k} = \frac{n(n-1)\cdots(n-k+1)}{k!} = \frac{n!}{k!(n-k)!}. $$

This argument also explains why the count applies to success patterns. Choosing a group of \(k\) positions assigns success to those \(k\) trials and failure to the other \(n-k\). Every pattern with exactly \(k\) successes gives exactly one such group, and every such group gives exactly one pattern. There is a one-to-one correspondence, so the number of patterns equals the number of groups.

The formula assumes that the \(n\) positions are distinct and that the outcome at each position is either success or failure. It counts patterns, not probabilities. No independence assumption or success probability is needed to count them. If \(k<0\) or \(k>n\), no pattern is possible; the usual formula is used for \(0\leq k\leq n\).

Worked Example: Exactly Two Successful Checks, With the Last Check Fixed

A hypothetical lab runs six numbered checks on a sensor. Each check is recorded as success (S) or failure (F). How many outcome patterns have exactly two successes if check 6 is known to be a success?

Method: fix the required position, then choose the remaining success position. Since check 6 must be a success, one of the two success positions is already determined. Exactly one more success must be placed among checks 1 through 5.

$$ \binom{5}{1}=\frac{5!}{1!4!}=5. $$

The five patterns are \(SFFFFS\), \(FSFFFS\), \(FFSFFS\), \(FFFSFS\), and \(FFFFSS\). Each has two successes, including the required success at position 6, so the count is verified.

Common mistake avoided: using \(\binom{6}{2}=15\) would count all patterns with two successes, including ones where check 6 fails. The fixed outcome removes check 6 from the available choices for the remaining success.

Counting When Several Outcomes Are Prescribed

A fixed success uses one of the required success positions; a fixed failure uses one of the positions that cannot be chosen for success. After accounting for prescribed outcomes, count the needed successes among the remaining free positions. It is useful to write down the number of free positions and the number of additional successes before calculating.

Worked Example: A Prescribed Failure and a Prescribed Success

A sequence contains eight trial outcomes and must have exactly three successes. Trial 1 is required to be a failure, and trial 8 is required to be a success. How many patterns satisfy all three conditions?

Method: remove the prescribed positions and choose the remaining successes. Trial 8 accounts for one of the three successes. Trial 1 is already a failure. The six free positions are trials 2 through 7, and exactly two of them must be successes.

$$ \binom{6}{2} = \frac{6!}{2!4!} = \frac{6\cdot5}{2\cdot1} = 15. $$

For each of these 15 choices, the selected two free positions and position 8 are successes; position 1 and the other four free positions are failures. Thus every counted choice gives a valid length-eight pattern, with exactly three successes.

Common mistake avoided: \(\binom{7}{2}\) would be wrong because it treats trial 1 as available for success. The two remaining successes must be chosen from the six positions that are actually free.

Unrestricted Counts and Restricted Counts

The same reasoning works when several positions are fixed to failure. If \(r\) positions are required to be failures and none of them is required to be a success, then only \(n-r\) positions remain available. When exactly \(k\) successes are required, the count is \(\binom{n-r}{k}\), provided \(0\leq k\leq n-r\). If some positions are fixed successes as well, subtract those from the required total first.

A restricted count cannot exceed the unrestricted count \(\binom{n}{k}\), because every pattern satisfying the restriction is already among all patterns with \(k\) successes. This is a useful check on arithmetic. For example, requiring the first and last outcomes to be failures limits the available positions for success; it cannot create additional patterns.

Worked Example: Excluding Successes at Both Ends

A hypothetical quality-control sequence has nine numbered tests and must contain exactly four successes. The first and ninth tests must both fail. Count the allowed patterns, and compare the result with the number of unrestricted patterns having four successes.

Method: count the restricted choices, then calculate the unrestricted total for comparison. With tests 1 and 9 fixed as failures, the four successes must be selected from the seven interior tests, numbered 2 through 8.

$$ \text{Restricted count} = \binom{7}{4} = \frac{7!}{4!3!} = \frac{7\cdot6\cdot5}{3\cdot2\cdot1} = 35. $$

Without the endpoint restriction, the four success positions could be any four of the nine tests:

$$ \text{Unrestricted count} = \binom{9}{4} = \frac{9!}{4!5!} = \frac{9\cdot8\cdot7\cdot6}{4\cdot3\cdot2\cdot1} = 126. $$

The restricted count, 35, is less than the unrestricted count, 126, as it should be. Each of the 35 choices assigns success to four interior tests and failure to the other five tests, including both endpoints; the conditions are all satisfied.

Common mistake avoided: calculating \(\binom{9}{4}\) and treating it as the restricted answer ignores the two required failures. The unrestricted count is useful as a check, but the actual choices come only from the seven interior positions.

Boundary Cases and a Common Counting Trap

The boundary cases follow directly from the position-selection interpretation. There is exactly one pattern with no successes: every position is a failure. There is also exactly one pattern with \(n\) successes: every position is a success. These facts agree with the formula:

$$ \binom{n}{0}=1 \qquad\text{and}\qquad \binom{n}{n}=1. $$

A frequent error is to use the number of ordered selections, \(n(n-1)\cdots(n-k+1)\), as the number of patterns. This overcounts because the same set of success positions appears in every possible ordering. For instance, choosing positions 2 and 5 for success can be described as “2 then 5” or “5 then 2,” but both descriptions produce the same pattern.

Wrong calculation: for five trials with exactly two successes, one might compute \(5\cdot4=20\), treating the first and second chosen success positions as ordered. That counts each pair twice. Correction: divide by \(2!\), the number of orders of the two selected positions:

$$ \binom{5}{2} = \frac{5\cdot4}{2!} = \frac{20}{2} = 10. $$

A quick check is to list the possible pairs: \(\{1,2\}\), \(\{1,3\}\), \(\{1,4\}\), \(\{1,5\}\), \(\{2,3\}\), \(\{2,4\}\), \(\{2,5\}\), \(\{3,4\}\), \(\{3,5\}\), and \(\{4,5\}\). There are ten distinct pairs, not twenty.

Key takeaway: A pattern with exactly \(k\) successes is completely determined by the \(k\) trial positions containing success. Count those unordered selections with \(\binom{n}{k}\); when outcomes are prescribed, first remove fixed positions and adjust the number of successes still needed.

Check Your Understanding

For each problem, count patterns of success and failure only; do not calculate probabilities.

  1. A seven-trial sequence must contain exactly two successes, with no positions otherwise restricted. How many patterns are possible? (Answer: 21)
  2. A ten-trial sequence must contain exactly four successes. Positions 3 and 9 are required successes, and position 10 is a required failure. How many patterns satisfy the conditions? (Answer: 21)
  3. A six-trial sequence must contain exactly three successes, and the first and last outcomes must be different. Count patterns satisfying both conditions. (Answer: 12)
  4. A nine-trial sequence must contain exactly five successes. Positions 1 and 9 must be successes, while position 4 must be a failure. How many patterns are possible? (Answer: 20)
  5. A twelve-trial sequence is allowed to have either exactly one success or exactly two successes. How many patterns are included in these two cases combined? (Answer: 78)
Clinical Biostats