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.
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,
Combinations with repetition
Use this when selections can repeat and order doesn’t matter.
For selections from types:
Example: Ways to choose 3 scoops of ice cream from 5 flavors (allowing repeats):
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?
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:
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,
So, the probability of a defective item is 0.014 or 1.4%.
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 )
Example:
Suppose:
Then:
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 (continued from previous):
What is the probability that a defective item came from Machine 2?
We already know:
Now apply Bayes’ Theorem:
So, about 57.14% of defective items come from Machine 2.