Combinatorics and probability
This chapter covers the following:
- Permutations
- Combinations
- Key differences
- Special cases
- Probability
- Law of total probability
- Law of compound or joint probability
- Bayes’ theorem
In mathematics, permutations and combinations are counting methods. You use them to figure out how many ways you can arrange or select items. These formulas also appear in the FE Reference Handbook’s Mathematics section, under “Permutations and Combinations,” so you can look them up rather than memorize them.
Permutations
Permutations count the number of ways to arrange objects when order matters.
Formula for permutations (without repetition)
Use this when you’re arranging items chosen from distinct items, with no repeats:
Where:
- (“ factorial”) means
- is the number of items you arrange
Example
How many ways can you arrange 3 letters from the word “MATH”?
- Number of distinct letters: (M, A, T, H)
- Number of letters to arrange:
So, there are 24 ways to arrange 3 letters out of 4.
Combinations
Combinations count the number of ways to select objects when order doesn’t matter.
Formula for combinations
Use this when you’re choosing items from distinct items and the order of the chosen items is irrelevant:
Example
How many ways can you choose 3 students from a group of 5?
So, there are 10 ways to choose 3 students from 5.
Key differences
| Aspect | Permutations | Combinations |
|---|---|---|
| Order matters? | Yes | No |
| Formula | ||
| Example | Arranging medals | Choosing committee members |
Special cases
Permutations with repetition
Use this when each of the positions can be filled by any of the items (so repeats are allowed):
Example: 4-digit PIN code using digits 0-9:
- possible digits
- positions
Permutations with identical items
If some objects are indistinguishable, swapping those identical objects doesn’t create a new arrangement. That reduces the number of distinct permutations.
The number of different permutations of objects, where:
- are of type 1
- are of type 2
- …
- are of type
- and
Then the number of distinct permutations is:
Example
How many distinct ways can you arrange the letters in the word BALLOON?
Letters: B, A, L, L, O, O, N
- L appears 2 times
- O appears 2 times
So,
Probability
Definition: Probability measures how likely an event is to occur.
Let be the sample space (all possible outcomes) and an event (a set of outcomes). The probability of event , written , is:
Example: If a fair die is rolled, what is the probability of getting a 4?
A combination can also serve as the favorable-outcome count in a probability problem:
Example: exactly 3 heads in 4 flips
If you flip a fair coin 4 times, what’s the probability of getting exactly 3 heads?
- Total outcomes:
- Favorable outcomes: choose which 3 of the 4 flips are heads,
Answer: , or 25%.
Addition rule (union of events)
Use this for the probability that at least one of two events happens:
Subtracting avoids double-counting outcomes shared by both events. When and are mutually exclusive (no shared outcomes), and this reduces to:
Example: heart or face card
A standard deck has 52 cards. What’s the probability of drawing a card that is a heart or a face card (jack, queen, king)?
- (the jack, queen, and king of hearts)
Answer: approximately , or about 42.3%.
Law of total probability
If events are mutually exclusive and exhaustive (meaning they partition the sample space), then any event can be found by adding up the ways can happen through each case :
Example: total probability of a defective item
Suppose a factory has two machines:
- Machine 1 produces 60% of the items and has a defect rate of 1%.
- Machine 2 produces 40% of the items and has a defect rate of 2%.
What is the probability that a randomly selected item is defective?
Let:
- : item from Machine 1,
- : item from Machine 2,
- : item is defective
Then,
Answer: the probability of a defective item is , or .
Law of compound or joint probability
The joint probability of two events and occurring together is:
This formula connects:
- a conditional probability (like )
- the probability of the condition (like )
- the probability of both events happening (like )
For example, if and , then . You’ll see this same multiplication at work in the Bayes’ theorem example below, where it builds the numerator of the reversed conditional probability.
Bayes’ theorem
Bayes’ theorem lets you reverse a conditional probability. In other words, it helps you find when you know .
Given events and with :
Using the law of total probability in the denominator:
Example: which machine produced the defective item?
This continues the factory example above. What is the probability that a defective item came from Machine 2?
We already know:
Now apply Bayes’ theorem:
Answer: about of defective items come from Machine 2.