Last modified — 29 Sep 2025
In some cases, the sample space contains finite number of possible outcomes, and they are equally likely (they should receive equal probabilities).
When there are finitely many outcomes, and they are equal likely, calculating probabilities involves counting outcomes in events/sets, which can be challenging
This chapter goes over some generic counting techniques, which can be used to calculate probabilities.
Let \(A\) be a subset (event) of a sample space \(\Omega\).
\[ \mathbb{P}\left( A\right) = \frac{\text{number of elements in }A}{\text{number of elements in }\Omega } \]
Suppose that a random experiment has 2 steps, where
Then, \[\mbox{total number of possible outcomes} \ = \ n_1 \times n_2\]
We are implicitly assuming that the outcome of the second step does not depend on the outcome of the first step.
If a random experiment has k steps.
\(\quad\quad\quad\vdots\quad\quad\quad\)
Then, \[\mbox{total number of outcomes} \ = \ n_1 \times n_2 \times n_3 \times \cdots \times n_k\]
Note
Implicit assumption: the outcomes of each step do not depend on each other.
26 choices for the 1st, 2nd and 3rd entry, and
10 choices for each of the last 4 entries.
\[ \begin{aligned} \# \mbox{of plates} \ &= \ 26 \times 26\times 26\times 10\times 10\times 10\times 10 \\ & = \ 26^3 \times 10^4\\ & = 175,760,000 \end{aligned} \]
Note
Any letter can follow any other letter, any digit can appear with any other digit in a different slot. The outcomes of each slot do not affect each other.
\[\begin{aligned} \# \mbox{of plates w/o rep } &= 26 \times 25 \times 24 \times 10 \times 9 \times 8 \times 7 \\ & = 78,624,000 \end{aligned} \]
Note
What answer would you get if you started counting “backwards”, options for the 7th place, then the 6th, etc?
We are randomly selecting a license plate from all possible ones, without any explicitly stated preference, so we will assume that each outcome (license plate) is equally likely.
The sample space \((\Omega)\) is all possible plates.
The event of interest (\(A\)) consists of those plates without repetitions.
The probability that a randomly chosen plate has no repetitions is given by \[\begin{align*} \mathbb{P}(A) &= \frac{\# A}{\# \Omega} \\ & \\ &= \frac{ 26 \times 25 \times 24 \times 10 \times 9 \times 8 \times 7}{ 26^3 \times 10^4} \\ & \\ &= 0.44734 \approx 0.45 \end{align*}\]
\[\left( 3, 5, 2, 4, 1 \right), \, \left( 2, 1, 3, 4, 5 \right), \, \left( 5, 4, 2, 1, 3 \right), \quad \mbox{ etc.} \]
\[\left( 2, 1, 3, 4, 5 \right) \quad \neq \quad \left( 1, 2, 3, 4, 5 \right) \quad \neq \quad \left( 1, 3, 2, 4, 5 \right)\]
How many permutations of the set \(\left\{ 1, 2, \ldots, n \right\}\) are there?
There are
\(\quad\quad\quad\vdots\quad\quad\quad\)
Thus, there are \[n \times (n-1) \times (n-2) \times \cdots \times 2 \times 1 \, = \, n! \] possible permutations of the set \(\left\{ 1, 2, \ldots, n \right\}\)
Key assumption in counting permutations this way:
all \(n\) objects are distinct.
When some of them are not distinct, the number of possible distinct outcomes by re-arrangement (“permutation”) is not given by this formula.
We need a different formula.
In how many different ways can the letters of “pepper” be arranged? Answer:
A chess tournament with 10 players:
# of players | Country of origin |
---|---|
4 | Russia |
3 | USA |
2 | Canada |
1 | Brazil |
If we see only nationalities in the final rank, how many outcomes are possible?
Count favourable outcomes: a Canadian player is ranked first.
But if we see only nationalities, these outcomes are not distinct!
Each country pattern appears \(4! \times 3! \times 2!\) times.
The number of country rankings where Canada appears 1st is \[\frac{725760}{4! \times 3! \times 2!}= 2520.\]
Therefore, \[\begin{aligned} \mathbb{P}\left( \left\{ \text{Canada wins}\right\} \right) &=\frac{\#\text{of favorable outcomes}}{\#\text{of possible outcomes}} \\ &=\frac{2520}{12600}\\ &=0.20. \end{aligned} \]
In general, keep only 3 significant digits in your answers, unless there is an obvious simpler expression (e.g. “1/7”).
Consider the set \[S=\left\{ a, b, c, d, e\right\}\]
The following are all the possible subsets of \(S\) of size 3:
\(\{ a, b, c\}\) | \(\left\{ a, d, e\right\}\) |
\(\{ a, b, d\}\) | \(\left\{ b, c, d\right\}\) |
\(\{ a, b, e\}\) | \(\left\{ b, c, e\right\}\) |
\(\{ a, c, d\}\) | \(\left\{ b, d, e\right\}\) |
\(\{ a, c, e\}\) | \(\left\{ c, d, e\right\}\) |
\[\Bigl\{ a, b, d \Bigr\} \, = \, \Bigl\{ d, a, b \Bigr\} \, = \, \Bigl\{ b, d, a \Bigr\} \] (and other possible rearrangements).
The number of combinations of size \(m\) out of a set of size \(n \ge m\) has various notations:
\[\binom{n}{m} = \left._{n} C_{m}\right. = C_m^n\]
Tip
In this course we use \(\binom{n}{m}\).
For example, when \(n=5\) and \(m=3\) we have
\(\{ 1,2,3\}\) | \(\left\{ 1,4,5\right\}\) |
\(\{ 1,2,4\}\) | \(\left\{ 2,3,4\right\}\) |
\(\{ 1,2,5\}\) | \(\left\{ 2,3,5\right\}\) |
\(\{ 1,3,4\}\) | \(\left\{ 2,4,5\right\}\) |
\(\{ 1,3,5\}\) | \(\left\{ 3,4,5\right\}\) |
hence, the number of combinations must be
\[\binom{5}{3}= {10}\]
\[\binom{n}{m} = \frac{n!}{m!(n-m)!}\]
These are also called binomial coefficients.
They have many beautiful interpretations.
Note that combinations can be constructed using permutations as follows:
Given a set of \(n\) distinct items
\[S = \Bigl\{ s_1, s_2, \ldots, s_n \Bigr\}\]
we can form
\[n \times (n-1) \times (n-2) \times \cdots \times (n-m+1)\]
different \(m\)-tuples by choosing from elements of \(S\)
Another way to construct combinations using permutations uses the intuition:
\[\overset{\text{permutation}} {\overbrace{ ( i_{1},\ldots, i_{m},i_{m+1}, \ldots, i_{n} ) }} \to \overset{m}{\overbrace{i_{1},\ldots,i_{m}}} \text{ } \overset{n-m}{\overbrace{i_{m+1}, \ldots, i_{n}}} \to \overset{\text{combination}}{\overbrace{ \{ i_{1},\ldots, i_{m} \} }}.\]
Concrete example — \(m=3\) and \(n=5\).
\[\begin{aligned} \overset{\text{permutation}} {\overbrace{ (5,1,4,2,3 ) }} &\longrightarrow \overbrace{5,1,4} \overbrace{2,3} &\longrightarrow \overset{\text{combination}} {\overbrace {\{ 1,4,5 \}}} \\ \overset{\text{permutation}} {\overbrace{ ( 5,1,4,3,2 ) }} &\longrightarrow \overbrace{5,1,4} \overbrace{3,2} &\longrightarrow \overset{\text{combination}}{\overbrace{\{ 1,4,5 \} }} \\ \overset{\text{permutation}} {\overbrace{ ( 1,5,4,3,2 ) }} &\longrightarrow \overbrace{1,5,4} \overbrace{3,2} &\longrightarrow \overset{\text{combination}}{\overbrace{\{ 1,4,5 \} }} \end{aligned}\]
Permutations sharing the same first 3 and last 2 elements give the same combination.
Each permutation generates a combination
But many permutations generate the same combination
The number of permutation needs to be corrected to remove repetitions
Two permutations lead to the same combination if and only if their first \(m\) elements are identical, and they need not to be in the same order.
We define \[0!=1\]
So, for example \[ \begin{aligned} \binom{5}{5} &=\frac{5!}{5!\left( 5-5\right) !}=\frac{5!}{5!\text{ }0!}=1 &\text{(as you would guess)}\\ \binom{5}{0} &=\frac{5!}{0!\text{ }5!\text{ }}=1 &\text{(convention, but sensible)}. \end{aligned} \]
Dealer secretly chooses 6 distinct integers between 0 and 49.
Player randomly selects 6 distinct integers between 0 and 49.
The more matches, the bigger the prize.
What is the probability that the player matches \(k\) numbers from the dealer’s selection? (for different values of \(k \in \{0, 1, ..., 6 \}\))
\(k\) | \(P\left( k \mbox{ matches } \right)\) |
---|---|
0 | 0.444 |
1 | 0.410 |
2 | 0.128 |
3 | 0.017 |
4 | 0.001 |
5 | 1.66\(\times\) 10\(^{-5}\) |
6 | 6.29\(\times\) 10\(^{-8}\) |
We exclusively considered experiments with a finite number of possible outcomes, where every outcome is equally likely.
We count the number of outcomes in an event of interest (“favourable outcomes”), and the number of outcomes in the sample space (all possible outcomes).
The ratio of those two counts is the probability of the event.
Stat 302 - Winter 2025/26