0% found this document useful (0 votes)
103 views

ELEC2600 Lecture 3

This document discusses computing probabilities using counting methods, including: - Calculating probabilities by counting outcomes and dividing by total outcomes - Formulas for counting ordered k-tuples and permutations of objects - Examples of probability problems involving drawing balls from urns, answering multiple choice questions, and poker hands It provides explanations and examples of computing probabilities for events using the size of the sample space and size of the event, with applications to problems involving drawing balls, answering test questions, and determining probabilities of different poker hands.

Uploaded by

HeraldLam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
103 views

ELEC2600 Lecture 3

This document discusses computing probabilities using counting methods, including: - Calculating probabilities by counting outcomes and dividing by total outcomes - Formulas for counting ordered k-tuples and permutations of objects - Examples of probability problems involving drawing balls from urns, answering multiple choice questions, and poker hands It provides explanations and examples of computing probabilities for events using the size of the sample space and size of the event, with applications to problems involving drawing balls, answering test questions, and determining probabilities of different poker hands.

Uploaded by

HeraldLam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Elec2600 Lecture 3 1

Elec 2600: Lecture 3


Computing Probabilities using Counting Methods
Sample Size Computation and Examples
Probabilities and Poker!
Elec2600 Lecture 3 2
Computing Probabilities Using Counting Methods
In experiments where the outcomes are equiprobable, we can
compute the probability of any event by counting the number
of outcomes in the event and dividing by the total number of
outcomes in the sample space.
Thus, P[A] is a measure of the size of the set A.
Here we develop several formulas that are useful for counting
problems which are posed as sampling (choosing) problems
Balls from an urn
Cards from a deck
Objects from a population
Answers to a multiple-choice question
space sample in outcomes of number
A in outcomes of number
] [ = A P
Number of ordered 2-tuples
Assume a multiple choice
exam with 2 questions.
Question 1 has n
1
possible answers:
a
1
, a
2
, ..., a
n1
Question 2 has n
2
possible answers:
b
1
, b
2
, ..., b
n2
Let x
1
represent the answer
to question 1, and similarly
for x
2
.
Each possible pair is called a
2-tuple, e.g.,
The number of possible ways
to answer the test is n
1
n
2
.
Elec2600 Lecture 3 3
( ) ( )
1 2 3 8
, , x x a b =
Number of ordered k-tuples
Assume a multiple choice exam with k questions. Question i has
n
i
possible answers.
Each possible way of answering the test is called a k-tuple:
where x
i
represents the chosen answer to question i.
The total number of possible ways to answer the test is
Elec2600 Lecture 3 4
1 2 3
1
k
i k
i
n n n n n
=
=
[

( )
1 2 3
, , , ,
k
x x x x
Example
Suppose the test has 5 questions, and each question has 4
possible answers.
One students answer can be represented by the 5-tuple:
i.e., for the first question the student chose answer 4, for the
second question the student chose answer 3, and so on...
Since each question has 4 possible answers,
Thus, the total number of possible ways to answer the test is
What is the probability that a student got Q1 correct and Q2-Q5
wrong??
Elec2600 Lecture 3 5
( )
1 2 3 4 5
, , , , (4, 3,1, 4, 2) x x x x x =
1 2 3 4 5
4 n n n n n = = = = =
5
1 2 3 4 5
4 n n n n n =
Elec2600 Lecture 3 6
Sampling (Replacement and Ordering)
We can choose k objects from a set A that has n members in
different ways
Replacement
With replacement: after selecting an object and noting its identity, the
object is put back before the next selection.
Without replacement: the object is not put back before the next
selection.
Ordering
With ordering: the order in which we draw the objects is recorded
Without ordering: only the identity and number of times each object is
drawn is important
Elec2600 Lecture 3 7
Elec 210: Lecture 3
Computing Probabilities using Counting Methods
Sample Size Computation and Examples
Probabilities and Poker!
Elec2600 Lecture 3 8
Size of the Sample Space
Suppose we choose k objects from a set A that has n members,
how many ways can we do this?
With replacement and with ordering:
number of outcomes = n
k
Without replacement and with ordering
Without replacement and without ordering
The outcomes when choosing with replacement and without ordering
should not be assumed equally probable.
( )( ) ( )
number of outcomes 1 2 1 n n n n k = +
terms k
( )( ) ( )
( )( )
1 2 1
number of outcomes
1 2 (2)(1)
n n n n k
k k k
+
=

terms in numerator and denominator k


Elec2600 Lecture 3 9
Example (with replacement/with ordering)
An urn contains five balls numbered 1 to 5, suppose we select two balls from
the urn with replacement. What is the probability that the first ball has a
number larger than the second?
Solution:
Figure (a) shows the size of the
sample space is 5
2
= 25.
10 out of 25 have the first ball
larger than the second.
Thus,
4 . 0
25
10
= = P
ball 2
b
a
l
l

1
Elec2600 Lecture 3 10
Example 2.16 (without replacement/with ordering)
An urn contains five balls numbered 1 to 5, suppose we select two balls from
the urn without replacement. What is the probability that the first ball has a
number larger than the second?
Solution:
Figure (b) shows the size of the
sample space is (5)(4) = 20.
10 out of 20 have the first ball
larger than the second.
Thus,
5 . 0
20
10
= = P
ball 2
b
a
l
l

1
Example 2.17
An urn contains five balls numbered 1 to 5, suppose we select
three balls from the urn with replacement. What is the
probability that the three balls are different?
Solution:
The number of ways of choosing the three balls is 5
3
= 125.
The number of outcomes for which the balls are different are
given by the number of ways we can choose three balls without
replacement: (5)(4)(3) = 60.
Thus, the probability is
Elec2600 Lecture 3 11
60
0.48
125
=
Permutations of n distinct objects
Consider sampling without replacement where the number of
objects chosen is equal to the number of objects in the urn, i.e.
k = n.
Applying the previous formula, the total number of possible
orderings (arrangements or permutations) is
where we refer to n! = (n)(n-1)(2)(1) as n factorial, the
number of possible orderings of n objects.
For large n, this is expensive to compute and Stirlings formula
is sometimes used:
Elec2600 Lecture 3 12
( ) ( ) ( )( )
1 2 2 1 ! n n n n =
1/ 2
! ~ 2
n n
n n e t
+
Example 2.18
Find the number of permutations of three distinct objects
{1,2,3}.
Solution
Using the factorial formula, we obtain (3)(2)(1) = 6 permutations.
These are given by
Elec2600 Lecture 3 13
123 132 213 231 312 321
Example 2.19
Suppose that 12 balls are placed at random into 12 cells, where
more than 1 ball can occupy a cell. What is the probability that
all cells are occupied?
Solution
There are 12
12
possible placements of the 12 balls in the 12 cells.
Of these, 12! have one ball in each cell.
Even if the balls are randomly assigned, it is very unlikely that they
will be uniformly distributed.
Elec2600 Lecture 3 14
5
12
12!
Thus, the probability is 5.36 10
12

=
Elec2600 Lecture 3 15
Sampling without replacement and without ordering
Suppose we choose k objects from a set A that has n members
without replacement and without ordering:
The number of possible outcomes for this experiment is
This is called the binomial coefficient and read as n choose k
( )( ) ( )
|
|
.
|

\
|
=

=
+
=
=
k
n
k k n
n
k
k n n- n- n
k
n k
C
n
k
! )! (
!
!
1 2 1
objects order to ways of number
from objects choose to ways ordered of number

n objects n-k k objects


Elec2600 Lecture 3 16
Example 2.20 (without replacement/without order)
An urn contains five balls numbered 1 to 5, suppose we select two balls from
the urn without replacement and without ordering. What is the total
number of ways we can do this?
Solution:
According to the equation on the
previous page:
( )( )( )( )( )
( )( )( ) ( )( )
( )( )
( )( )
10
1 2
4 5
1 2 1 2 3
1 2 3 4 5
! 2 )! 2 5 (
! 5
2
5
= =
-
=
-
=
|
|
.
|

\
|
ball 2
b
a
l
l

1
Example 2.21
What is the number of distinct permutations of k white balls and
n-k black balls (n balls in total)
Solution
Note that each permutation is uniquely specified by the
locations of the white balls.
Thus, the number of permutations is equal to the number of
ways to choose k positions out of n possible positions, C
n
k
.
For example, if there are two white balls and two black balls,
the six combinations are:
Elec2600 Lecture 3 17
WWBB WBWB WBBW BWWB BWBW BBWW
4
2
4! 4 3 2 1
6
(4 2)!2! 2 1 2 1
C

= = =

Example 2.22 (modified)
A batch of 50 items contains 10 defective items. Suppose that
12 items are selected at random and tested. What is the
probability that exactly 5 of the items tested are defective.
Solution
The number of ways of selecting 12 items from 50 is
The number of ways of choosing exactly 5 items is N
1
N
2
where
N
1
= # of ways to select 5 defective items from 10 =
N
2
= # of ways to select 7 non-defective items from 40 =
Thus, the probability is
Elec2600 Lecture 3 18
50
12
| |
|
\ .
10
5
| |
|
\ .
40
7
| |
|
\ .
10 40
5 7
0.0387
50
12
| || |
| |
\ .\ .
=
| |
|
\ .
Example 2.22 More Questions
Can you determine the probability that:
At least 7 selected items are defective?
None of the selected items are defective?
Elec2600 Lecture 3 19
Elec2600 Lecture 3 20
Elec 210: Lecture 3
Computing Probabilities using Counting Methods
Sample Size Computation and Examples
Probabilities and Poker!
Elec2600 Lecture 3 21
Poker
Played with pack of 52 cards with 4 suits
13 hearts : 2 3 4 5 6 7 8 9 10 J Q K A
13 diamonds : 2 3 4 5 6 7 8 9 10 J Q K A
13 clubs: : 2 3 4 5 6 7 8 9 10 J Q K A
13 spades: : 2 3 4 5 6 7 8 9 10 J Q K A
Very Basic Rules (no bets):
Each player dealt 5 cards
Each player looks at cards, and gives back to dealer n cards that they dont
want
Dealer then gives n new cards to the player
Player with highest ranking hand wins!
Elec2600 Lecture 3 22
Poker
What is the
probability of
being dealt each
type of poker
hand?
Elec2600 Lecture 3 23
Poker: Computing Probabilities
Size of sample space:
Number of different possible poker hands
Can you compute this?
Size of event: A particular type of hand is dealt
Number of possibilities (possible outcomes) for this specific hand
E.g., for a Royal Flush, the size is 4
Can you compute this for:
A straight flush
Four of a kind
Full house

Probability of hand being dealt = Size of event / Size of sample space
Elec2600 Lecture 3 24
Poker: Final Note
We are considering here standard 5-card poker
There are different variations, each with different probabilities:
Texas Hold Em
7 Card Poker
Lowball Poker
.
http://en.wikipedia.org/wiki/Poker_probability

You might also like