Uploaded by mrnghia789

- Introduction to Probability Lecture 4 Counting MITRES 6 012S18 L04AS

advertisement
LECTURE 4: Counting
n •
•
Discrete uniform law
- Assume n consists of n equally likely elements
- Assume A consists of k elements
Then :
peA) = number of elements of A = k
number of elements of n
n
•
Basic counting principle
•
Applications
permutations
combinations
partitions
number of subsets
bi nom ia I proba bi lities
1
•
/ .
• " J..
•
•
•
' ",- 7
v
prob = ­
1
n
A'
/
•
\'2
Basic counting principle
1"=3
fV\ ,-,
4 shirts
3 ties
2 j ackets
_11
'Vl t
Number of possible attires?
ni choices at stage i
Number o f choices is :
;:~
'V1;=-2
• r stages
•
2 Lj =- Lj ·3 .2.
1Yl,' 'Yl2 ••• 1)'))-.
2
Basic counting principle examples
•
Number of license plates w ith 2 letters fo llowed by 3 digits:
'26 ·'LG· \0-10-10
•
•
... if repetition is prohibited:
26 '25 • , 0 . ~ . '3
Permutations: N um ber of ways of ordering n elements:
,
..
1.
"1.-1 ~-'2
•
.
Number of subsets of {I , ... ,n}:
.
"
- -
"
2·2 ,··1
choice 1: whether we want to put the number 1 to the subset or not
3
Example
•
F ind th e probabil it y th at :
/
six rolls of a (six-sided) die al l give differe nt numbers.
I
! I
I
A
( A ssum e all o utco m es equ ally likely.)
~
-+ 1 i
c 0
II
Q
.£
0 Jet)"", e
(2) 'S )
1-)
o
-4
•
,1" ) b, 2)
-:::
Combinations
/'''1.
.'-.
•
Definition: ( n ) . num ber o f k-elem ent subset s
k
o f a g iven n - elem ent set
L................2;::::i': '/
•
n!
k !( n - k )!
"1\:0)1/1.., ••
1c:.;O}I)~ ... )'"
Two ways of constructing an ordered sequence of k distinct items:
•
Choose the k items one at a time
Choose k items, then order them
1
I
•
• ,
Ih.(<>t - I)(on_Z) • -('Yl-Ktl)
~
•
')J
I<~
M
iC
5
KI
'11 "
•
("",-Ic)~
•
--
n)
n!
(k = k!(n - k)!
C)=
1
= --1
M
o
-t
I
+ . ' •
•
6
Binomial coefficient
G)
---+)
Binomial probabilities
P(H) = p
• n > 1 ind ep end ent coin t osses;
'1\: 6
• P(HTT HHH ) =
•
P(1- P)(I - PJ P?Y : pY (\ - p)
P(parti c ul ar k - hea d sequ ence) ::
P (k hea ds) =
((I-prJ<'·
pK( \ _p)'h.-I<
Cit ~- heor} se?ue""ccs)
"l
\<
H
P( k heads) =
7
•
G)pk(l _ p )n- k
A coin tossing problem
•
Assumpti o ns:
• ind epend ence
• P ( H) = p
Given that there were 3 heads in 10 tosses,
what is the probability that the first two tosses were heads?
event A : the fi rst 2 tosses were heads
P (k hea ds) = C)pk( 1 _ p)n- k
event B : 3 out of 10 tosses were heads
•
First solution:
peA I B) =
-
-
p1. •
P(A n B)
PCB)
E(H I_I 2 0..""ll.1
1
1
I
I
o""C" L""to>~>
» ___ /)D
)
= -' ~---:-:-7-'-----~~--
.p (g,')
8 PI .(I-? )t
I
-
(8
--
1
10
~
8
8
: ., -­
•
A coin tossing problem
•
Given that there were 3 heads in 10 tosses,
what is the probability that the first two tosses were heads?
Assumpti o ns:
• ind epend ence
• P ( H) = p
event A : the fi rst 2 tosses were heads
event B : 3 out of 10 tosses were heads
•
P (k hea ds) = C)pk( 1 _ p)n- k
Conditional probability law (on B) is uniform
Second solution:
SL •
•
•
•
0
•
ee'\~tQ 10 5e9.
:#= i... (11 (I B)
3-t/eo. d. s e9 5
p~(\ _P)1­
9
#' i'l1 13
8
--
10
3> •
Partitions
"'l
f
'\
1 distinct items; r > 1 persons
give n i items to person i
•
n
>
•••
here nt , ... , n r are given nonnegative integers
with nl
•
+ ... + n r =
Ordering n items:
M,
n
'\.
"'l "­
C tn,.
'VIr
/)'(1
•
Deal n i to each person i . and then order
I
c
-'
I,
= IYl. •I
t
I I I I I I I I, I I i I I
'I
, J
"1.,
'Yl _ l­
I - I"­
n!
numb er o f partitio ns = - - - - - ­
n l! n2 ! ···nT !
(multinomial coefficient)
•
10
•
Example:
•
52-card deck, dealt (fairly) to four players.
Find P(each player gets an ace)
Outcomes are:
-
\
fQ~+ ~ i DM
?
number of outcomes:
2~
'11,'
•
e ~U.CleOy
,
e..'rd!y
,,,,),,1 "I .
Constructing an outcome witll ·one a ce t or each person:
distribute the aces
distribute the remaining 48 cards
\2.:1'Z.:12~12~
48!
4·3·2· ~~~~~
•
Answer:
12! 12! 12! 12!
52!
13! 13! 13! 13!
11
Example:
52-card deck, dealt (fairly) to four players.
Find P(each player gets an ace)
A sm art sol uti o n
Stack th e deck, aces o n top
A ·
A .
~
--
••
•
'3~
,
'il
•
I,
~b
•
• •
-­
'"I"I
•
50
Lj~
= .\05"
--
-- ~
-"--"--"j
12
--
MIT OpenCourseWare
https://ocw.mit.edu
Resource: Introduction to Probability
John Tsitsiklis and Patrick Jaillet
The following may not correspond to a particular course on MIT OpenCourseWare, but has been provided by the author as an individual learning resource.
For information about citing these materials or our Terms of Use, visit: https://ocw.mit.edu/terms.
Download