Chapter 3 Probability
Chapter 3 Probability
➢Population (N)
➢ population is a set of units.
➢ Finite: All NYU students
➢ Infinite: Stock prices
(past, now, future)
➢Sample (n)
➢ A sample is a subset of the units of
the population which we can observe.
➢ Finite subset, random
Graphical
• Presentation
On a naturally occurring
numerical scale
Discrete categories
Qualitative Quantitative
• Data • Data
Variation
➢ Range, Variance, Standard deviation
n
2
∑ (xi − x )
s2 = i =1
n −1
2 2 2
( x − x ) + ( x2 − x )
= 1
+ ...+ ( xn − x )
n −1
Empirical Rule
• Applies to data sets that are mound-shaped (unimodal) and symmetric
• Approximately 68%, ¯ − to ¯ +
• Approximately 95%, ¯ − 2 to ¯ + 2
• Approximately 99.7%, ¯ − 3 to ¯ + 3 3
𝑥
𝑥
𝑥
𝑥
𝑥
𝑥
𝑠
𝑠
𝑠
𝑠
𝑠
𝑠
Chapter: 3
Probability
What you will learn
➢Probability
5
Why Study Probability?
➢Probability models simplifies the real world
➢May be mis-specified
6
What you will learn
Event Probability
•Probability concepts • (Set calculation)
• (Numerical)
• Independent events
Section 3.1 Section 3.2 – 3.4 Section 3.5 – 3.7
7
Thinking Challenge
➢What’s the probability
of getting a head on the
toss of a single fair
coin? Use a scale from
0 (no way) to 1 (sure
thing).
0.50
0.25
0.00
0 25 50 75 100 125
Number of Tosses
9
Coin is biased?
12
𝜔
𝑆
𝜔
𝑆
𝐻
𝑒
𝑎
𝑑
𝑇
Example
➢ Q: Roll a 6-sided die:
• Sample point: one of 6 possible outcomes
• • • • • •
13
𝑆
Example
➢ Toss 2 coins
• Sample point: one of 4 possible outcomes,
, , ,
Tree diagram
• Sample space: ={ , , , }
14
𝐻
𝑆
𝐻
𝐻
𝐻
𝐻
𝑇
𝑇
𝐻
𝐻
𝑇
𝑇
𝑇
𝑇
𝐻
𝑇
𝑇
Example
•Q: Roll two 6-sided dice?
• • Sample points?
• Sample space?
= {(1,1), (1,2), …, (6,6)}
• Size of the sample space?
36
15
𝑆
Probability
➢ Probability is the basic language of statistics
• Measure the chance (likelihood) that the outcome will
occur when the experiment is performed
• Always between 0 and 1 (inclusive)
16
𝑃
𝑒
𝑎
𝑑
History of Probability
➢ Ancient philosophers: possibility, chances and
necessities
➢ Frequentist vs Bayesian.
17
Probability Rule for Sample Points
➢ Sample space: ={ 1, 2, …, }
➢ Let ({ }) or represent the probability of the
sample point
➢ Rule 1: 0 ≤ ≤1
• All sample point probabilities must lie between 0 and 1
➢ Rule 2: ∑ =1 =1
• Probabilities of all sample points within the sample space must
sum to 1
18
𝑖
𝑖
𝑖
𝑃
𝜔
𝑚
𝑝
𝑖
𝑖
𝑖
𝑆
𝜔
𝜔
𝜔
𝑝
𝜔
𝑝
𝑚
Example
➢ Flip a fair coin
• ({ }) = ({ }) = 0.5
➢ Size of an event
• the number of sample points in A
20
𝐴
𝐴
Example
➢ Toss 2 Coins. Note Faces.
Sample Space S = {HH, HT, TH, TT}
Compound
• Event: At
• least one
TH Tail
Outcome HH HT
TT
S
Event Examples
Experiment: Toss 2 Coins. Note Faces.
Sample Space: HH, HT, TH, TT
Event Outcomes in Event
• 1 Head & 1 Tail HT, TH
• Head on 1st Coin HH, HT
• At Least 1 Head HH, HT, TH
• Heads on Both HH
Examples
➢ When rolling a six-sides die, event “the outcome is
even”
• = {2,4, 6}
• =3
23
𝐴
𝐴
Venn Diagrams for
Sampling Space
➢ Venn diagram -- graphical representation of a
sample space
• Each point represent one possible outcome
• Exclusive: each sample point will occur only once in
each experiment
Venn diagram
➢ Rules:
∑ =1
– ( )=1:( ( )= = 1)
– 0≤ ( )≤1
– ( ) = 0: the event is impossible.(in discrete cases)
25
𝑖
𝑖
𝑃
𝑆
𝑝
𝐴
𝐴
𝑃
𝑃
𝐴
𝑆
𝐴
𝑃
𝐴
𝑛
Exercise
➢ When rolling a die, event “the outcome is even”.
What is the probability of the event ?
Venn diagram
1 1
( )= ×3=
6 2 26
𝑃
𝐴
Relative frequency
interpretation of probability
• When an experiment is repeated times ( is very large)
under the same condition
No . of times occured
– ( )≈ for sufficiently large
No . of times occured
– ( ) = lim
→∞
Total Heads
Number of Tosses
1.00
0.75
0.50
0.25
0.00
27
𝑛
𝑛
𝑛
0 25 50 75 100 125
𝑃
𝑃
𝐴
𝐴
Number of Tosses
𝑛
𝑛
𝑛
𝐴
𝐴
Steps for Calculating Probability of an event
1. Define the experiment:
2. List all the sample points (define sample space S)
3. Assign probabilities to each sample point
1
• When not specified, each sample point has the same probability
| |
4. Determine the sample points in the event A of interest
5. Sum the sample points probabilities to get the event probability
29
Exercise
➢ List all the sample points and assign probability.
31
Textbook, Appendix B , P. 803
Multiplication Rule
➢ A man has 2 shirts and 4 pair of jeans. Ignoring the fact
that some of the combinations may look ridiculous, how
many ways can he get dressed?
32
Multiplication Rule
➢ A man has 2 shirts, 2 pair of pants, 2 pairs of
shoes. How many ways can he get dressed?
➢2 x 2 x 2
33
Combination Rule
➢The number of sequences of 2 letters formed from
the 4 letters a, b, c, d, is: (4) (3) = 12 (ordering
matters: known as permutation)
The sequences are:
(a,b) (a,c) (a,d) (b,c) (b,d) (c,d)
(b,a) (c,a) (d,a) (c,b) (d,b) (d,c)
34
Combination Rule
➢Pick 3 distinct letters from A-Z
➢Combination: ignores to the order in which they were
selected. { , , } is considered the same combination as
{ , , }.
35
𝑋
𝑍
𝑌
𝑌
𝑋
𝑍
Combinations Rule
➢A sample of n elements is to be drawn from a set of N elements.
(ordering does not matter) Then, the number of different samples
possible is denoted by
➢N select n:
×( − 1) × ⋅ ⋅ ⋅ × ( − + 1) !
( )= × ( − 1) × ⋯ × 1
=
!( − )!
➢Factorial symbol: ! = × ( − 1) × ( − 2) × ⋯ × 3 × 2 ×1
➢ 0!=1
➢ (0 ) = 1
➢C(N,n)
𝑛
𝑛
𝑛
𝑁
𝑛
𝑛
𝑁
𝑛
𝑛
𝑛
𝑛
𝑁
𝑁
𝑁
𝑛
𝑁
𝑁
• Permutation A(N,n): An ordered arrangement of n
elements chosen from a set of N distinct
elements. (Order matters)
• A(N,n) = N!/(N-n)!
37
Example
• Suppose you plan to invest equal amounts of
money in each of five business ventures. If you
have 20 ventures from which to make the
selection, how many different samples of five
ventures can be selected from the 20?
• For this example, N = 20 and n = 5. Then the
number of different samples of 5 that can be
selected from the 20 ventures is
⎛ 20 ⎞ 20! 20!
⎜ 5 ⎟ = 5!(20 − 5)! = 5!15!
⎝ ⎠
20 ⋅ 19 ⋅ 18...3 ⋅ 2 ⋅ 1 20 ⋅ 19 ⋅ 18 ⋅ 17 ⋅ 16
= = = 15,504
(5 ⋅ 4 ⋅ 3 ⋅ 2 ⋅ 1)(15 ⋅ 14 ⋅ 13...3 ⋅ 2 ⋅ 1) 5 ⋅ 4 ⋅ 3 ⋅ 2 ⋅1
Exercise
➢Pick 3 distinct letters from −
• (3 )
26 26 × 25 × 24
= = 2600
3×2×1
39
𝐴
𝑍
Exercise
➢ You pick six distinct numbers from 1 through 54,
and then in a televised drawing six of the numbers
are selected. If all six of your numbers are selected,
then you win a share of the first place prize.
➢ How many ways are there of picking 10 bulbs for testing out
of 100?
41
Summary (Chapter 3.1)
➢ Experiment
➢ Sample point
➢ Sample space
➢ Event
➢ Probability:
• Rule 1: 0 ≤ ( ) ≤ 1
• Rule 2: ( ) = ∑ =1 =1
• Rule 3: The probability of an event = sum of the
probabilities of the sample points in
42
𝑖
𝑖
𝑃
𝑆
𝑝
𝐴
𝐴
𝑃
𝐴
𝑛
Steps for Calculating Probability of an event
1. Experiment
2. Sample space S
• List all the sample points and calculate
• If too many, use Multiplication Rule and Combination Rule
1
3. Find ( ) . If equally likely, ( ) =
| |
4. Event A of interest, all sample point and calculate
5. ( ) = Sum of ( ) for all in A
If equally likely : ( )=
•
𝑆
𝑆
43
𝑖
𝑃
𝑟
𝐴
𝑃
𝜔
“A Practical Guide To Quantitative Finance Interview”
𝑖
𝑖
𝑖
𝑖
𝐴
𝑖
𝑖
𝑆
𝐴
𝑃
𝜔
𝑃
𝑃
𝜔
𝜔
𝜔
𝐴
𝜔
𝜔
Basic Operations on Events
➢ Complement of event
➢ Intersection
➢ Union
➢ Difference
44
Section 3.2 – 3.3
Complementary Events
➢Complement of event
• The event that does not occur
• Contains all sample points not in
• Denoted by
Venn Diagram
45
𝐴𝐴𝐴
𝑐
Rule of Complements
The sum of probabilities of the event and its complement
equals to 1
➢ ( )+ ( )=1
➢ ( )=1− ( )
46
𝑃
𝑃
𝐴
𝐴
𝑃
𝐴
𝑃
𝐴
𝑐
𝑐
Experiment: Toss 2 fair coins: ={ , , , }
• TH • Event:
Complement HH
HT ={ , }
Event:
={ , } TT
S
( )=? ( )=?
47
𝑃
𝐴
𝑃
𝐴
𝑆
𝐴
𝐴
𝐻
𝐻
𝐻
𝐻
𝐻
𝑇
𝑇
𝑇
𝐻
𝐻
𝑇
𝑇
𝑇
𝐻
𝑇
𝑇
𝑐
𝑐
Experiment: Roll a die = {1,2, 3,4, 5,6}
= “a die rolls 5 or higher”, =? ( )=? ( )=?
➢ = {5, 6}
➢ = {1, 2,3, 4}
1 1
➢ ( )= 6 ×2= 3
1 2
➢ ( )=1− ( )=1− =
3 3
➢ or,
1 2
➢ ( )= ×4=
6 3
48
𝑃
𝑃
𝑃
𝐴
𝐴
𝐴
𝑃
𝐴
𝐶
𝐶
𝑆
𝐴
𝑃
𝐴
𝑃
𝐴
𝐴
𝐴
𝐴
𝑐
𝑐
𝑐
Example
➢ Suppose 60% of NYU undergraduates own
iPhones. If you pick a random NYU
undergraduate, what is the probability that he or
she will NOT own an iPhone? (What is the
sample space ?)
49
Example
➢ Suppose you flip five coins. What is the probability of getting
at least one head?
➢ Sample space ={ , …, }: = 32
➢ : all sample points with at least one
1
➢ ={ }⇒ ( )=
32
31
➢ By rule of complement: ( ) = 1 − ( )=
32
50
𝐴
𝑃
𝐴
𝑇
𝑇
𝑇
𝑇
𝑃
𝑇
𝐴
𝑃
𝐴
𝑐
𝑐
𝑐
𝑆
𝐻
𝐻
𝐻
𝐻
𝐻
𝑇
𝑇
𝑇
𝑇
𝑇
𝑆
𝐻
𝐴
Compound Events
Compound events:
Composition of two or more other events.
Can be formed in two different ways.
Unions & Intersections
1. Union
• Outcomes in either events A or B or both
• ‘OR’ statement
• Denoted by ∪ symbol (i.e., A ∪ B)
2. Intersection
• Outcomes in both events A and B
• ‘AND’ statement
• Denoted by ∩ symbol (i.e., A ∩ B)
Intersection
➢Intersection of two events and
• Both and occur
• Sample points that belong to both and
• Denoted by ∩ symbol (i.e., ∩ )
• Commutative : ∩ = ∩
53
𝐴
𝐵
𝐵
𝐴
𝐴
𝐴𝐵
𝐴𝐵𝐴𝐵
𝐵
Events
➢Mutually Exclusive Events:
• If A occurs, then B cannot occur
• A and B have no sample points in common ( ∩ = ∅)
• ( ∩ )=0
• Complement events?
54
𝐴𝐵
𝐴
𝑃
𝐴
𝐵
𝐵
Intersection Exercise
➢The card is a heart and a jack
55
𝑃
Mutually Exclusive Events Exercise
➢ Mutually exclusive events:
56
𝑃
𝑆
𝑆
𝑆
𝑆
Union
57
𝐴
𝐵
𝐵
𝐴
𝐴
𝐴𝐵
𝐴𝐵𝐴𝐵
𝐵
Example: Die-Toss Experiment
Consider the die-toss experiment. Define the events:
A: {Toss an even number.}
B: {Toss a number less than or equal to 3.}
59
𝐴
𝐵
Example
60
𝐴
𝐵
Example
5
c. P( ∪ ) = ({1,2, 3,4, 6}) =
6
1
P( ∩ ) = P({2}) =
6
61
𝐴
𝐵
𝑃
𝐴
𝐵
Additive Rules
➢ Numerical rules to calculate probabilities
of union and intersection.
62
Section 3.4
Additive Rule:
Get probabilities for union or intersection of events
➢ ( ∪ )= ( )+ ( )− ( ∩ )
➢ ( ∩ )= ( )+ ( )− ( ∪ )
Wrong in general! 63
𝑃
𝑃
𝐴
𝐴
𝐵
𝐵
𝑃
𝑃
𝐴
𝐴
𝑃
𝑃
𝐵
𝐵
𝑃
𝑃
𝐴
𝐴
𝐵
𝐵
𝑃
𝐴
𝐵
𝑷
𝑨
𝑩
𝑷
𝑨
𝑷
𝑩
Additive Rule Exercise
➢ Suppose you roll two dice, describe the event “you
get 1 on at least one of the dice”
( )= ( )+ ( )− ( ∩ )
13 4 1 16
= + − =
52 52 52 52 65
𝑃
𝐸
𝑃
𝐴
𝑃
𝐵
𝑃
𝐴
𝐵
Additive Rule Exercise
➢ Probability that “The sum of the two dice is either
3 or 5”:
➢ 3 and
are mutually exclusive
5
2 4 1
➢ ( ) = ( 3) + ( 5) = 36 + 36 = 6
66
𝑃
𝐸
𝑃
𝑆
𝑃
𝑆
𝑆
𝑆
More relationships between
union and intersection
• ( ∪ ) = ∩ (white area)
• Rule of complement: ( ∪ )+ ( ∩ )=1
• ( ∩ ) = ∪
• Rule of complement: ( ∩ )+ ( ∪ )=1
( ⋃ )
67
𝐴
𝐵
𝑃
𝑃
𝑃
𝑃
𝐴
𝐴
𝐴
𝐴
𝐴
𝐴
𝐵
𝐵
𝐵
𝐵
𝐵
𝐵
𝐴
𝐴
𝐵
𝐵
𝑐
𝑐
𝑐
𝑐
𝑐
𝑐
𝑐
𝑐
𝑐
𝑐
𝑐
Event Difference
➢ A minus ( \B):
Event happens, but does not
•
\ • •
A∩ \A
• ( \B) = ( ) − ( ∩ )
• ( \A) = ( ) − ( ∩ )
68
𝐵
𝐴𝐵
𝐴
𝐴
𝐵
𝐵
𝐵
𝑃
𝑃
𝐴
𝐵
𝑃
𝑃
𝐴
𝐵
𝑃
𝑃
𝐴
𝐴
𝐵
𝐵
Event Probability Using
Two–Way Table
Event
Event B1 B2 Total
• A1 • A1 ∩ B1 • A 1 ∩ B2 • A 1
A2 • A2 ∩ B1 • A 2 ∩ B2 • A 2
Total
Total • B1 • B2 # of sample points
➢ 1∩ 2=Φ
➢ 1∩ 2=Φ 69
𝐴
𝐵
𝐵
𝐴
Two–Way Table Example
Construct Table from Experiment
Experiment: Draw 1 Card. Note Kind & Color.
➢ 1 = {Ace}, 2={Non-Ace}
➢ 1 = {Black}, 2 = {Red}
Color
Type Red Black Total
•Ace 2 2 4
Non-Ace 24 24 48 Ace
Total 26 26 52
70
Red Ace ∩ Red
𝐵
𝐵
𝐴
𝐴
Two–Way Table Example
Calculate Probability from Table
1. P(A) = Event
2. P(D) = Event C D Total
3. P(C ∩ B) = • A 4 2 6
4. P(A ∪ D) = B 1 3 4
Total 5 5 10
5. P(B ∩ D) =
71
Solution*
72
Read probability from the table
74
Section 3.5-3.6
Conditional Probability
Experiment: Roll a fair 6-faced die.
• • •3
1 3 5 1 5
2 4 6 ❌2 ❌4 ❌6
•Ace 2 • 2 4 Revised
Sample Space
Non-Ace 24 • 24 48
Total 26 • 26 52
( ∩ )
➢ ( )=
( )
Black ‘Happens’:
Eliminates All
• Ace Black Other Outcomes
• • ••
Black
S •• (S)
•
Event
Event B1 B2 Total
• A1 • A1 ∩ B1 • A 1 ∩ B2 • A 1
A2 • A2 ∩ B1 • A 2 ∩ B2 • A 2
Total
Total • B1 • B2 # of sample points
➢ 1∩ 2=Φ
➢ 1∩ 2=Φ 80
𝐴
𝐵
𝐵
𝐴
Exercise
Using the table then the formula, what’s the
probability?
1. P(A|D) = Event
2. P(C|B) = Event C D Total
• A 4 2 6
• B •1 •3 • 4
Total 5 5 10
81
Event
Event C D Total
• A 4 2 6
B 1 3 4
Total 5 5 10
P ( A ∩ D ) 2 10 2
P (A D ) = = =
P (D ) 5 5
10
P (C ∩ B ) 1 1
P (C B ) = = 10 =
P (B ) 4 4
10 82
Exercise
➢ 7/29
83
Exercise
➢ Suppose we roll two dice and A = “The sum is 8,”
B = “The first die is 3.” What is the probability that
the first die is 3 given that the sum is 8, i.e. what
is P(B | A)?
•
= {(2,6), (3,5), (4,4), (5,3), (6,2)}
• ∩ ==36{(3,5)}
•
5 1
( )= = , ( ∩ )=
•
( 36 36
𝑆
∩ ) 1
( | )=
𝑃
𝐴
=
𝑃
𝐴
84
𝑃
𝐵
𝐴
𝑃
𝐴
𝐵
• ( ) 5
𝑆
𝐴
𝐴
𝐴
𝐵
𝑃
𝐴
𝐵
Lecture 4
85
Calculating Probability of an event
1. Basic five-step method
2. Using event operator and numerical rules
• Complement event; Complement rule
• Union and intersection; Additive rule
• Mutually exclusive event
• Event difference
3. Conditional probability
• Updated sample space
• Calculate using basic five-step method
• Calculate by definition
86
Exercise
➢ Suppose we draw two cards out of a deck of 52.
Let A = “The first card is a heart,” B =“The second
card is a heart.” Find the probability that the
second card is a heart given that the first card is
a heart.
13 × 51
( )= =
• 52 × 51
∩ 13 × 12
( ∩ )= =
• 52 × 51
𝑆
𝑆
𝑃
𝐴
( ∩ )
𝑃
𝑃
𝐴
𝐴
𝐵
12 87
𝑃
𝐵
𝐴
| = =
𝐴
𝐴
𝐵
𝑃
𝐴
𝐵
Example: Executives Who Cheat at Golf
➢ A study of executives who play golf revealed that
55% of the executives admitted they had cheated
at golf. Also, 20% of the executives admitted they
had cheated at golf and had lied in business.
➢ Given an executive who had cheated at golf,
what is the probability that the executive also had
lied in business?
• Define the events A and B:
• A = {Executive who had cheated at golf}
• B = {Executive who had lied in business}
Example: Executives Who Cheat at Golf (cont)
( ∩ ) ( ∩ )
➢ ( )=
( )
, ( )=
( )
➢ To find ( )
3
➢ ( ) = 10
94
𝑃
𝐴
𝑃
𝐴
Multiplicative Rule Example
➢ To find ( | )
➢ We need to alter the sample space. A has occurs (i.e. the
first worker selected is giving illegal deductions) say 3
➢ Only 2 of the 9 remaining workers in the sample space
are giving illegal deductions
2
➢ ( | )= 9 95
𝑃
𝐵
𝐴
𝑃
𝐵
𝐴
𝐼
Multiplicative Rule Example
➢ Tree diagram 96
➢ Suppose we pick 2 random NYU students. What is the
probability that both have iPhones?
1900
➢ (1st has iphone) = 4100
1899
➢ (2nd has iphone 1st has iphone) = 4099
1900 1899
➢ (1st has iphone & 2nd has iphone) = ×
4100 4099 97
𝑃
𝑃
𝑃
➢ What is the probability that, of 2 randomly picked
students, only one has an i-phone?
➢ ( )=1− ( | )
99
𝑃
𝑃
𝑃
𝐴
𝐴
𝐴
𝐵
𝐵
𝐵
𝑃
𝑃
𝐴
𝐴
𝑃
𝐵
𝐵
𝐴
𝐵
𝑐
𝑐
𝑐
Movie 21
100
Monty Hall problem
101
Monty Hall problem
➢ Suppose you‘re on a game show, and you're
given the choice of three doors: Behind one door
is a car; behind the others, goats.
➢ You pick a door, say No. 1, and the host, who
knows what's behind the doors, opens another
door, which has a goat
103
Summary
➢ Complement (not ): ( )=1− ( )
➢Union ( ∪ = or )
• Additive rule: ( ∪ ) = ( ) + ( ) − ( ∩ )
• Mutually exclusive: ( ∪ ) = ( ) + ( )
➢Intersection ( ∩ = and )
Additive rule: ( ∩ ) = ( ) + ( ) − ( ∪ )
➢Conditioning ( | = given )
( ∩ ) ( ∩ )
• ( )=
( )
, ( )=
( )
• Multiplicative rule: ( ∩ ) = ( ) ( )= ( ) ( )
• Complement rule: ( )+ ( )=1
𝑃
𝐵
𝑃
𝐴
104
𝑃
𝐴
𝐵
𝑃
𝐵
𝐴
𝑃
𝐴
𝑃
𝐴
𝑃
𝐴
𝐵
𝑃
𝐴
𝐵
𝑃
𝐴
𝐵
𝑃
𝐴
𝐵
𝑃
𝐵
𝑃
𝐵
𝐴
𝑃
𝐴
𝐴
𝐴
𝐵
𝐴
𝐵
𝐴
𝐵
𝐵
𝐵
𝐵
𝐴
𝐴
𝐴
𝑃
𝑃
𝑃
𝐴
𝐴
𝐴
𝐵
𝐵
𝐵
𝑃
𝑃
𝑃
𝐴
𝐴
𝐴
𝑃
𝑃
𝑃
𝐵
𝐵
𝐵
𝑃
𝑃
𝐴
𝐴
𝐵
𝐵
𝑃
𝐴
𝐵
𝑃
𝐴
𝐵
𝑐
𝑐
Independence
➢Event occurrence does not affect probability of the
occurrence of another event
• Toss a coin twice
➢Tests for independence
• P(A | B) = P(A)
• P(B | A) = P(B)
• P(A∩ B) = P(A) × P(B)
➢Different from mutually exclusive events (not
independent):
( ∩ )
( )= =0≠ ( )
( )
105
𝑃
𝐵
𝑃
𝐴
𝐵
𝑃
𝐴
𝑃
𝐴
𝐵
Exercise
➢ Suppose you flip two fair coins. Let
A =“the first coin shows Heads,”
B = “The second coin shows Heads.”
➢ Find the probability of getting heads on both
coins, i.e. find P(A ∩ B). (Using independence)
106
Example: Checking Independence
Consider the experiment of tossing a fair die and let
• A: {Observe an even number.}
• B: {Observe a number less than or equal to 4.}
➢ Are events A and B independent?
• Let ( , ) denote a sample point where the red die takes the value
and green die takes the value .
• Sample space = 36
6
• = {(1,6), (2,5), (3,4), (4,3), (5,2), (6,1)} ⇒ ( ) =
36
6
• = {(6,1), (6,2), (6,3), (6,4), (6,5), (6,6)} ⇒ ( ) =
36
1
• ∩ = {(6,1)} ⇒ ( ∩ ) =
36
1
• Independent: ( ∩ ) = ( ) × ( ) = 110
36
𝐴
𝐵
𝑃
𝑃
𝐴
𝐵
𝐴
𝑃
𝐴
𝐵
𝐵
𝑃
𝐴
𝑃
𝑃
𝐵
𝐴
𝐵
𝑆
𝐴
𝑟𝑔
𝑟
𝑔
Example
➢ Suppose you roll two dice, one red and one green. Let event
= “The sum is 8," B = “The red die is a 6." Are events A and
B independent?
➢ Sample space = 36
5
➢ = {(2,6), (3,5), (4,4), (5,3), (6,2)} ⇒ ( ) =
36
6
➢ = {(6,1), (6,2), (6,3), (6,4), (6,5), (6,6)} ⇒ ( ) = 36
1
➢ ∩ = {(6,2)} ⇒ ( ∩ ) = 36
1 5
➢ Dependent: ( ∩ ) = 36 ≠ ( ) × ( ) = 216
111
𝐴
𝑃
𝐴
𝐵
𝑃
𝐴
𝑃
𝐵
𝑃
𝐴
𝐵
𝑃
𝐵
𝐴
𝐵
𝑃
𝐴
𝐵
𝑆
𝐴
Bayes’ Rule
➢ Relate ( ) to ( )
➢ Multiplicative Rule:
P(A∩B) = P(A) × P(B|A) = P(B) × P(A|B)
➢ Bayes’ rule:
P( B | A) P( A)
P( A | B) =
P( B)
112
𝑃
𝑃
𝐴
𝐵
𝐴
𝐵
Amazon Promotion Example
➢ Amazon.com maintains a list of all registered
customers, along with their email addresses.
114
Pharmacist Exam Example
➢ Every year in March there is a standardized exam for
people who want to be licensed pharmacist.
115
Pharmacist Exam Example
➢ Solution:
116
Bayes’ Rule
Bayes’ Rule
P( B | A) P( A)
P( A | B) =
P( B)
What if ( ) is unknown?
( )= ( ∩ )+ ( ∩ )= ( ) ( )+ ( ) ( | )
( ∩ ) ( ) ( | )
( )= =
( ) ( ) ( )+ ( ) ( | )
𝑃
𝐴
𝑃
𝐵
𝐴
𝑃
𝐴
𝑃
𝐵
𝐴
𝑃
𝐵
𝑐
𝑐
117
𝑃
𝐴
𝐵
𝑃
𝐵
𝑃
𝐵
𝐴
𝑃
𝐵
𝐴
𝑃
𝐴
𝑃
𝐵
𝐴
𝑃
𝐴
𝑃
𝐵
𝐴
𝑃
𝐵𝐵
𝐵
𝐵
𝐴
𝐴
𝑃
𝐴
𝐵
𝑃
𝐴
𝑃
𝐵
𝐴
𝑐
𝑐
𝑐
𝑐
Example: Bayes’s Rule
➢ Electric wheelchairs are difficult to maneuver
and researchers applied Bayes’s Rule to
evaluate an “intelligent” robotic controller.
Consider the following scenario. a wheelchair
user will either (1) turn sharply to the left and
navigate through a door, (2) proceed straight to
the other side of the room, or (3) turn slightly
right and stop at a table.
➢ Denote these three events as
• D (for door) with P(D) = 0.5,
• S (for straight) with P(S) = 0.2, and
• T (for table) with P(T) = 0.3.
Example: Bayes’s Rule (cont)
➢ The wheelchair is installed with a robot-
controlled joystick. When the user intends to go
through the door, he points the joystick straight
30% of the time; when the user intends to go
straight, he points the joystick straight 40% of
the time; and when the user intends to go to the
table, he points the joystick straight 5% of the
time.
➢ If the wheelchair user points the joystick
straight, where is his most likely destination?
Example: Bayes’s Rule (cont)
•Solution Let J = {joystick is pointed straight}. The
user intention percentages can be restated as the
following conditional probabilities:
–P(J|D) = 0.3, P(J|S) = 0.4, and P(J|T) = 0.05.
•Since the user has pointed the joystick straight, we
want to find the following probabilities: P(D|J), P(S|
J), and P(T|J ).
•Now, the three events, D, S, and T, represent
mutually exclusive and exhaustive events, where
P(D) = 0.5, P(S) = 0.2, and P(T) = 0.3.
•Consequently, we can apply Bayes’s Rule as
follows:
Example: Bayes’s Rule (cont)
P( J | D) P( D)
P( D | J ) =
P( J | D) P( D) + P( J | S ) P( S ) + P( J | T ) P(T )
(0.3)(0.5) 0.15
= = = 0.612
(0.3)(0.5) + (0.4)(0.2) + (0.05)(0.3) 0.245
P( J | S ) P( S )
P( S | J ) =
P( J | D) P( D) + P( J | S ) P( S ) + P( J | T ) P(T )
(0.4)(0.2) 0.08
= = = 0.327
(0.3)(0.5) + (0.4)(0.2) + (0.05)(0.3) 0.245
P( J | T ) P(T )
P(T | J ) =
P( J | D) P( D) + P( J | S ) P( S ) + P( J | T ) P(T )
(0.05)(0.3) 0.015
= = = 0.061
(0.3)(0.5) + (0.4)(0.2) + (0.05)(0.3) 0.245
122
𝑃
𝑃
𝐴
𝐴
𝑃
𝐴
𝑃
𝑃
𝐵
𝐴
𝐴
𝑃
𝐵
𝐴
𝑃
𝐵
𝐴
𝑃
𝐵
𝐴
𝐴
𝐵
𝑐
𝑐
𝑐
𝑐
➢ Diagnostic Testing: Suppose there is a rare disease, with 0.1% of patients
afflicted. We have a diagnostic test for the disease. If a patient has the
disease, then there is a 99% chance that the test will show positive. If a
patient does not have the disease, then there is a 2% chance that the test
will show positive. Given that a test shows positive, what is the probability
that the patient has the disease?
: patient has the disease
: test shows positive
• Q3: ( | ) ?
• ( ) = 0.001, ( ) = 1 − 0.001 = 0.999, ( ) = 0.99, ( ) = 0.02, ( ) = 0.02
• A3: Bayes rule:
( ∩ ) ( ) ( ) 0.99 × 0.001
( )= = = = 0.0472
( ) ( ) ( )+ ( ) ( ) 0.02097
125
𝑃
𝐵
𝐴
𝑃
𝐴
𝑃
𝐵
𝐴
𝑃
𝐴
𝑃
𝐵
𝑐
𝑐
𝑃
𝐵
𝑃
𝐴
𝑃
𝐴
𝐵
𝑃
𝐴
𝐵
𝑃
𝐵
𝐴
𝑃
𝐴
𝑃
𝐴
𝑃
𝑃
𝐴
𝐴
𝐵
𝐵
𝑃
𝑃
𝑃
𝐴
𝐵
𝐴
𝐴
𝑃
𝐵
𝑃
𝐵
𝑃
𝐴
𝐵
𝐴
𝑃
𝑃
𝐵
𝐵
𝐴
𝑃
𝑃
𝐴
𝐵
𝐴
𝑃
𝐴
𝐴
𝐴
𝐵
𝐴
𝐵
𝐴
𝐵
𝐵
𝐵
𝐵
𝐴
𝐴
𝐴
𝑃
𝑃
𝑃
𝐴
𝐴
𝐴
𝐵
𝐵
𝐵
𝑃
𝑃
𝑃
𝐴
𝐴
𝐴
𝑃
𝑃
𝑃
𝐵
𝐵
𝐵
𝑃
𝐴
𝐵
𝑃
𝐴
𝐵
𝑃
𝐴
𝐵
𝑐