You are on page 1of 41

Principles of Statistics

Week 5
Combinatorics (2.6) and Combinatorial Probability (2.7)

Mihaela Angelova
mihaela.urb@gmail.com
Main topics
Combinatorics
Combinatorics is a time-honored branch of mathematics
concerned with counting, arranging, and ordering
Counting Ordered Sequences: The Multiplication Rule

• Usually the relevant “outcomes” in a combinatorial


problem are ordered sequences.
• If two dice are rolled, for example, the outcome (4, 5)- that
is, the first die comes up 4 and the second die comes up 5
- is an ordered sequence of length two.
• The number of such sequences is calculated by using the
most fundamental result in combinatorics,
the multiplication rule.
Counting Ordered Sequences: The Multiplication Rule

• Оrdered
sequences
Counting Ordered Sequences: The Multiplication Rule

• If operation A can be performed in m


B
different ways
and
• operation B can be performed in n
different ways
the sequence (operation A, operation B)
can be performed in m x n different ways
Counting Ordered Sequences: The Multiplication Rule

# ways to dress
Counting Ordered Sequences: The Multiplication Rule
Counting Ordered Sequences: The Multiplication Rule
Counting Ordered Sequences: The Multiplication Rule

• Consider the problem of choosing four-digit


PIN code where no repetitions are allowed
• How many different PINs are possible?
Counting Ordered Sequences: The Multiplication Rule
Counting Permutations (when the objects are all distinct)
• Ordered sequences arise in two fundamentally different ways.
• The first is the scenario addressed by the multiplication rule:
a process is comprised of k operations, each allowing ni options,
i =1,2,...,k; choosing one version of each operation leads to n1 n2 ...nk
possibilities.
• The second occurs when an ordered arrangement of some specified
length k is formed from a finite collection of objects. Any such
arrangement is referred to as a permutation of length k.
• For example, given the three objects A, B, and C, there are six
different permutations of length two that can be formed if the
objects cannot be repeated: ABC, ACB, BCA, BAC, CBA, and CAB.
Counting Permutations (when the objects are all distinct)

Theorem:
• The number of permutations of length k that can be
formed from a set of n distinct elements, repetitions not
allowed, is denoted by the symbol nPk , where

Permutation
of n choose k

The number of ways to permute an entire set of n distinct


objects is:
nPn = n(n − 1)(n −2)···1 = n!

! NB ! - factorial
Counting Permutations (when the objects are all distinct)

CAT
Counting Permutations (when the objects are all distinct)

CAT

3 2 1
In how many ways In how many ways In how many ways
we can start the we can continue we can continue
letter the letter the letter
rearrangements: 3 rearrangements: 2 rearrangements: 1
A_ A_ T
C__ C + __ T_ C + __
A__
T__ A + __ A + __
T + __ T + __

CAT = 3.2.1= 6
Counting Permutations (when the objects are all distinct)

• In her sonnet Ms. Brown listed eight ways of poems.


• Suppose Ms. Brown had decided that writing greeting
cards afforded her a better format for expressing her
feelings.
• For how many years could she have corresponded with
her favorite gentleman on a daily basis and never sent
the same card twice?
• Assume that each card contains exactly four of the
eight “ways” of poems and that order matters.
Counting Permutations (when the objects are all distinct)

• In selecting the poems for a card, Ms. Brown would be


creating a permutation of length k=4 from a set of n=8
distinct objects

Permutation
of 8 choose 4

1680 : 365 days = 4.6… years


At the rate of a card a day, she could have kept the
correspondence going for more than four and one-
half years.
Counting Permutations (when the objects are all distinct)
Counting Permutations (when the objects are all distinct)
Counting Permutations (when the objects are NOT all distinct)

• Remember: given the three objects A, B, and C, there are


six different permutations of length two that can be
formed if the objects cannot be repeated: ABC, ACB,
BCA, BAC, CBA, and CAB.

• If the three objects to permute, though, are A, A, and B—


that is, if two of the three are identical—the number of
permutations decreases to three: AAB, ABA, BAA

Theorem
• The number of ways to arrange n objects, n1 being of one
kind, n2 of a second kind,..., and nr of an rth kind,
is
Counting Permutations (when the objects are NOT all distinct)
Counting Permutations (when the objects are NOT all distinct)

But we have the letter ‘O’ twice?


Counting Permutations (when the objects are NOT all distinct)

But we have the letter ‘O’ twice?


Counting Permutations (when the objects are NOT all distinct)
Counting Permutations (when the objects are NOT all distinct)

3 different ways of order


