Combinatorial analysis
Probability in case of equally likely outcomes
Probability Theory
02. Combinatorial analysis and the case of equally likely outcomes
Shilpak Banerjee
Indian Institute of Technology Tirupati
1 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Section 1
Combinatorial analysis
2 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Permutations and Combinations
We now study/review the theory of permutations and
combinations.
The theory of permutations and combinations gives us a
systematic method to count finite sets which turns out to be
extremely useful in computing probabilities.
3 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
The basic principle of counting
Suppose that two experiments are to be performed. Then if
experiment 1 can result in any one of m possible outcomes and if,
for each outcome of experiment 1, there are n possible outcomes
of experiment 2, then together there are mn possible outcomes of
the two experiments.
It is easy to see this since we can observe that for each i, with
1 ≤ i ≤ m, we have n outcomes which can be written as
(i, 1), (i, 2), . . . , (i, n). So in total we have m + m + . . . + m(n
times) = mn times.
A more rigorous proof can be obtained using the principle of
mathematical induction.
4 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Example
Experiment: Simultaneously rolling two dice.
We can think of this as a combination of two experiments
performed simultaneously, and each of these experiments involves
rolling a dice.
So there is a total of 6 × 6 = 36 possibilities, which is the size of
the sample space.
5 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Example
Experiment: Drawing two card from a standard deck of 52 cards,
one one after the other, with replacement.
In this case we have
52 × 52 = 2704
possibilities.
6 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Example
Experiment: Drawing two card from a standard deck of 52 cards,
one one after the other, without replacement.
In this case we have
52 × 51 = 2652
possibilities.
7 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
The generalized basic principle of counting
If r experiments that are to be performed are such that the first
one may result in any of n1 possible outcomes; and if, for each of
these n1 possible outcomes, there are n2 possibilities of the second
experiment; and for each possibility of the first two experiments,
the third experiment has n3 possibilities.
We continue this way for r experiments.
The total number of possible outcomes for the r experiments is
n1 n2 n3 . . . nr
8 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Example
Suppose a standard number plate issued by the state of Andhra
Pradesh looks like
A P <n> <n> <a> <n> <n> <n> <n>
i.e. the first two entries are fixed at A and P. The third, fourth,
sixth, seventh, eighth and ninth can be any digit from 0 − 9, while
the fifth can be any alphabet A − Z .
So the total number of possible plates would be
106 ∗ 26 = 26000000
9 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Factorial notation
Recall for any natural number n we define the factorial of n (or “n
factorial”) as follows
n! = n × (n − 1) × (n − 2) × . . . × 3 × 2 × 1
In addition we define 0! = 1.
Memory test: Is it possible to define the factorial for a more
general set of numbers?
Stirling formula
For very large n, we can approximate the factorial function as
follows:
n n
√
n! ≈ 2πn
e
10 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Permutations
A permutation of a given collection of elements refers to an
arrangement of these things in a row in some order.
11 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Permutations of things that are all different
The number of different permutations of n different things
taken all at a time without repetition is:
n × (n − 1) × . . . × 3 × 2 × 1 = n!
The number of different permutation of of n different things
taken k at a time without repetition is;
n × (n − 1) × . . . × (n − k + 1) =
n!
(n − k)!
The number of different permutation so n different things
taken k at a time with repetitions is
nk
12 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Example
(S. Ross: A first course in probability, Example 3a, pp3)
How many different batting orders are possible for a cricket team
consisting of 11 players?
There are
11! = 39916800
different possibilities.
13 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Example
(E. Kreyszig: Advanced Engineering Mathematics, Example 2, pp1026)
In an encrypted message the letters are arranged in groups of five
letters, called words.
If we allow a letter at most once (i.e. no repetition) then there
26!/(26 − 5)! = 7893600
different possible words.
On the other hand if we allow repetition then there are
265 = 11881376
different possible words.
14 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Example
(S. Ross: A first course in probability, Example 3d, pp4)
How many different letter arrangements can be formed from the
letters PEPPER?
We first note that there are 6! permutations of the letters P1 E1 P2 P3 E2 R
when the 3P’s and the 2E ’s are distinguished from each other.
However, consider any one of these permutations for instance,
P1 P2 E1 P3 E2 R. If we now permute the P’s among themselves and the
E ’s among themselves, then the resultant arrangement would still be of
the form PPEPER. That is, all 3!2! permutations:
P1 P2 E1 P3 E2 R, P1 P2 E1 P3 E2 R, P1 P3 E1 P2 E2 R, P1 P3 E1 P2 E2 R
P2 P1 E1 P3 E2 R, P2 P1 E1 P3 E2 R, P2 P3 E1 P1 E2 R, P2 P3 E1 P1 E2 R
P3 P1 E1 P2 E2 R, P3 P1 E1 P2 E2 R, P3 P2 E1 P1 E2 R, P3 P2 E1 P1 E2 R
are of the form PPEPER. Hence, there are 6!/(3!2!) = 60 possible letter
arrangements of the letters PEPPER.
15 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Permutations of things that are not all different
If the n things are not all different and they can be subdivided
into r classes of alike things differing from class to class, then
the number of permutations of these things taken all at a
time is
n!
n1 !n2 ! . . . nr !
16 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Exercises
1. (S. Ross: A first course in probability, Example 2d, pp3)
How many functions defined on n points are possible if each
functional value is either 0 or 1?
Ans: 2n .
2. (S. Ross: A first course in probability, Example 3f, pp5)
How many different signals, each consisting of 9 flags hung in
a line, can be made from a set of 4 white flags, 3 red flags,
and 2 blue flags if all flags of the same color are identical?
Ans: 1260
3. (S. Ross: A first course in probability, Problem 2, pp15)
How many outcome sequences are possible when a die is
rolled four times, where we say, for instance, that the outcome
is 3, 4, 3, 1 if the first roll landed on 3, the second on 4, the
third on 3, and the fourth on 1?
Ans: 1296.
17 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Exercises
4. (S. Ross: A first course in probability, Problem 9, pp15)
A child has 12 blocks, of which 6 are black, 4 are red, 1 is
white, and 1 is blue. If the child puts the blocks in a line, how
many arrangements are possible?
Ans: 27720.
5. (E. Kreyszig: Advanced Engineering Mathematics, Problem Set 24.4, pp1029)
In how many different ways can 6 people be seated at a round
table?
Ans: 120
18 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
The binomial theorem
Recall that the binomial theorem states that
n X
n k n−k
n
(x + y ) =
x y
k
k=0
where we define the binomial coefficient for 1 ≤ k ≤ n as
n
n!
n × (n − 1) × . . . × (n − k + 1)
=
=
k
(n − k)!k!
k × (k − 1) × . . . × 2 × 1
and in addition we define n0 = 1.
19 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Exercises
1. Show that
n
n−1
n−1
=
+
k
k −1
k
2. Show that
n
n
=
k
n−k
3. Find the sum
n X
n
k=0
k
Ans: 2n
20 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Combinations
Remember that in a permutation, the order is important. On the
other hand the two kinds of combinations, as follows:
The number of combinations of n different things, taken k
at a time, without repetitions is the number of sets that can
be made up from the n given things, each set containing k
different things and no two sets containing exactly the same k
things.
The number of combinations of n different things, taken k
at a time, with repetitions is the number of sets that can be
made up of k things chosen from the given n things, each
being used as often as desired.
(E. Kreyszig: Advanced Engineering Mathematics, pp1026)
21 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Combinations of different things without repetition
The number of different combinations of n different things taken k
at a time without repetitions is
n × (n − 1) × . . . × (n − k + 1)
n
n!
=
=
k!(n − k)!
k × (k − 1) × . . . × 2 × 1
k
Proof:
k things can be taken from a collection of n different things
without repetition in n!/(n − k)!, which is nothing but the number
of permutation of n different things taken k at a time.
Each permutation contain k different things which can be
rearranged in k! ways accounting for k! different permutations. All
of these form a single combination where order does not
matter!
(E. Kreyszig: Advanced Engineering Mathematics, pp1026)
22 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Example
(S. Ross: A first course in probability, Example 4a, pp6)
A committee of 3 is to be formed from a group of 20 people. How
many different committees are possible?
There are
20
20 × 19 × 18
= 1140
=
3
3×2×1
possible combinations.
23 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Example
(S. Lipschutz & J. Schiller: Introduction to probability and statistics, 2.52, pp75)
A box contains 7 blue shocks and 5 red shocks. Find the number n
of ways two shocks can be drawn from the box if (a) they can be
of any color, (b) they must be the same color.
(a) The number of ways is
12
12 × 11
= 66
=
2
2×1
(b) The number of ways is
7
5
+
= 21 + 10 = 31
2
2
24 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Exercises
1. (E. Kreyszig: Advanced Engineering Mathematics, Problem Set 24.4, pp1028)
List (a) all permutations, (b) all combinations without
repetitions, (c) all combinations with repetitions, of 5 letters
a, e, i, o, u taken 2 at a time.
2. (E. Kreyszig: Advanced Engineering Mathematics, Problem Set 24.4, pp1028)
In how many different ways can we select a committee
consisting of 3 engineers, 2 physicists, and 2 computer
scientists from 10 engineers, 5 physicists, and 6 computer
scientists?
Ans: 18, 000.
3. (E. Kreyszig: Advanced Engineering Mathematics, Problem Set 24.4, pp1028)
Determine the number of different bridge hands. (A bridge
hand consists of 13 cards selected from a full deck of 52
cards.)
Ans: 52!/(13!39!)
25 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Exercises
4. (S. Ross: A first course in probability, Problem 25, pp16)
How many triangles can be formed from 8 points when (a) No
three of them are collinear? (b) exactly four of them are in a
straight line and no three points containing at least one point
from the complement of the straight line are collinear.
Ans: (a)56, (b)52.
26 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Combinations of different things with repetition
The number of different combinations of n different things taken k
at a time with repetitions is
n+k −1
k
=
(n + k − 1)!
(n + k − 1) × (n + k − 2) × . . . × (n)
=
k!(n − 1)!
k × (k − 1) × . . . × 2 × 1
Proof: We give an argument in the next slides which can be used
for a proof.
(E. Kreyszig: Advanced Engineering Mathematics, pp1026)
27 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
The stars and bars argument
Suppose n = 7 and k = 4, i.e. you want to select 4 from 7
different things with repetition.
Let us name the objects as
{x1 , x2 , x3 , x4 , x5 , x6 , x7 }
The stars ‘?’ and bars ‘|’ argument:
Consider a sequence of 7 − 1 = 6 bars.
|
|
|
|
|
|
28 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
The stars and bars argument
|
|
|
|
|
|
Imagine that we want to build our collection of four objects by
putting our
x1 s to the left of bar 1,
x2 s between bar 1 and bar 2,
x3 s between bar 2 and bar 3,
x4 s between bar 3 and bar 4,
x5 s between bar 4 and bar 5,
x6 s between bar 5 and bar 6, and
x7 s to the right of bar 6.
29 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
The stars and bars argument
Some samples of collection built this way would be
x1 x1 x1 |
|
x1 |
|x5 |x6 |x7
|x2 |
|
|
|
|x4 |
|
|
|x5 x5 |x6 |
You can imagine that you have you have k(= 4 in our case) stars
‘?’ and n − 1(= 6 in our case) bars ‘|’. And you have n + k − 1
spaces which you want to fill with either the ? or the |. Note this
uniquely determines the collection, for example
? ? ?|
|
|?|
?|
|
|
| ? | ? |?
|?|
|
| ? ?| ? |
|
|
x1 x1 x1 |
=⇒
=⇒
=⇒
x1 |
|x2 |
|
|
|
|
|x4 |
|
|
|x5 |x6 |x7
|x5 x5 |x6 |
30 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
The stars and bars argument
So, how many ways can n − 1 bars be places in n + k − 1 vacant
spots?
The answer is
n+k −1
n−1
31 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Section 2
Probability in case of equally likely outcomes
32 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Equally likely outcomes
There are certain cases where the sample space is finite and its
natural to assume that all the outcomes are equally likely. In this
case we will see that our added knowledge of combinatorial
analysis comes in handy to compute the probability of events in
such sample spaces.
We see some examples in the next few slides.
33 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Example
(S. Ross: A first course in probability, Problem 5b, pp34)
If 3 balls are “randomly drawn” from a bowl containing 6 white
and 5 black balls, what is the probability that one of the balls is
white and the other two black?
Suppose the order in which the balls are drawn is relevant, i.e.
Black White Black is different from White Black Black.
In this case the sample space consists of 11 × 10 × 9 = 990
outcomes.
We can draw
White Black Black in 6 × 5 × 4 = 120 ways,
Black White Black in 5 × 6 × 4 = 120 ways, and
Black Black White in 5 × 4 × 6 = 120 ways,
So the required probability is (120 + 120 + 120)/990 = 4/11.
34 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Example
(S. Ross: A first course in probability, Problem 5b, pp34)
If 3 balls are “randomly drawn” from a bowl containing 6 white
and 5 black balls, what is the probability that one of the balls is
white and the other two black?
Now suppose we draw by dipping our hand into the urn and
grabbing and pulling out three balls simultaneously. So
Black White Black is same as White Black Black.
In this case the number of points in the sample space is
11
= 165
3
The number of ways can draw two black and one white is
5
6
×
= 60
2
1
So the required probability is 60/165 = 4/11.
35 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Example (The Birthday problem)
(S. Ross: A first course in probability, Problem 5i, pp37)
If n people are present in a room, what is the probability that no
two of them celebrate their birthday on the same day of the year?
How large need n be so that this probability is less than 0.5?
As each person can have 365 possible birthdays (assume no one is
born on February 29th), the sample space consists of
(365)n
outcomes. Assuming that each of these outcomes is equally likely,
the desired probability is
(365) × (364) × . . . × (365 − n + 1)
(365)n
Surprisingly if n ≥ 23 the probability is less than 1/2!
36 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Example
(S. Ross: A first course in probability, Problem 5e, pp35)
Suppose that n + m balls, of which n are red and m are blue, are
arranged in a linear order in such a way that all (n + m)! possible
orderings are equally likely. If we record the result of this experiment by
listing only the colors of the successive balls, show that all the possible
results remain equally likely.
If all the balls were distinct, then there are (n + m)! different possible
permutations. And each of there permutation is equally likely with
probability
1
(n + m)!
However when we only note the colors, i.e. consider any two balls of the
same color identical, then we are combining n!m! outcomes together, and
the corresponding event will have the probability
n!m!
(n + m)!
37 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Example
(S. Ross: A first course in probability, Problem 5h, pp36)
In the game of bridge, the entire deck of 52 cards is dealt out to 4
players. What is the probability that
(a) one of the players receives all 13 spades;
(b) each player receives 1 ace?
(a) Put Ei = the event that hand i(= 1, 2, 3, 4) has all 13 spades
P(Ei ) =
1
,
52
13
i = 1, 2, 3, 4
Since the events Ei are mutually exclusive,
P
t4i=1 Ei
=
4
X
i=1
P(Ei ) =
4
≈ 6.3 × 10−12
52
13
38 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Example (contd.)
(b) There are 4! ways to distribute the 4 aces among 4 players.
And once the aces are distributed, the remaining 48 cards can
be distributed among 4 players in
48!
12!12!12!12!
ways. You can see this in the following way: We can consider
48 consecutive slots to place 48 cards. This can be done in
48! ways. These slots are further grouped into 4 groups of
size 12 each. Since arranging the cards within a group does
not cause any change in the hand, we divide by 12! four
times, one for each group.
So the required probability is
48!
4! 12!12!12!12!
52!
13!13!13!13!
≈ 0.1055
39 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Formation of groups
The number of ways n distinct itemsPcan be divided into r distinct
groups of sizes n1 , n2 , . . . , nr where ri=1 ni = n is
n!
n1 !n2 ! . . . nr !
Proof:
The n distinct objects can be arranged in n! ways.
Since the things can inter-arrange within their group without
changing the classification into the groups, we get the number of
distinct classifications by dividing n! by n1 !n2 ! . . . nr !.
40 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
The multinomial theorem
The multinomial theorem states that
X
n
n
x n1 x n2 . . . xrnr
(x1 + x2 + . . . xr ) =
n1 , n2 , . . . , nr 1 2
(n1 ,...,nr ):
n1 +...+nr =n
where we define the multinomial coefficient above as
n
n!
=
n1 + . . . nr = n
n1 , n2 , . . . , nr
n1 !n2 ! . . . nr !
41 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
Exercises
1. (S. Ross: A first course in probability, pp35)
Suppose 5 people are to be randomly selected from a group of
20 individuals consisting of 10 married couples. Determine the
probability that the 5 chosen are all unrelated. (That is, no
two are married to each other.)
Ans: 0.26.
2. (S. Ross: A first course in probability, Example 5j, pp37)
A deck of 52 playing cards is shuffled, and the cards are
turned up one at a time until the first ace appears. Is the next
card that is, the card following the first ace more likely to be
the ace of spades or the two of clubs?
42 / 43
Combinatorial analysis
Probability in case of equally likely outcomes
End of chapter
43 / 43
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )