Statistics

Counting Techniques

Last updated: March 2026 · Intermediate
Before you start

You should be comfortable with:

Real-world applications
💰
Retail & Finance

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 mm ways and task 2 can be done in nn ways, then both tasks together can be done in m×nm \times n ways.

This extends to any number of tasks. If you have kk tasks with n1,n2,,nkn_1, n_2, \ldots, n_k options respectively, the total number of combined outcomes is:

n1×n2××nkn_1 \times n_2 \times \cdots \times 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 outfits4 \times 3 \times 2 = 24 \text{ 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=263×10426 \times 26 \times 26 \times 10 \times 10 \times 10 \times 10 = 26^3 \times 10^4

=17,576×10,000=175,760,000= 17{,}576 \times 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 nn is the product of all positive integers from nn down to 1:

n!=n×(n1)×(n2)××2×1n! = n \times (n-1) \times (n-2) \times \cdots \times 2 \times 1

By definition, 0!=10! = 1. This is not arbitrary — it is necessary for the permutation and combination formulas to work correctly when r=0r = 0 or r=nr = n.

Here are common factorial values you will encounter:

nnn!n!
01
11
22
36
424
5120
6720
75,040
840,320
103,628,800

Notice how quickly factorials grow. By 10!10! you are already in the millions, and 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 rr items chosen from nn items is:

P(n,r)=n!(nr)!P(n,r) = \frac{n!}{(n-r)!}

When to use permutations: any time selecting AND arranging rr items from nn, 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=10n = 10 and r=3r = 3. Order matters because finishing 1st is different from finishing 3rd.

P(10,3)=10!(103)!=10!7!P(10,3) = \frac{10!}{(10-3)!} = \frac{10!}{7!}

The 7!7! in the denominator cancels most of the 10!10! in the numerator:

=10×9×8=720= 10 \times 9 \times 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 rr items chosen from nn items is:

C(n,r)=(nr)=n!r!(nr)!C(n,r) = \binom{n}{r} = \frac{n!}{r!(n-r)!}

The notation (nr)\binom{n}{r} is read ”nn choose rr.” Notice this is the permutation formula divided by r!r!, which removes the duplicate arrangements of the same group.

When to use combinations: any time selecting rr items from nn WITHOUT regard to order.

Example 4: Committee Selection

Choose 3 members from a group of 8. How many different committees are possible?

Here n=8n = 8 and r=3r = 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×63×2×1=3366=56C(8,3) = \frac{8!}{3! \cdot 5!} = \frac{8 \times 7 \times 6}{3 \times 2 \times 1} = \frac{336}{6} = 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)
ScenarioOrder Matters?FormulaAnswer
Picking a president, VP, and treasurer from 10 peopleYesP(10,3)P(10,3)720
Picking a 3-person committee from 10 peopleNoC(10,3)C(10,3)120
Arranging 5 books on a shelf from 12 booksYesP(12,5)P(12,5)95,040
Selecting 5 books to donate from 12 booksNoC(12,5)C(12,5)792
Creating a 4-digit PIN (digits 0–9)Yes10410^410,000

Notice that the committee question with the same numbers (n=10n=10, r=3r=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×86=7206=120C(10,3) = \frac{10!}{3! \cdot 7!} = \frac{10 \times 9 \times 8}{6} = \frac{720}{6} = 120. And indeed P(10,3)=720=120×3!=120×6P(10,3) = 720 = 120 \times 3! = 120 \times 6. The ratio is always r!r!.

Using Counting in Probability

Counting techniques connect directly to probability through the classical probability formula:

P(event)=number of favorable outcomestotal number of outcomesP(\text{event}) = \frac{\text{number of favorable outcomes}}{\text{total number of 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×32=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 3 non-aces from 48=C(48,3)=48!3!45!=48×47×466=103,7766=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

Favorable outcomes=6×17,296=103,776\text{Favorable outcomes} = 6 \times 17{,}296 = 103{,}776

Step 2: Count total outcomes.

C(52,5)=52!5!47!=52×51×50×49×48120=311,875,200120=2,598,960C(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

Step 3: Calculate the probability.

P(exactly 2 aces)=103,7762,598,9600.0399P(\text{exactly 2 aces}) = \frac{103{,}776}{2{,}598{,}960} \approx 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,760P(15,4) = \frac{15!}{11!} = 15 \times 14 \times 13 \times 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,76024=1,365C(15,4) = \frac{15!}{4! \cdot 11!} = \frac{32{,}760}{24} = 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!=244! = 24 different ways, and 1,365×24=32,7601{,}365 \times 24 = 32{,}760.

Practice Problems

Test your understanding with these problems. Click to reveal each answer.

Problem 1: A restaurant offers 5 appetizers, 8 entrees, and 3 desserts. How many different three-course meals (one of each) are possible?

Apply the fundamental counting principle:

5×8×3=1205 \times 8 \times 3 = 120

Answer: There are 120 different three-course meals.

Problem 2: How many ways can you arrange 4 different books on a shelf?

This is a permutation of all 4 items, which is simply 4!4!:

4!=4×3×2×1=244! = 4 \times 3 \times 2 \times 1 = 24

Answer: There are 24 ways to arrange 4 books on a shelf.

Problem 3: A club has 12 members. How many ways can they choose a 5-person subcommittee?

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×85×4×3×2×1=95,040120=792C(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

Answer: There are 792 possible subcommittees.

Problem 4: From a group of 9 students, how many ways can a class president, vice president, and secretary be chosen?

Order matters because the roles are different. Use permutations:

P(9,3)=9!6!=9×8×7=504P(9,3) = \frac{9!}{6!} = 9 \times 8 \times 7 = 504

Answer: There are 504 ways to assign the three officer positions.

Problem 5: A bag contains 6 red marbles and 4 blue marbles. If you draw 3 marbles at random, what is the probability that all 3 are red?

Favorable outcomes: Choose 3 red from 6:

C(6,3)=6!3!3!=6×5×46=20C(6,3) = \frac{6!}{3! \cdot 3!} = \frac{6 \times 5 \times 4}{6} = 20

Total outcomes: Choose 3 from all 10 marbles:

C(10,3)=10!3!7!=10×9×86=120C(10,3) = \frac{10!}{3! \cdot 7!} = \frac{10 \times 9 \times 8}{6} = 120

Probability:

P(all red)=20120=160.167P(\text{all red}) = \frac{20}{120} = \frac{1}{6} \approx 0.167

Answer: The probability that all 3 marbles are red is 16\frac{1}{6}, or approximately 16.7%.

Key Takeaways

  • The fundamental counting principle multiplies the number of options at each stage: m×nm \times n total outcomes for two independent tasks
  • Factorial notation (n!n!) is the product of all positive integers from nn down to 1, with 0!=10! = 1 by definition
  • Permutations count arrangements where order matters: P(n,r)=n!(nr)!P(n,r) = \frac{n!}{(n-r)!}
  • Combinations count selections where order does not matter: C(n,r)=n!r!(nr)!C(n,r) = \frac{n!}{r!(n-r)!}
  • To decide which formula to use, ask: “Does rearranging the same items create a different outcome?”
  • Counting techniques connect to probability through P=favorabletotalP = \frac{\text{favorable}}{\text{total}}, where you use permutations or combinations to count both parts

Return to Statistics for more topics in this section.

Last updated: March 29, 2026