(This is a section in the notes here.)
Counting in Probability. If each outcome is equally likely, i.e. for all
, then since
(where
is the number of outcomes in the set
) it must be that
Further, since then
So from the last two display equations above, we see that, when outcomes are equally likely, then to calculate probabilities we need to be able to count the number of outcomes in different sets.
Some Counting Rules. 1,2,3,4,… aside, we cover the following counting methods
- Multiplication
- Factorials
- Permutations
- Combinations
Card Game. We consider the probability of winning a card game in the following setting:
A card dealer has
cards
.
You are dealtcards.
You win if you get.
The probability of winning depends on what we mean by “the cards being dealt” and what is means by to “get A,K,Q”.
Multiplication.
Rules of the the card game. Suppose we play the card game in the following way
The dealer shuffles the deck. Shows a random card. Replaces it in the deck. And then repeats.
You win if you getthen
and then
, in that order.
The probability of winning. We can calculate the probability of winning as follows. The set of outcomes can be written as I.e. it is the set of triplets
where the first, second and third card are in
. If holds that
Since there is only one winning hand among these
equally likely possibilities, we have
Note holds because.. Notice once we fix the first two cards
there are
different values for the third card. So the number of triplets
is five times the number of pairs
. By the same logic, once we fix the first card
there are five values that
can take. So the number of pairs
is 5 times the number of values
can take. Finally
can take
values. So we see the number of triples is
. See Figure 1.

Figure 1. This card game has 5 possibilities at each stage.
In General. For sets ,….,
, we define the product set by
Following the argument as above we can see that
For our card game, we had and
. Later this principle will generalize into something that we call independence.
Factorials
Rules of the the card game. Suppose we play the card game in the following way
The dealer shuffles the deck. Shows a random card. Replaces it in the deck. And then repeats.
You win if you getthen
and then
, in any order.
So now is a now a winning hand as well as
.
The probability of winning. Since the way that the dealer deals has not changed we know the probability of any hand, that is,
So if we want to calculate the probability of winning we need to calculate the number of events with a winning hand. It is not hard to check that
That is there are winning hands. So the probability of winning is
Six winning hands holds because.. Notice there are possibilities for the first card, where we are still on for a win, namely,
,
,
. We can suppose without any lost generality that the first card was
, then for the 2nd card there are
possibilities that can be dealt where we can still win namely
and
. Again we can suppose that the card was
, then for the 3rd card there is
possibility where we win, namely,
. So there if we look across the three stages of this card game there are
possibilities for the 1st card then for each of these there are
possibilities for the 2nd card and then
for the final card, which gives
winning hands. See Figure 2
Figure 2. There are initially potentially winning first cards, and the one less at each stage.
In general. Given a set with
, which we can think of as a deck of cards. We are interested in counting the different of ways of dealing out the deck:
In general, following the argument as above it holds that
Definition [Factorial] Given a positive integer ,
factorial is defined to be
(By convention we define
)
So counts the number of ways we can order a set of
elements.
Permutations
Rules of the the card game. Suppose we play the card game in the following way
The dealer shuffles the deck. Takes out a random card, but does to put it back in the deck . And then repeats.
You win if you getthen
and then
, in that order.
The probability of winning. In this case, there is only one winning hand . However, the set of hands has now changed as we can not longer repeat any card. This is similar to factorials, however, as you may recall, for a factorial we deal out all the cards, whereas here we only deal three out of the five cards. So here the sample space is
As we will argue shortly Thus
It holds that because.. Similar our discussion on factorials, there are
possibilities for the first card dealt. Suppose for instance the first card is
, although the same argument would hold equally for any other card. Now once the first card is dealt there are
remaining possibilities for the second card, namely,
. Suppose for instance the second card is a
. Then there are
possibilities for the third, namely,
. In total this leads to
possible ways of dealing
cards from a pack of
cards. See Figure 3