of the 3 ‘o’
Counting Permutations (when the objects are NOT all distinct)
Counting Permutations (when the objects are NOT all distinct)

We have 11 letters, but:


• ‘s’ we have 4 times repeating
• ‘i’ we have 4 times repeating
• ‘p’ we have 2 times repeating

In numerator we will have 11!


In denominator we will have 4! 4! 2!
Counting Permutations (when the objects are NOT all distinct)

• Suppose there is a sheet of 12 stickers.


• If all the stickers were distinct, there would
be 12! ways to order the stickers.
• However, 4 of the stickers are identical stars, and
3 are identical moons.
• In how many ways can the stickers be
permuted?
Counting Permutations (when the objects are NOT all distinct)

• Because the objects are not distinct, many of


the 12! permutations we counted are
duplicates.

we need to divide by the number of ways to order the 4


stars and the ways to order the 3 moons to find the number
of unique permutations of the stickers. There are 4! ways to
order the stars and 3! ways to order the moons.
Counting Combinations

• Theorem

is usually read “n things taken k at a time” or “n choose k.”


Counting Combinations
• Eight politicians meet at a fund-raising dinner.
• How many greetings can be exchanged if
each politician shakes hands with every
other politician exactly once?
Counting Combinations
• Imagine the politicians to be eight chips-1
through 8 - in an urn. A handshake corresponds to
an unordered sample of size 2 chosen from that
urn.
• Since repetitions are not allowed, total number of
handshakes is
Combinatorial Probability
• If there are n ways to perform a certain operation
and a total of m of those satisfy some stated
condition - call it A- then P(A) is defined to be the
ratio m/n.
• This assumes, of course, that all possible outcomes
are equally likely.
• m/n model - the so-called classical definition of
probability - is entirely appropriate for describing
a wide variety of phenomena

m (desired outcome)
P(A)=
n (total # of outcomes)
Combinatorial Probability
• An urn contains eight chips, numbered 1 to 8.
• A sample of three is drawn without replacement.
• What is the probability that the largest chip in the
sample is a 5?
Combinatorial Probability
• Let A be the event “Largest chip in sample is a 5.”
• What must happen in order for A to occur:
(1) the 5 chip must be selected, and
(2) two chips must be drawn from the
subpopulation of chips numbered 1 through 4

By the multiplication rule, the number of samples


satisfying event A is the product
Combinatorial Probability

m (desired outcome)
P(A)=
n (total # of outcomes)
Combinatorial Probability
• An urn contains n red chips numbered 1 through
n, n white chips numbered 1 through n, and n
blue chips numbered 1 through n
• Two chips are drawn at random and without
replacement.
• What is the probability that the two drawn are
either the same color or the same number?
Combinatorial Probability
• What is the probability that the two drawn are either the
same color or the same number?
• Let A be the event that the two chips drawn are the
same color;
• Let B be the event that they have the same number.
• We are looking for P(A∪B).
• Since A and B here are mutually exclusive,
• P(A ∪ B)= P(A)+ P(B)
Combinatorial Probability
• With 3n chips in the urn, the total number of
ways to draw an unordered sample of size 2 is

• Moreover,
P(A)= P(2reds ∪ 2whites ∪ 2blues)
= P(2reds)+ P(2whites)+ P(2blues)
n choose 2 n choose 2 n choose 2

• And
P(B)= P(two 1’s ∪ two 2’s ∪···∪ two n’s)
3 choose 2 3 choose 2 3 choose 2

P(A ∪ B)= P(A)+ P(B)


Combinatorial Probability
• A small company employs 3 men and 5 women.
• If a team of 4 employees is to be randomly
selected to organize the company retreat,
• what is the probability that the team will have
exactly 2 women?
Combinatorial Probability
• A small company employs 3 men and 5 women. If a team
of 4 employees is to be randomly selected,
• what is the probability the team will have exactly 2
women?
m (desired outcome)
P(A)=
n (total # of outcomes)
• Total amount of possible choices: 8!/4! 4! = 8x6x7x5 / 4x3x2=70
• the only way to have exactly 2 women is to have 2 men so the
number of ways we can select 2 men from 3 is 3!/ 2! 1! = 3

• the number of ways we can select 2 women from 5 is:


5!/2! 3! = 5.4.3.2.1/ 2.1.3.2.1 = 5x4/2 = 10
• the total different ways you can have 2 women and 2 men
3x10 = 30
• desired outcome / total outcomes = probability -> 30 / 70 = 3/7
Thank you for your attention!

Mihaela Angelova
mihaela.urb@gmail.com

You might also like