Professional Documents
Culture Documents
2021 EDA - Introduction To Probability November 11 Part 1
2021 EDA - Introduction To Probability November 11 Part 1
Probability
UC CEA
Lecture
EDA Introduction
Probability and Statistics
• Textbook:
❖ Introduction to Statistics by Walpole, Ronald E
• References:
❖ Probability and Statistics for Engineers and Scientists by Walpole, Ronald E., et
al.
❖ Elementary Statistics by Sellers, Gene R. and Stephen A. Vardeman.
Use of Probability to solve uncertainties
0.5 1.0
0
Experiments
Experiment Experimental Outcome
Venn Diagram
2. Intersection of two events A and B, denoted by A ∩ B, is
the event containing all the elements that are common
in A and B.
Operations with Events
3. Mutually exclusive S A
events or disjoint
events, A ∩ B = Φ.
A and B have no
elements in S
common.
B
4. The complement
A
of an event A with Venn Diagram of Mutually
respect to S is the Exclusive Events
(H,T)
(T,H)
(T,T)
Experiment Results
• Tossing a coin
• 𝑆 = 𝐻𝑒𝑎𝑑, 𝑇𝑎𝑖𝑙
• Selecting a defective part
• 𝑆 = 𝑑𝑒𝑓𝑒𝑐𝑡𝑖𝑣𝑒, 𝑁𝑜𝑛 𝐷𝑒𝑓𝑒𝑐𝑡𝑖𝑣𝑒
• The outcome of a die
• 𝑆 = 1,2,3,4,5,6
Counting Rules, Permutations and
Combinations
• Counting Rules for 2 coins
• 𝑠 = 𝐻, 𝐻 , 𝐻. 𝑇 , 𝑇, 𝐻 , (𝑇, 𝑇)
• Formula would be 𝑛1 = 2 , 𝑛2 = 2 therefore (2)(2) = 4
• If we involve 6 coins, the result will be
• 2 2 2 2 2 (2) = 64
• If we use 2 dies with 6 faces
• 6 6 = 36
Counting Rules, Permutations and
Combinations
• Counting Rules for 2 coins
• 𝑠 = 𝐻, 𝐻 , 𝐻. 𝑇 , 𝑇, 𝐻 , (𝑇, 𝑇)
• Formula would be 𝑛1 = 2 , 𝑛2 = 2 therefore (2)(2) = 4
• If we involve 6 coins, the result will be
• 2 , 2 2 , 2 2 , 2 = 64
• If we 2 dies with 6 faces
• 6 6 = 36
Combinations
• If we use 2 dies with 6 faces – How many combinations?
• What is the probability of getting a “7”
Combinations –
By definition (0! =1)
Therefore, if a QC inspector selects 2 out of a group of 5 parts
(5)(4)(3)(2)(1)
𝑐25 = (52 ) = = 120/12 = 10
(2)((5−2)
Outcomes
PROBABILITY
4. The number of combinations of n distinct objects taken r at a time is
𝑛! 𝑛
𝑛𝐶𝑟 = =
𝑟! 𝑛−𝑟 ! 𝑟
Permutations –
• When order of counting 𝑛 on objects on a larger set of N objects, we use
the Permutation method
𝑁! 5! 120
• 𝑃𝑛𝑁 = 𝑛! (𝑁
𝑛) = = = = 20
(𝑁−𝑛) 3! 6
Outcomes
PROBABILITY
2. Permutation – is an arrangement of all or part of A set of
objects.
a. The number of permutations of n distinct objects taken n
at a time is n.
b. The number of permutation of n distinct objects taken r
at a time is
𝑛!
𝑛𝑃𝑟 =
𝑛−𝑟 !
PROBABILITY
2. Permutation
c. The number of permutations of n distinct objects
arranged in a circle is (n-1).
d. The number of distinct permutations of n things of
which n1 are of one kind, n2 of a second kind ….. nk
of the kth kind is
𝑛!
𝑁=
𝑛1 ! 𝑛2 ! 𝑛3 !. . . 𝑛𝑘 !
Combinations of a big lottery – when Order is
not important
Therefore if we consider a lottery ticket with 6 integers from a group of 47
Lottery Observations
Draw 6 out of 47 integers
01 11 21 31 41
02 12 22 32 42
03 13 23 33 03
04 14 24 34 44
?
?
05 15 25 35 45
? ?
06 16 26 36 46
?
?
07 17 27 37 47
08 18 28 38
09 19 29 39
10 20 30 40
Combinations of a big lottery – when Order is
not important
Therefore if we consider a lottery ticket with 6 integers from a group of 47
47!
answer 𝐶647 = 6!(47−6) = 10,737,573
Lottery Observations
Draw 6 out of 47 integers
01 11 21 31 41
02 12 22 32 42
03 13 23 33 03
04 14 24 34 44
?
?
05 15 25 35 45
? ?
06 16 26 36 46
?
?
07 17 27 37 47
08 18 28 38
09 19 29 39
10 20 30 40
Powerball lottery
• Compute the number of ways the first 5
numbers can be selected from 53 integers
• What is the probability of winning a prize
of $100,000 by matching the numbers on
the 5 white balls?
• What is the probability of winning the
Powerball jackpot – 1 out of 47 integers
Powerball lottery (U.S.)
? ?
? ?
? ?
08 47
17
21
42
22
17 47
08
Power company expansion project – Kentucky
Power and Light (KP&L)
The company is starting a project to increase the generating capacity in one of its
plants in 2 sequential stages
Given:
1.Design
➢ Similar construction may take from 2,3 or 4 months
2.Construction
➢ Possible construction times for construction stage may take 6,7 and 8 months
Required:
➢Because of the critical need for additional electrical power, the management set a
goal of 10 months for the project.
➢Draw a counting (tabulated data) and Decision Tree Diagram to help the Manager
identify the experimental outcomes
Probability Diagram - for KP& L
PROJECT
Step 1 Step 2
Experimental
Outcome
Total Project
Completion Time
Design Construction
(?, ?) ?
7 mo.
(?, ?) ?
(?, ?) ?
(?, ?)
?
3 mo. 7 mo.
(?, ?)
?
(?, ?)
?
` (?, ?)
?
7 mo.
(?, ?)
?
(?, ?)
?
Table 4.1 KP& L PROJECT –
Tabulated Project Completion – open chart
Completion Time in Months
Stage 1 Design Stage 2 Experimental Total Project
Construction Outcome Completion Time
(sample Point)
Table 4.3 Probability assignment based on Relative Frequency
(experience and judgement)- populated chart
Table 4.2 KP& L PROJECT –Actual Tabulated Results for 40 Projects
Required:
➢Draw a counting modified chart based on given probabilities based on
outcomes of 40 other projects
Combinations – when Order is not important
By definition (0! =1)
If a QC inspector selects 2 out of a group of 5 parts
(2,8) 10
(3,6)
9
3 mo. 7 mo.
(3,7)
10
(3,8)
11
` (4,6)
10
7 mo.
(4,7)
11
(4,8)
12
Table 4.3 Probability assignment based on Relative
Frequency (experience and judgement)
Table 4.3 Probability assignment based on
Relative Frequency Method
Sample Point Project Completion Time Probability of Sample Point
(2,6) 8 months P(2,6) =6/40 = 0.15
(2,7) 9 months P(2,7) =6/40 = 0.15
(2,8) 10 months P(2,8) =2/40 = 0.05
(3,6) 9 months P(3,6) =4/40 = 0.10
(3,7) 10 months P(3,7) =8/40 = 0.20
(3,8) 11 months P(3,8) =2/40 = 0.05
(4,6) 10 months P(4,6) =2/40 = 0.05
(4,7) 11 months P(4,7) =4/40 = 0.10
(4,8) 12 months P(4,8) =6/40 = 0.15
Total = 1.00
Probability with an event
• Let C denote the project is completed in 10 months or less
• C = 2,6 , 2,7 , 2,8 , 3,6 , 3,7 , (4,6)
Let
• 𝐿 = 𝑡ℎ𝑒 𝑒𝑣𝑒𝑛𝑡 that the project is completed in less than 10 months
• 𝑀 = 𝑡ℎ𝑒 𝑒𝑣𝑒𝑛𝑡 that the project is completed in more than 10 months
• Probability with an event is equal to the sum of all the probabilities of the
sample points of the event
• 𝐿= 2,6 , 2,7 , 2,8 , 3,6
• 𝑀= 3,8 , 4,7 , 4,8
• 𝑃 𝐶 = 𝑃 2,6 + 𝑃 2,7 + 𝑃 2,8 + 𝑃 3,6 + 𝑃 3,7 + 𝑃(4,6)
• 𝑃 𝐶 = 0.15 + 0.15 + 0.05 + 0.10 + 0.20 + 0.05) = 0.70
• 𝑃 𝐿 = 𝑃 2,6 + 𝑃 2,7 + 𝑃 2,8 + 𝑃 3,6
Probability with an event
• Probability with an event is equal to the sum of all the probabilities of the sample points of the event
• 𝐿= 2,6 , 2,7 , 2,8 , 3,6
• 𝑀= 3,8 , 4,7 , 4,8
• 𝑃 𝐶 = 𝑃 2,6 + 𝑃 2,7 + 𝑃 2,8 + 𝑃 3,6 + 𝑃 3,7 + 𝑃(4,6)
• 𝑃 𝐶 = 0.15 + 0.15 + 0.05 + 0.10 + 0.20 + 0.05 = 0.70
𝐴𝐶
Complement of Event A
Event A
• Complement of an event
• 𝑃 𝐴 = 1 − 𝑃(𝐴𝑐 )
Union of Events
Sample Space S
𝐴𝐶
Event B
Event A
• Union of events
• 𝐴∪𝐵
Complement of an Event
Sample Space S
𝐴𝐶
Event A Event B
𝐴𝐶
Event B
Event A
• Addition Law
• 𝑃 𝐴 ∪ 𝐵 = 𝑃 𝐴 + 𝑃(𝐵)
Probability problem 1
A small assembly plant has 50 employees. Each worker is expected to complete
assignments on time and in such a way that the assembled product will pass a final
inspection. On occasion, some of the workers fail to meet the performance
standards by completing work late or assembling a defective product. At the end
of the performance evaluation period, the production manager found that 5 of the
50 workers completed the work late, 6 of the workers assembled a defective
product, and 2 of the 50 workers completed the work late and assembled a
defective product.
Let
• 𝐿 = 𝑡ℎ𝑒 𝑒𝑣𝑒𝑛𝑡 𝑡ℎ𝑎𝑡 𝑡ℎ𝑒 𝑤𝑜𝑟𝑘 𝑖𝑠 𝑐𝑜𝑚𝑝𝑙𝑒𝑡𝑒𝑑 𝑙𝑎𝑡𝑒
• 𝐷 = 𝑡ℎ𝑒 𝑒𝑣𝑒𝑛𝑡 𝑡ℎ𝑎𝑡 𝑡ℎ𝑒 𝑎𝑠𝑠𝑒𝑚𝑏𝑙𝑒𝑑 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 𝑖𝑠 𝑑𝑒𝑓𝑒𝑐𝑡𝑖𝑣𝑒
Probability
• The relative frequency information leads to the following
probabilities:
5
•𝑃 𝐿 = = 0.10
50
6
•𝑃 𝐷 = = 0.12
50
2
•𝑃 𝐿 ∩ 𝐷 = = 0.04
50
The manager decided to give a poor performance rating
to either late or defective rating.
• 𝑃 𝐿 ∪ 𝐷 = 𝑃 𝐿 + 𝑃 𝐷 − 𝑃(𝐿 ∩ 𝐷)
• 𝑃 𝐿 ∪ 𝐷 = 0.10 + 0.12 − 0.04 = 0.18
Thus, the calculation tells us that there is a 0.18 probability
that a randomly selected employee received a poor
performance rating.
Probability 2
A major computer software company study show that 30% of the
employees who left the company within 2 years left primarily because
they were dissatisfied with their salary, 20% left because they were
dissatisfied with their work assignments , and 12% of the former
employees indicated dissatisfaction with both salary and work
assignments. What is the probability that the employee who leaves
within 2 years does so because of dissatisfaction with salary,
dissatisfaction with work assignment or both ?
Let
• 𝑆 = 𝑡ℎ𝑒 𝑒𝑣𝑒𝑛𝑡 they were dissatisfied with their salary
• 𝐷 = 𝑡ℎ𝑒 𝑒𝑣𝑒𝑛𝑡 they were dissatisfied with their work assignments
Probability 2
The relative frequency information leads to the following
probabilities:
• 𝑃 𝑆 = 0.30
• 𝑃 𝑊 = 0.20
• 𝑃 𝑆 ∩ 𝑊 = 0.12
The probability that an employee leaves for salary or work
assignment is the following:
• 𝑃 𝑆 ∪ 𝑊 = 𝑃 𝑆 + 𝑃 𝑊 − 𝑃(𝑆 ∩ 𝑊)
• 𝑃 𝑆 ∪ 𝑊 = 0.30 + 0.20 − 0.12 = 0.38
Marginal Probability
Conditional Probability
288 288/1200 0.24
•𝑃 𝐴𝑀 = = = = 0.30
960 960/1200 0.80
𝑃 𝐴∩𝑀
•𝑃 𝐴𝑀 = = 0.30
𝑃(𝑀)
But
𝑃 𝐴∩𝑊
•𝑃 𝐴𝑊 = = 0.15
𝑃(𝑊)
36 36/1200 0.03
•𝑃 𝐴𝑊 = = = = 0.15
240 240/1200 0.20
• 𝑃 𝐴 ∩ 𝐵 = 𝑃(𝐴)𝑃 𝐴 𝐵
Conditional Probability
The conditional probability of B, given A, denoted by
𝑃 𝐵 𝐴 is defined by the equation
𝑃 𝐴∩𝐵
𝑃 𝐵𝐴 = ;if P(A)>0
𝑃 𝐴
𝑃 𝐴∩𝐵 =𝑃 𝐴 𝑃 𝐵 𝐴 =𝑃 𝐵 𝑃 𝐴 𝐵
Math Psychology 8
5 15 18
10
12 25
History
PROBABILITY OF AN EVENT
8
𝑃(P∪M∪H)+8/100 =𝑃(P)+𝑃(M)+𝑃(H)−𝑃(P∩M)−𝑃(P∩H)−𝑃(M∩H)+𝑃(P∩M∩H)+
100
68 42 54 25 35 22 10 8
𝑃(P∪M∪H)+8/100 = + + − − − + +
100 100 100 100 100 100 100 100
𝑃 𝑀∩𝐻 −𝑃 𝑃∩𝑀∩𝐻
24
100
12 1
BY VENN Diagram = = = 0.5
24 2
12
12
• 𝑃= 100
24 = = .50
24
100
CONDITIONAL PROBABILITY
Sample Problems
3. A real estate agent has 8 master keys to open several new homes. Only 1
master key will open any given house. If 40% of these homes are usually
left unlocked, what is the probability that the real estate agent can get into
a specific home if the agent selects 3 master keys at random before leaving
the office?
4. The probability that a person visiting his dentist will have an X-ray is 0.60;
the probability that a person who has an X-ray will also have a cavity filled
is 0.30; and the probability that a person who has an X-ray and a cavity
filled will also have a tooth extracted is 0.01. What is the probability that a
person visiting his dentist will have an X-ray, a cavity filled, and a tooth
extracted?
Sample problem
5. A town has two fire engines operating independently. The
probability that a specific fire engine is available when needed is
0.95.
a. What is the probability that neither is available when needed?
b. What is the probability that a fire engine is available when
needed?
Practice Quiz
1. A card is drawn from an ordinary deck and we are told that it is black.
What is the probability that the card is greater than 3 but less than 9?
2. If the probability that Bob will be alive in 60 years is 0.7 and the
probability that Ann will be alive in 60 years is 0.8, what is the
probability that neither will be alive in 60 years?
Bayes Theorem
Bayes Theorem Sample
Let
𝐴1 = 𝑝𝑎𝑟𝑡 𝑓𝑟𝑜𝑚 𝑠𝑢𝑝𝑝𝑙𝑖𝑒𝑟 1
𝐴2 = 𝑝𝑎𝑟𝑡 𝑓𝑟𝑜𝑚 𝑠𝑢𝑝𝑝𝑙𝑖𝑒𝑟 2
Currently, 65% from the company is purchased from Supplier 1 and rest
from supplier 2
Hence
𝑃 𝐴1 = 0.65
𝑃 𝐴2 = 0.35
Bayes Theorem
A sample of conditional probability
prior probability- initial estimates for specific events of interest.
posterior probability – when a sample, a special report, a product test,
we obtain additional information about the events. Given this new
information, we update the prior probability values by calculating
revised referred to as posterior probabilities. Bayes’ Theorem provides
a means for making these probability calculations.
Bayes Theorem
Probability Revision using Bayes’ Theorem
𝑃 𝐺 𝐴1 = 0.98 𝑃 𝐵 𝐴1 = 0.02
𝑃 𝐺 𝐴2 = 0.95 𝑃 𝐵 𝐴2 = 0.05
Bayes Theorem
𝑃 𝐺 𝐴1 = 0.98 𝑃 𝐵 𝐴1 = 0.02
𝑃 𝐺 𝐴2 = 0.95 𝑃 𝐵 𝐴2 = 0.05
𝑃 𝐴1 ∩𝐵
𝑃 𝐴1 𝐵 = (4.14)
𝑃 𝐵
Referring to the probability Tree
𝑃 𝐴1 ∩ 𝐵 = (𝐴1 )𝑃 𝐵 𝐴1 (4.15)
To find 𝑃 𝐵 , we note that the event B can occur only in 2 ways
𝑃 𝐴1 ∩ 𝐵 and 𝑃 𝐴2 ∩ 𝐵
𝑃 𝐵 = 𝑃 𝐴1 ∩ 𝐵 + 𝑃 𝐴2 ∩ 𝐵
𝑃 𝐵 = 𝑃 𝐴1 𝑃 𝐵 𝐴1 + 𝑃(𝐴2 )𝑃 𝐵 𝐴2 (4.16)
Probability Diagram – Bayes Theorem Experimental
Step 1 Step 2 Outcome
Supplier Condition
𝐺 (𝐴1 , 𝐺)
𝐵
𝐴1
(𝐴1 , 𝐵)
𝐴2
𝐺 ` (𝐴2 , 𝐺)
𝐵
(𝐴2 , 𝐺)
Bayes Theorem
𝑃 𝐴1 , 𝐺 = (𝐴1 ∩ 𝐺) = 𝑃(𝐴1 )𝑃 𝐺 𝐴1
𝑃 𝐴1 ∩ 𝐵 = 𝑃(𝐴1 )𝑃 𝐵 𝐴1
Then
𝑃 𝐴2 , 𝐺 = (𝐴2 ∩ 𝐺) = 𝑃(𝐴2 )𝑃 𝐺 𝐴2
𝑃 𝐴2 ∩ 𝐵 = 𝑃(𝐴2 )𝑃 𝐵 𝐴2
Bayes Theorem – 2 Event Case
Substituting (4.15) and (4.16) into equation (4.14)
𝑃 𝐴 𝑃 𝐵𝐴
𝑃 𝐴1 𝐵 = 𝑃 𝐴 𝑃 𝐵 𝐴1 + 𝑃(𝐴 1)𝑃 𝐵 𝐴 (4.17)
1 1 2 2
𝑃 𝐴 𝑃 𝐵𝐴
𝑃 𝐴2 𝐵 = 𝑃 𝐴 𝑃 𝐵 𝐴2 + 𝑃(𝐴 2)𝑃 𝐵 𝐴 (4.18)
1 1 2 2
(0.65)(0.02) 0.0130
𝑃 𝐴1 𝐵 = (0.65)(0.02)+(0.35)(0.05) = = 0.4262 (4.17)
0.0130+0.0175
(0.35)(0.05) 0.0175
𝑃 𝐴2 𝐵 = (0.65)(0.02)+(0.35)(0.05) = = 0.5738 (4.18)
0.0130+0.0175
Probability Diagram – Bayes Theorem
Step 1 Step 2 Probability of Outcome
Supplier Condition
𝑃(𝐴2 )
𝑃 𝐴𝑖 ∩ 𝐵
𝑃 𝐴𝑖 𝐵 =
𝑃 𝐵
Bayes Theorem – using MS Excel
𝑃(𝐴2 )