Figure 3. There are initially potentially winning first cards, and the one less at each stage of the
stages.
In general. Given a set with
, which we can think of as a deck of cards. We are interested in counting the different of ways of dealing out
cards without replacement:
In general, following the argument as above it holds that
Definition [Permutation] Given non-negative integers and
with
the permutation is defined to be
or more compactly using factorials:
So counts the number of ways we can order
elements from a set of
.
Combinations.
Rules of the the card game. Suppose we play the card game in the following way
The dealer shuffles the deck. Takes out a random card, but does not put it back in the deck . And then repeats.
You win if you getthen
and then
, in any order.
The probability of winning. There are two ways to think about the above game. We focus first on the way that is most similar to out previous argument on permutations.
As before the ways of dealing the cards is exactly the same as our discussion on permutations.
Thus
for the same reason as previously. Further since the order of the cards
does not matter. For the same reason as our discussion on factorials there are
winning hands. Thus
A further way of thinking: removing the order… Rather than thinking of removing cards one at a time, we could think of taking out three cards at the same time from the deck of five cards, without paying attention to the order that they came out. Here we are interest in the set of three cards removed, e.g. , rather than the order that the cards where taken out, e.g.
. Here we could then think of a slightly different sample space:
We can think of this as dividing the deck of cards into two decks: the cards dealt out, and the cards still in the deck, E.g.
Here “” indicates the card is dealt and “
” indicates that the card stays in the pack.
In addition to the above argument that gave in above. A way to think about counting the number of outcomes in . Is to imagine we deal out the whole deck. The first three cards are given to the players and the last two cards remain with the dealer. The number of ways of dealing out the deck we know is
from our discussion on factorials. This over-counts as we don’t care what the order is for the first
cards dealt or for the last
cards that remain in the deck. For example suppose we are dealt
, there are
ways of dealing out
as the first three cards, and, for each way the
is dealt, for the cards
still in the deck, there are
ways of ordering these cards. In other words
over counts by a factor of
. From this we can see that
There is only one outcome in where we win so
In General. Given a set with
, which we can think of as a deck of cards. We are interested in the number of ways of dealing
cards:
In general the argument above gives that
Definition [Combination] Given a non-negative integers and
with
, the combination of
choose
is defined to be
So counts the number of ways we can chose
elements from a set of
.
Multinomials. In combinations the cards were dealt to one person (and the dealer) what if we wanted to consider dealing more hands. It is not hard to check that if there are cards and
are the number of cards dealt to each player. (here we think of
as the number of cards that the dealer has left.) Note
. Then the natural extension of the combination, which gives the number of ways of dealing cards, as above is a multinomial which is given by
Additional Remarks.
Here are a few additional remarks.
(These remarks are not examinable. So you may choose to skip, but it might yet be helpful).
A bit more interpretation for combinations. Notice earlier we thought of a combination as dividing up the deck of five cards:
Here “
” indicates the card is dealt and “
” indicates that the card stays in the pack. So we could think of
as counting the number of strings of
digits with exactly
ones. E.g. For
because there are 10 such strings:
(For this reason you can see that
.)
Polynomials, Pascals Triangle. Consider the expansion of . Notice that
Why? Well for instance if we look at the term in
then to get one
term we need to include three
terms and two
terms from the expansion of
. For instance here is one example:
This is the same as
from earlier so the number of such terms is
. This why the coefficients are combinations.
The Binomial Theorem. Notice from the above result we can see that
Hint: . This is called the Binomial Theorem.
Pascal’s Triangle. If we repeatedly apply the above formula we get a nice shape for listing out combinations: This is called Pascal’s Triangle.
Stirlings Formula. When is large,
can be a really big number. (A good reason to have the exclamation mark.) We can quantify how much with the following formula
Here the
means that the ratio between the two numbers approaches
as
gets large.
Examples
Example. What is the probability of winning the jackpot in the national lottery (lotto)?
(Recall the national lottery random balls from a set of
balls. You win if you get all
correct, regardless of order.)
Answer. The number of draws in and only one wins so
.
Example. What is the probability of winning the jackpot in Euromillions?
(Recall that Euromillions has main numbers between
and
and
“lucky stars” between
and
.
Answer. The total number of combinations for the main numbers is and for the lucky stars
. So in total
. So the probability is
.
Example. How many distinct words can be made out of .
Answer. . (Like above think of the positions
of letters as cards and a card being dealt being the same as being assigned an
in that position.)
Example. How many distinct words can be made out of .
Answer. . (Same principle as previous question but now is a multinomial.)
Example [Birthday Paradox] In a football game there are 23 players (including the referee). What is the probability that two or more players have the same birthday.1
Answer. Note that
So we need to count the number of ways the birthdays can be organized and the number of ways that all birthdays can be different. Notice that the sample space has size (I.e. Notice that the number of birthday for the 1st player is 365, and for the 2nd player it is 365 and so forth), whereas the number of ways the players can have different birthdays is a permutation:
(I.e. Notice that the number of birthday for the 1st player is 365, and for the 2nd player it is 364 – because player ’s birthday is taken– and so forth).
Thus
and
The result may be quite surprising as you would think it unlikely to share a birthday with any individual. However, there are many pairs of birthdays between the players. These balance out to give 50% chance of two players having the same birthday.
Example. A parking inspector randomly inspects different cars in a car park with
cars where
cars have not bought a ticket. If the inspector inspects a car without a ticket then the car receives a fine. Find the probability that exactly two cars are fined.
Answer. The number of ways of inspecting cars out of
is
. I.e.
We can suppose, without loss of generality, that the first cars have not bought a ticket. If
cars are fined, the inspector must choose to inspect
among these first
cars and must choose to inspect
the remaining
cars: E.g.
Here “” means inspected. The are
ways of choosing the two cars without a ticket, and
ways of choosing the five cars with a ticket. Since any way of choosing the first two cars does not influence our choices for remaining five. For this reason we multiply the both combinations to give:
Thus
- You can ignore Feb 29th on leap years.↩