Counting Techniques
发布时间:2026-09-12 | 浏览:1
You should be comfortable with:
Discounts, tax, tips, profit margins
Before you can find a probability, you need to know the total number of outcomes . Counting techniques give you systematic methods for doing exactly that — whether you are figuring out how many passwords are possible, how many ways a committee can be formed, or how many poker hands exist. These techniques are the foundation of probability and appear throughout statistics, combinatorics, and everyday decision-making.
This page covers three core tools: the fundamental counting principle , permutations (order matters), and combinations (order does not matter). By the end you will be able to look at any counting problem and choose the right approach.
The Fundamental Counting Principle
The fundamental counting principle (sometimes called the multiplication principle ) is the simplest and most widely used counting rule:
If task 1 can be done in m m m ways and task 2 can be done in n n n ways, then both tasks together can be done in m × n m \times n m × n ways.
This extends to any number of tasks. If you have k k k tasks with n 1 , n 2 , … , n k n_1, n_2, \ldots, n_k n 1 , n 2 , … , n k options respectively, the total number of combined outcomes is:
n 1 × n 2 × ⋯ × n k n_1 \times n_2 \times \cdots \times n_k n 1 × n 2 × ⋯ × n k
Example 1: Outfit Choices
You have 4 shirts, 3 pairs of pants, and 2 pairs of shoes. How many different outfits can you make?
Each choice is independent, so apply the counting principle:
4 × 3 × 2 = 24 outfits 4 \times 3 \times 2 = 24 \text{ outfits} 4 × 3 × 2 = 24 outfits
Example 2: License Plates
A license plate format uses 3 letters followed by 4 digits. How many plates are possible?
Each letter position has 26 choices (A–Z)
Each digit position has 10 choices (0–9)
26 × 26 × 26 × 10 × 10 × 10 × 10 = 26 3 × 10 4 26 \times 26 \times 26 \times 10 \times 10 \times 10 \times 10 = 26^3 \times 10^4 26 × 26 × 26 × 10 × 10 × 10 × 10 = 2 6 3 × 1 0 4
= 17,576 × 10,000 = 175,760,000 = 17{,}576 \times 10{,}000 = 175{,}760{,}000 = 17 , 576 × 10 , 000 = 175 , 760 , 000
That is over 175 million possible license plates from just 7 characters.
Factorial Notation
Many counting formulas use factorials . The factorial of a positive integer n n n is the product of all positive integers from n n n down to 1:
n ! = n × ( n − 1 ) × ( n − 2 ) × ⋯ × 2 × 1 n! = n \times (n-1) \times (n-2) \times \cdots \times 2 \times 1 n ! = n × ( n − 1 ) × ( n − 2 ) × ⋯ × 2 × 1
By definition, 0 ! = 1 0! = 1 0 ! = 1 . This is not arbitrary — it is necessary for the permutation and combination formulas to work correctly when r = 0 r = 0 r = 0 or r = n r = n r = n .
Here are common factorial values you will encounter:
Notice how quickly factorials grow. By 10 ! 10! 10 ! you are already in the millions, and 20 ! 20! 20 ! exceeds 2.4 quintillion.
Permutations (Order Matters)
A permutation is an arrangement of items where the order matters. Choosing a president, vice president, and treasurer from a group is a permutation problem because the same three people in different roles count as different outcomes.
The number of permutations of r r r items chosen from n n n items is:
P ( n , r ) = n ! ( n − r ) ! P(n,r) = \frac{n!}{(n-r)!} P ( n , r ) = ( n − r )! n !
When to use permutations: any time selecting AND arranging r r r items from n n n , and rearranging the same items creates a different outcome.
Example 3: Top 3 Finishers
A race has 10 runners. How many ways can 1st, 2nd, and 3rd place be awarded?
Here n = 10 n = 10 n = 10 and r = 3 r = 3 r = 3 . Order matters because finishing 1st is different from finishing 3rd.
P ( 10 , 3 ) = 10 ! ( 10 − 3 ) ! = 10 ! 7 ! P(10,3) = \frac{10!}{(10-3)!} = \frac{10!}{7!} P ( 10 , 3 ) = ( 10 − 3 )! 10 ! = 7 ! 10 !
The 7 ! 7! 7 ! in the denominator cancels most of the 10 ! 10! 10 ! in the numerator:
= 10 × 9 × 8 = 720 = 10 \times 9 \times 8 = 720 = 10 × 9 × 8 = 720
There are 720 different ways to award the top three positions.
Combinations (Order Doesn’t Matter)
A combination is a selection of items where the order does not matter. Choosing 3 people for a committee is a combination problem because the group (Alice, Bob, Carol) is the same committee regardless of the order you list them.
The number of combinations of r r r items chosen from n n n items is:
C ( n , r ) = ( n r ) = n ! r ! ( n − r ) ! C(n,r) = \binom{n}{r} = \frac{n!}{r!(n-r)!} C ( n , r ) = ( r n ) = r ! ( n − r )! n !
The notation ( n r ) \binom{n}{r} ( r n ) is read ” n n n choose r r r .” Notice this is the permutation formula divided by r ! r! r ! , which removes the duplicate arrangements of the same group.
When to use combinations: any time selecting r r r items from n n n WITHOUT regard to order.
Example 4: Committee Selection
Choose 3 members from a group of 8. How many different committees are possible?
Here n = 8 n = 8 n = 8 and r = 3 r = 3 r = 3 . Order does not matter — the committee (Alice, Bob, Carol) is the same as (Carol, Alice, Bob).
C ( 8 , 3 ) = 8 ! 3 ! ⋅ 5 ! = 8 × 7 × 6 3 × 2 × 1 = 336 6 = 56 C(8,3) = \frac{8!}{3! \cdot 5!} = \frac{8 \times 7 \times 6}{3 \times 2 \times 1} = \frac{336}{6} = 56 C ( 8 , 3 ) = 3 ! ⋅ 5 ! 8 ! = 3 × 2 × 1 8 × 7 × 6 = 6 336 = 56
There are 56 possible committees.
Permutations vs Combinations — How to Tell
The key question is: does rearranging the same items create a different outcome?
If yes → permutation (order matters)
If no → combination (order does not matter)
Notice that the committee question with the same numbers ( n = 10 n=10 n = 10 , r = 3 r=3 r = 3 ) gives a smaller answer (120) than the officer question (720). Combinations always produce smaller counts than permutations because multiple arrangements collapse into a single group.
Verification: C ( 10 , 3 ) = 10 ! 3 ! ⋅ 7 ! = 10 × 9 × 8 6 = 720 6 = 120 C(10,3) = \frac{10!}{3! \cdot 7!} = \frac{10 \times 9 \times 8}{6} = \frac{720}{6} = 120 C ( 10 , 3 ) = 3 ! ⋅ 7 ! 10 ! = 6 10 × 9 × 8 = 6 720 = 120 . And indeed P ( 10 , 3 ) = 720 = 120 × 3 ! = 120 × 6 P(10,3) = 720 = 120 \times 3! = 120 \times 6 P ( 10 , 3 ) = 720 = 120 × 3 ! = 120 × 6 . The ratio is always r ! r! r ! .
Using Counting in Probability
Counting techniques connect directly to probability through the classical probability formula:
P ( event ) = number of favorable outcomes total number of outcomes P(\text{event}) = \frac{\text{number of favorable outcomes}}{\text{total number of outcomes}} P ( event ) = total number of outcomes number of favorable outcomes
When the sample space is large, you use permutations or combinations to count both the numerator and denominator.
Example 5: Poker Hand — Two Aces
What is the probability of being dealt exactly 2 aces in a 5-card hand from a standard 52-card deck?
Step 1: Count favorable outcomes.
You need exactly 2 of the 4 aces AND exactly 3 of the 48 non-ace cards.
Ways to choose 2 aces from 4 = C ( 4 , 2 ) = 4 ! 2 ! ⋅ 2 ! = 4 × 3 2 = 6 \text{Ways to choose 2 aces from 4} = C(4,2) = \frac{4!}{2! \cdot 2!} = \frac{4 \times 3}{2} = 6 Ways to choose 2 aces from 4 = C ( 4 , 2 ) = 2 ! ⋅ 2 ! 4 ! = 2 4 × 3 = 6
Ways to choose 3 non-aces from 48 = C ( 48 , 3 ) = 48 ! 3 ! ⋅ 45 ! = 48 × 47 × 46 6 = 103,776 6 = 17,296 \text{Ways to choose 3 non-aces from 48} = C(48,3) = \frac{48!}{3! \cdot 45!} = \frac{48 \times 47 \times 46}{6} = \frac{103{,}776}{6} = 17{,}296 Ways to choose 3 non-aces from 48 = C ( 48 , 3 ) = 3 ! ⋅ 45 ! 48 ! = 6 48 × 47 × 46 = 6 103 , 776 = 17 , 296
Favorable outcomes = 6 × 17,296 = 103,776 \text{Favorable outcomes} = 6 \times 17{,}296 = 103{,}776 Favorable outcomes = 6 × 17 , 296 = 103 , 776
Step 2: Count total outcomes.
C ( 52 , 5 ) = 52 ! 5 ! ⋅ 47 ! = 52 × 51 × 50 × 49 × 48 120 = 311,875,200 120 = 2,598,960 C(52,5) = \frac{52!}{5! \cdot 47!} = \frac{52 \times 51 \times 50 \times 49 \times 48}{120} = \frac{311{,}875{,}200}{120} = 2{,}598{,}960 C ( 52 , 5 ) = 5 ! ⋅ 47 ! 52 ! = 120 52 × 51 × 50 × 49 × 48 = 120 311 , 875 , 200 = 2 , 598 , 960
Step 3: Calculate the probability.
P ( exactly 2 aces ) = 103,776 2,598,960 ≈ 0.0399 P(\text{exactly 2 aces}) = \frac{103{,}776}{2{,}598{,}960} \approx 0.0399 P ( exactly 2 aces ) = 2 , 598 , 960 103 , 776 ≈ 0.0399
Answer: The probability of being dealt exactly 2 aces is approximately 0.04 , or about 4% .
Real-World Application: Retail — Product Display Arrangements
Counting techniques show up regularly in retail operations. A store manager needs to arrange a promotional display with 4 featured products chosen from 15 available products. The display rack has 4 distinct positions (top shelf, eye level, middle, and bottom).
Because the position matters (eye level gets the most attention), this is a permutation problem:
P ( 15 , 4 ) = 15 ! 11 ! = 15 × 14 × 13 × 12 = 32,760 P(15,4) = \frac{15!}{11!} = 15 \times 14 \times 13 \times 12 = 32{,}760 P ( 15 , 4 ) = 11 ! 15 ! = 15 × 14 × 13 × 12 = 32 , 760
There are 32,760 different display arrangements. If the manager only cared about which 4 products to feature (not where each goes), it would be a combination:
C ( 15 , 4 ) = 15 ! 4 ! ⋅ 11 ! = 32,760 24 = 1,365 C(15,4) = \frac{15!}{4! \cdot 11!} = \frac{32{,}760}{24} = 1{,}365 C ( 15 , 4 ) = 4 ! ⋅ 11 ! 15 ! = 24 32 , 760 = 1 , 365
The difference — 32,760 vs 1,365 — shows just how much arrangement multiplies the number of possibilities. Each group of 4 products can be arranged in 4 ! = 24 4! = 24 4 ! = 24 different ways, and 1,365 × 24 = 32,760 1{,}365 \times 24 = 32{,}760 1 , 365 × 24 = 32 , 760 .
Practice Problems
Test your understanding with these problems. Click to reveal each answer.
Apply the fundamental counting principle:
5 × 8 × 3 = 120 5 \times 8 \times 3 = 120 5 × 8 × 3 = 120
Answer: There are 120 different three-course meals.
This is a permutation of all 4 items, which is simply 4 ! 4! 4 ! :
4 ! = 4 × 3 × 2 × 1 = 24 4! = 4 \times 3 \times 2 \times 1 = 24 4 ! = 4 × 3 × 2 × 1 = 24
Answer: There are 24 ways to arrange 4 books on a shelf.
Order does not matter (a committee is a group, not an arrangement), so use combinations:
C ( 12 , 5 ) = 12 ! 5 ! ⋅ 7 ! = 12 × 11 × 10 × 9 × 8 5 × 4 × 3 × 2 × 1 = 95,040 120 = 792 C(12,5) = \frac{12!}{5! \cdot 7!} = \frac{12 \times 11 \times 10 \times 9 \times 8}{5 \times 4 \times 3 \times 2 \times 1} = \frac{95{,}040}{120} = 792 C ( 12 , 5 ) = 5 ! ⋅ 7 ! 12 ! = 5 × 4 × 3 × 2 × 1 12 × 11 × 10 × 9 × 8 = 120 95 , 040 = 792
Answer: There are 792 possible subcommittees.
Order matters because the roles are different. Use permutations:
P ( 9 , 3 ) = 9 ! 6 ! = 9 × 8 × 7 = 504 P(9,3) = \frac{9!}{6!} = 9 \times 8 \times 7 = 504 P ( 9 , 3 ) = 6 ! 9 ! = 9 × 8 × 7 = 504
Answer: There are 504 ways to assign the three officer positions.
Favorable outcomes: Choose 3 red from 6:
C ( 6 , 3 ) = 6 ! 3 ! ⋅ 3 ! = 6 × 5 × 4 6 = 20 C(6,3) = \frac{6!}{3! \cdot 3!} = \frac{6 \times 5 \times 4}{6} = 20 C ( 6 , 3 ) = 3 ! ⋅ 3 ! 6 ! = 6 6 × 5 × 4 = 20
Total outcomes: Choose 3 from all 10 marbles:
C ( 10 , 3 ) = 10 ! 3 ! ⋅ 7 ! = 10 × 9 × 8 6 = 120 C(10,3) = \frac{10!}{3! \cdot 7!} = \frac{10 \times 9 \times 8}{6} = 120 C ( 10 , 3 ) = 3 ! ⋅ 7 ! 10 ! = 6 10 × 9 × 8 = 120
P ( all red ) = 20 120 = 1 6 ≈ 0.167 P(\text{all red}) = \frac{20}{120} = \frac{1}{6} \approx 0.167 P ( all red ) = 120 20 = 6 1 ≈ 0.167
Answer: The probability that all 3 marbles are red is 1 6 \frac{1}{6} 6 1 , or approximately 16.7% .
The fundamental counting principle multiplies the number of options at each stage: m × n m \times n m × n total outcomes for two independent tasks
Factorial notation ( n ! n! n ! ) is the product of all positive integers from n n n down to 1, with 0 ! = 1 0! = 1 0 ! = 1 by definition
Permutations count arrangements where order matters: P ( n , r ) = n ! ( n − r ) ! P(n,r) = \frac{n!}{(n-r)!} P ( n , r ) = ( n − r )! n !
Combinations count selections where order does not matter: C ( n , r ) = n ! r ! ( n − r ) ! C(n,r) = \frac{n!}{r!(n-r)!} C ( n , r ) = r ! ( n − r )! n !
To decide which formula to use, ask: “Does rearranging the same items create a different outcome?”
Counting techniques connect to probability through P = favorable total P = \frac{\text{favorable}}{\text{total}} P = total favorable , where you use permutations or combinations to count both parts
Return to Statistics for more topics in this section.
Next Up in Statistics
Last updated: March 29, 2026