Mathematics for Computer Science
MIT 6.042J/18.062J
Introduction to
Probability Theory
Albert R Meyer, April 30, 2009
lec 12R.1
Counting in Probability
What is the
probability of getting
exactly two jacks
in a poker hand?
Albert R Meyer, April 30, 2009
lec 12R.2
Counting in Probability
52
Outcomes: 5-card hands
5
4 52 - 4
Event: 2 3
hands w/2Jacks
Pr{2 Jacks} ::=
4 48
2 3
52
5
Albert R Meyer, April 30, 2009
0.04
lec 12R.3
Probability: 1st Idea
• A set of basic experimental
outcomes
• A subset of outcomes is an
event
• The probability of an event:
# outcomes in event
Pr{event} ::
total # outcomes
Albert R Meyer, April 30, 2009
lec 12R.4
The Monty Hall Game
Applied Probability:
Let’s Make A Deal
(1970’s TV Game Show)
Albert R Meyer, April 30, 2009
lec 12R.5
Monty Hall Webpages
http://www.letsmakeadeal.com
Albert R Meyer, April 30, 2009
lec 12R.6
The Monty Hall Game
•goats behind two doors
•prize behind third door
•contestant picks a door
•Monty reveals a goat
behind an unpicked door
•Contest sticks, or switches
to the other unopened door
Albert R Meyer, April 30, 2009
lec 12R.8
Analyzing Monty Hall
Marilyn Vos Savant explained Game
in magazine -- bombarded by letters
(even from PhD’s) debating:
1) sticking & switching equally good
2) switching better
Albert R Meyer, April 30, 2009
lec 12R.10
Analyzing Monty Hall
Determine the outcomes.
-- using a tree of possible
steps can help
Albert R Meyer, April 30, 2009
lec 12R.11
Monty Hall SWITCH strategy
1
2
3
Prize
location
2
3
3
2
L
L
W
W
1
2
3
3
1
3
1
1
2
3
W
L
L
W
2
1
2
1
1
2
3
Door
Picked
Door
Opened
W
W
L
L
Albert R Meyer, April 30, 2009
SWITCH
Wins: 6
Lose: 6
lec 12R.12
Analyzing Monty Hall
A false conclusion:
sticking and switching have
same # winning outcomes, so
probability of winning
is the same for both: 1/2.
Albert R Meyer, April 30, 2009
lec 12R.14
Analyzing Monty Hall
Another false argument:
after door opening, 1 goat
and 1 prize are left. Each
door is equally likely to have
the prize (by symmetry), so
both strategies win with
probability: 1/2.
Albert R Meyer, April 30, 2009
lec 12R.15
Analyzing Monty Hall
What’s wrong?
Let’s look at the outcome
tree more carefully.
Albert R Meyer, April 30, 2009
lec 12R.16
Monty Hall SWITCH strategy
1
1/3
1/3
2
1
3
3
1
2
1
3
1/2
1
1/2
3
3
1
1/3 2
1/3
3
1/3
Prize
location
1/2 3
1/3
1/3
1/3
2
2
1/3
1
1/2
1/3
1
1/3 2
1/3
Door
Picked
3
1
1
1
2
1
1
1/2
2
1/2
1
Door
Opened
L 1/18
L 1/18
W 1/9
W
W
L
L
W
W
W
L
1/9
1/9
1/18
1/18
W: 6/9 = 2/3
L: 6/18 = 1/3
1/9
1/9
1/9
1/18
L 1/18
Albert R Meyer, April 30, 2009
lec 12R.17
Probability: 2nd Idea
Outcomes may have
differing probabilities!
Not always uniform.
Albert R Meyer, April 30, 2009
lec 12R.18
Finding Probability
Intuition is important but dangerous.
Stick with 4-part method:
1. Identify outcomes (tree helps)
2. Identify event (winning)
3. Assign outcome probabilities
4. Compute event probabilities
Albert R Meyer, April 30, 2009
lec 12R.20
Probability Spaces
1) Sample space, , whose
elements are called outcomes.
2) Probability function,
Pr:
P(
)[0,1]
(a) Pr{ } = 1,
(b) the Sum Rule:
Albert R Meyer, April 30, 2009
lec 12R.22
Sum Rule (Infinite)
For pairwise disjoint A0,A1,…
Pr{A0 A1 A2
}
Pr{A0 } Pr{A1 } Pr{A2 }
Albert R Meyer, April 30, 2009
lec 12R.24
Inclusion-Exclusion
Pr{ABC} =
Pr{A}+Pr{B}+Pr{C}
-Pr{AB}-Pr{AC}-Pr{BC}
+ Pr{ABC}
Albert R Meyer, April 30, 2009
lec 12R.29
Boole’s Inequality
for sets A0 ,A1 ,
Pr Ai
i 0
Pr{A
}
i
i 0
Albert R Meyer, April 30, 2009
lec 12R.32
Team Problems
Problems
1 4
Albert R Meyer, April 30, 2009
lec 12R.33
© Copyright 2026 Paperzz