Professional Documents
Culture Documents
6/4/2012
Probability Rules
Probability of an event =
Probability Rules
The Addition Rule of Probability
The probability that event A or B will occur
when an experiment is performed is given by
P(A or B)=P(A) + P(B) P(AB)
where P(AB) is the probability that both
events, A and B, will occur.
In set notation, event A or B is A B , the
union of A with B.
Wei-Min Huang
Lehigh University
P( A | B)
P( A B)
P( B)
Math 231
6/4/2012
Conditional Probability
Using Contingency Table
Experiment: Draw 1 Card. Note Kind, Color
& Suit.
Color
Black
Ace
Total
4
Non-Ace
24
24
48
Total
26
26
52
P(Ace | Black) =
P(Black)
2 / 52
26 / 52
Revised
Sample
Space
P(B) = 14/20
P(R|R) = 5/19
P(B|R) = 14/19
P(R|B) = 6/19
B
R
P(B|B) = 13/19
4 2 2 1 10 1
(why?)
6 5 6 5 30 3
5! 240 1
2!
6! 720 3
Wei-Min Huang
Lehigh University
or
52 51 52 51
52 51
51
26 26 26 26
2 0 0 2 2 26 25 25
52 51
51
52
Dependent!
26
Tree Diagram
P(R) = 6/20
P(AB)=P(A)*P(B|A),
Red
Type
26 26 26 26 2 26 26 26
or
52 51 52 51
52 51
51
26 26
1 1 2 26 26 26
52 51
51
52
2
Conditional probability
4 2 2 1 10 1
(why?)
6 5 6 5 30 3
? D ? ? ? ?
? ? ? D ? ?
? ? D ? ? ?
? ? ? ? D ?
D ? ? ? ? ?
? ? ? ? ? D
Math 231
6/4/2012
Statistical Independence
Independent Events
Events A and B are independent if the probability
of each event is not affected by whether or not the
other event has occurred.
1. Event Occurrence
Does Not Affect Probability
of Another Event
P(ABC )=P(A)*P(B)*P(C)*
P(A | B) = P(A)
P(A and B) = P(A)*P(B)
p3
p 2 (1 p)
P
P
p(1 p)
1 p
Sample
Examples
Example
2. Randomly arrange the digits in the number 33322 to form a 5-digit number,
what is the probability that the resulting number is odd? 4!/(2!2!) / 5!
3. A balanced six-sided die is tossed twice. What is the probability that both
tosses show the same outcome? 6/36 or C(6,1)(1/36)=6(1/36) [2 different
approaches]
17
Wei-Min Huang
Lehigh University
Math 231
6/4/2012
More examples:
1. Three people line up at the Cup ice-cream store. Each buys an ice cream and
the choices are independent of one another. If 50% of all people order
vanilla, 20% order chocolate, and 30% order strawberry,
(a) find the probability that they all order different flavors; 3!(.5)(.3)(.2)
(b) find the probability that they all order the same flavors. (.5)^3 + (.2)^3 +
(.3)^3
2. A man had 3 fair coins in his pocket; he takes all 3 coins from his pocket by
taking one coin at a time and putting each coin on a table. Let X be the
number of tails showing after he took all 3 coins from his pocket. Determine
the probability distribution of X; i.e., find P(X=k) for all possible values of
k.
P(X = k) = C(3,k)*(1/2)^k*(1/2)^(3-k), k = 0, 1, 2, 3
3. (Do it in a different way) A balanced six-sided die is tossed twice. What is
the probability that both tosses show the same outcome?
More examples:
4. Suppose that 70% vehicles passing through a check point are from within the
state. If three vehicles pass the check point, find the probability that at least
one is from out of state. 1 P(none from out of state) = 1 (.7)^3
or do it directly
C(3,1)(.3)(.7)^2 + C(3,1)(.3)^3(0.7) + C(3,3)(.7)^3
= 3(.3)(.7)^2 + 3(.3)^2(0.7) + (.7)^3
5. A fair coin is tossed repeatedly until the first head appears. What is the
probability that at least three tosses are required?
1 P( at most two tosses are required) = 1 [1/2 + (1/2)(1/2)] = 1/4
or do it directly
(1/2)^3 + (1/2)^4 + (1/2)^5 + .. = (1/2)^3[1 + (1/2) + (1/2)^2 + .]
= (1/8)[ 1/(1 )] = (1/8)(2)= 1/4
C(6,1)(1/6)(1/6) = 6/36
Random Variables
Definition
Random Variables
Examples of Random Variables
Wei-Min Huang
Lehigh University
Math 231
6/4/2012
Numerical Labeling
Sample
Space
TTT
TTH
THT
THH
HTT
HTH
HHT
HHH
Number
of heads
k
Example continued
The probability mass function of X:
P(X = 0) = P(TTT) = (1/2)(1/2)(1/2) = 1/8
P(X = 1) = P(HTT, THT, TTH) = 3(1/2)(1/2)(1/2) = 3/8
P(X = 1) = P(HHT, HTH, THH) = 3(1/2)(1/2)(1/2) = 3/8
P(X = 3) = P(HHH) = (1/2)(1/2)(1/2) = 3/8
k
0
1
2
P(X=k) 1/8 3/8 3/8
3
1/8
Try it!
An experiment consists of rolling a fair die and
tossing a fair coin. Let
A = the event that the die lands 6 and
B = the event that the coin lands tails.
Find P(A U B).
Are A and B mutually exclusive?
Are A and B independent?
P( B) P( A1 B)
P( An B)
P( B) P( B A1 ) P( A1 )
P( B An ) P( An )
30
Wei-Min Huang
Lehigh University
Math 231
6/4/2012
Example
31
Conditional Probability to
Bayes Theorem
32
Bayes Rule
Bayes Rule: Let A1,, An be mutually exclusive
and exhaustive events, with P(Ai) 0 for each Ai.
Let B be any event with P(B) 0. Then
Definition
P( Ak | B)
P( B | Ak ) P( Ak )
n
P( B | A ) P( A )
i 1
34
Example
P( | D) P( D)
P( | D) P( D) P( | D C ) P( D C )
0.99(0.005)
0.332
0.99(0.005) 0.01(0.995)
P( D | )
35
Wei-Min Huang
Lehigh University
36
Math 231
6/4/2012
Bayess Theorem
Using Contingency Table
P R ) .50
P C | R ) .4
P C | R ) .10
PR | C) ?
PR | C)
Repay
Repay
Total
College
.2
.05
.25
College
.3
.45
.75
Total
.5
.5
1.0
(continued)
P C | R ) P R )
P C | R ) P R ) P C | R ) P R )
.4 ).5)
.2
.8
.4 ).5) .1).5) .25
played
4 games to be played =
3!
2
3!0!
Suppose that each time teams A and B play, they have the same 50-50
chances to win. We also assume the plays are independent.
5 games to be played =
4!
8
3!1!
6 games to be played =
5!
20
3!2!
7 games to be played =
6!
40
3!3!
Wei-Min Huang
Lehigh University
3
2
3 2
70
70
4
2
3 8
70
70
5
2
3 20
70
70
6
2
3 40
70
70
Math 231
6/4/2012
3 1
2
2
3 2 16
4 1
4
2
3 2 16
6
5 1
5
2
3 2 16
6 1
5
2
3 2 16
6
Suppose that each time teams A and B play, they have the same
50-50 chances to win.
4P(4 games to be played) + 5P(5 games to be played) +
6P(6 games to be played) + 7 P(7 games to be played) =
4
2
4
5
5 93
5 6 7 5.8125 (not a whole number)
16 16 16
16 16
An Interesting Game
I have three containers, one with a prize and
the other two empty.
You choose one, but it is not opened yet.
I open one of the other two containers,
showing that it is empty.
I ask you if you want to change your choice
of container or not.
Should you?
Wei-Min Huang
Lehigh University
S
i
m
u
l
a
t
i
o
n
o
f
G
a
m
e
C
h
a
n
g
e
D
o
n
'
t
c
h
a
n
g
e
2
0
4
0
6
0
8
0
1
0
0
T
r
i
a
l
1, 2 )
1,3)
S
1, 4 )
1,5 )
1, 6 )
2,1)
2, 2 )
2,3)
2, 4 )
2,5)
2, 6 )
3,1)
3, 2 )
3,3)
3, 4 )
3,5)
3, 6 )
4,1)
4, 2 )
4,3)
4, 4 )
4,5)
4, 6 )
5,1)
5, 2 )
5,3)
5, 4 )
5,5 )
5, 6 )
6,1)
6, 2 )
6,3)
6, 4 )
6,5 )
6, 6 )
Math 231
6/4/2012
Example
We assign probabilities by looking at how
many different ways can that outcome
occur in a general roll (36 pairs) and
applying the Additive Rule.
P(2) = P[ (1,1)] = 1/36
P(3) = P[ (1,2) (2,1)] = 1/36 + 1/36 = 2/36
P(4) =P[(1,3)(3,1)(2,2)] =1/36+1/36+1/36 =
3/36
Probability distribution
Concept of probability distribution is
important.
P(x)
9 10 11 12
1 2 3 4 5 6 5 4 3 2 1
36 36 36 36 36 36 36 36 36 36 36
Playing Rule
More preview:
1. Three people line up at the Cup ice-cream store. Each buys an ice cream and the
choices are independent of one another. If 50% of all people order vanilla, 20%
order chocolate, and 30% order strawberry,
(a) find the probability that they all order different flavors;
(b) find the probability that they all order the same flavors.
2. A man had 3 fair coins in his pocket; he takes all 3 coins from his pocket by taking
one coin at a time and putting each coin on a table. Let X be the number of tails
showing after he took all 3 coins from his pocket. Determine the probability
distribution of X; i.e., find P(X=k) for all possible values of k.
3. (Do it in a different way) A balanced six-sided die is tossed twice. What is the
probability that both tosses show the same outcome?
4. Suppose that 70% vehicles passing through a check point are from within the state. If
three vehicles pass the check point, find the probability that at least one is from out
of state.
Comeout Roll
Win on 7 or 11
Lose on 2, 3, or 12
If 4, 5, 6, 8, 9, or 10 is rolled this number becomes the
point; proceed to Point Roll
Point Roll
Win if point is rolled before rolling a 7
If not point or 7, then continue rolling
5. A fair coin is tossed repeatedly until the first head appears. What is the probability
that at least three tosses are required?
Dice Probability
In rolling two balanced dice there are 36 possible
outcomes.
P(sum
P(sum
P(sum
P(sum
P(sum
P(sum
is 2) = P(sum
is 3) = P(sum
is 4) = P(sum
is 5) = P(sum
is 6) = P(sum
is 7) = 6/36
Wei-Min Huang
Lehigh University
is 12) = 1/36
is 11) = 2/36
is 10) = 3/36
is 9) = 4/36
is 8) = 5/36
pr(7) pr(11)
6
2
8
36 36 36
36 35640 495
Math 231
6/4/2012
56
Wei-Min Huang
Lehigh University
10