[go: up one dir, main page]

0% found this document useful (0 votes)
84 views65 pages

Lecture 2 Probability Theory

This document provides an overview of probability theory concepts including random experiments, sample spaces, events, and counting techniques. It defines a random experiment as a procedure with uncontrolled outcomes that can be repeated to discover unknown results. The sample space consists of all possible outcomes. Events are subsets of the sample space. Counting techniques like the multiplication rule, permutation rule, and combination rule are introduced to calculate the number of possible outcomes in events. Examples are provided to illustrate these probability concepts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views65 pages

Lecture 2 Probability Theory

This document provides an overview of probability theory concepts including random experiments, sample spaces, events, and counting techniques. It defines a random experiment as a procedure with uncontrolled outcomes that can be repeated to discover unknown results. The sample space consists of all possible outcomes. Events are subsets of the sample space. Counting techniques like the multiplication rule, permutation rule, and combination rule are introduced to calculate the number of possible outcomes in events. Examples are provided to illustrate these probability concepts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 65

CE 6013:

Statistical Methods in Civil Engineering


Lecture# 2
Probability Theory

Dr. Sheikh Mokhlesur Rahman


Associate Professor, Dept. of CE
Contact: smrahman@ce.buet.ac.bd
2
Random Experiment

➢ An experiment is a procedure that is


• carried out under controlled conditions, and
• executed to discover an unknown result.
➢ An experiment that results in different outcomes even
when repeated in the same manner every time is a
random experiment.

April 2023 Semester Lecture 2_Probability


3
Sample Spaces

➢ The set of all possible outcomes of a random


experiment is called the sample space, S.
➢ S is discrete if it consists of a finite or countable infinite
set of outcomes.
➢ S is continuous if it contains an interval of real
numbers.

April 2023 Semester Lecture 2_Probability


4
Example 2-1: Defining Sample Spaces

➢ Randomly select a camera and record the recycle time


of a flash. S = R+ = {x | x > 0}, the positive real
numbers.
➢ Suppose it is known that all recycle times are between
1.5 and 5 seconds. Then
S = {x | 1.5 < x < 5} is continuous.
➢ It is known that the recycle time has only three
values(low, medium or high). Then S = {low, medium,
high} is discrete.
➢ Does the camera conform to minimum recycle time
specifications?
S = {yes, no} is discrete.

April 2023 Semester Lecture 2_Probability


Example 2-3: Sample Space Defined by 5
a Tree Diagram – Message Delays
Messages are classified as on-time(o) or late(l).
Classify the next 3 messages.
S = {ooo, ool, olo, oll, loo, lol, llo, lll}

April 2023 Semester Lecture 2_Probability


6
Events are Sets of Outcomes

➢ An event (E) is a subset of the sample space of a


random experiment.
➢ Event combinations
• The Union of two events consists of all outcomes that
are contained in one event or the other, denoted as
E1∪E2.
• The Intersection of two events consists of all outcomes
that are contained in one event and the other, denoted
as E1∩E2.
• The Complement of an event is the set of outcomes in
the sample space that are not contained in the event,
denoted as E.

April 2023 Semester Lecture 2_Probability


7
Example 2-4 Discrete Events

Suppose that the recycle times of two cameras are recorded. Consider
only whether or not the cameras conform to the manufacturing
specifications. We abbreviate yes and no as y and n. The sample space is
S = {yy, yn, ny, nn}.

Suppose, E1 denotes an event that at least one camera conforms to


specifications, then E1 = {yy, yn, ny}
Suppose, E2 denotes an event that no camera conforms to
specifications, then E2 = {nn}
Suppose, E3 denotes an event that at least one camera does not
conform, then E3 = {yn, ny, nn},

• Then E1 ∪ E3 = S
• Then E1 ∩ E3 = {yn, ny}
• Then E1 = {nn}

April 2023 Semester Lecture 2_Probability


8
Example 2-5 Continuous Events

Measurements of the thickness of a part are modeled


with the sample space: S = R+.
Let E1 = {x | 10 ≤ x < 12},
Let E2 = {x | 11 < x < 15}

• Then E1 ∪ E2 = {x | 10 ≤ x < 15}


• Then E1 ∩ E2 = {x | 11 < x < 12}
• Then E1 = {x | 0 < x < 10 or x ≥ 12}
• Then E1 ∩ E2 = {x | 12 ≤ x < 15}

April 2023 Semester Lecture 2_Probability


9
Venn Diagrams
Events A & B contain their respective outcomes. The
shaded regions indicate the event relation of each diagram.

April 2023 Semester Lecture 2_Probability


10
Mutually Exclusive Events

• Events A and B are mutually exclusive because they


share no common outcomes.
• The occurrence of one event precludes the occurrence
of the other.
• Symbolically, A ∩ B = Ø

April 2023 Semester Lecture 2_Probability


11
Mutually Exclusive Events - Laws

➢ Commutative law (event order is unimportant):


• A ∪ B = B ∪ A and A ∩ B = B ∩ A

➢ Distributive law (like in algebra):


• (A ∪ B) ∩ C = (A ∩ C) ∪ (B ∩ C)
• (A ∩ B) ∪ C = (A ∪ C) ∩ (B ∪ C)

➢ Associative law (like in algebra):


• (A ∪ B) ∪ C = A ∪ (B ∪ C)
• (A ∩ B) ∩ C = A ∩ (B ∩ C)

April 2023 Semester Lecture 2_Probability


12
Mutually Exclusive Events - Laws

➢ DeMorgan’s law:
• (A ∪ B) = A∩B
▪ The complement of the union is the intersection of the
complements.
• (A ∩ B) = A ∪ B
▪ The complement of the intersection is the union of the
complements.

➢ Complement law:
(A) = A.

April 2023 Semester Lecture 2_Probability


13
Counting Techniques

➢ There are three special rules, or counting techniques,


used to determine the number of outcomes in events.
➢ They are :
1. Multiplication rule
2. Permutation rule
3. Combination rule
➢ Each has its special purpose that must be applied
properly – the right tool for the right job.

April 2023 Semester Lecture 2_Probability


Counting – Multiplication Rule 14

➢ Multiplication rule:
• Let an operation consist of k steps and there are
▪ n1 ways of completing step 1,
▪ n2 ways of completing step 2, … and
▪ nk ways of completing step k.
• Then, the total number of ways to perform k steps is:
▪ n1 · n2 · … · nk

April 2023 Semester Lecture 2_Probability


15
Example 2-7 - Web Site Design

In the design for a website, we can choose to use


among:
• 4 colors,
• 3 fonts, and
• 3 positions for an image.
How many designs are possible?

Answer:
via the multiplication rule: 4 * 3 * 3 = 36

April 2023 Semester Lecture 2_Probability


Counting – Permutation Rule 16

➢ A permutation is a unique sequence of distinct items.


➢ If S = {a, b, c}, then there are 6 permutations
• Namely: abc, acb, bac, bca, cab, cba (order matters)
➢ Number of permutations for a set of n different items is
n!
➢ n! = n·(n-1)·(n-2)·…·2·1
➢ 7! = 7·6·5·4·3·2·1 = 5,040
➢ By definition: 0! = 1

April 2023 Semester Lecture 2_Probability


Counting–Subset Permutations 17

➢ For a sequence of r items from a set of n items:

n!
P = n(n − 1)(n − 2)...(n − r + 1) =
n

(n − r )!
r

April 2023 Semester Lecture 2_Probability


Subset Permutations: Example 18

Example 2-8: Printed Circuit Board


A printed circuit board has eight different locations in
which a component can be placed. If four different
components are to be placed on the board, how many
designs are possible?

Answer: Order is important, so use the permutation


formula with n = 8, r = 4.

8! 8  7  6  5  4!
P =8
= = 8  7  6  5 = 1,680
(8 − 4)!
4
4!

April 2023 Semester Lecture 2_Probability


19
Counting - Similar Item Permutations

➢ Used for counting the sequences when some items are


identical.
➢ The number of permutations of:
n = n1 + n2 + … + nr items of which
n1, n2, …., nr are identical.
is calculated as:
n!
n1 ! n2 ! ... nr !

April 2023 Semester Lecture 2_Probability


20
Example 2-9: Hospital Schedule

Problem: In a hospital, an operating room needs to


schedule three knee surgeries and two hip surgeries in a
day. The knee surgery is denoted as k and the hip as h.
• How many sequences are there?
Since there are 2 identical hip surgeries and 3 identical
knee surgeries, then
5! 5  4  3!
= = 10
2!3! 2 1  3!
• What is the set of sequences?
{kkkhh, kkhkh, kkhhk, khkkh, khkhk, khhkk, hkkkh,
hkkhk, hkhkk, hhkkk}

April 2023 Semester Lecture 2_Probability


Counting – Combination Rule 21

➢ A combination is a selection of r items from a set of n


where order does not matter.
➢ If S = {a, b, c}, n =3, then
• If r = 3, there is 1 combination, namely: abc
• If r = 2, there are 3 combinations, namely ab, ac, and bc
➢ No. of permutations ≥ No. of combinations
➢ Since order does not matter with combinations, we are
dividing the no. of permutations by r!, where r! is the
no. of arrangements of r elements.
n n!
C = =
n

 r  r !(n − r )!
r

April 2023 Semester Lecture 2_Probability


Example 2-11: Sampling w/o 22
Replacement-1
Problem: A bin of 50 parts contains 3 defectives and 47
non-defective parts. A sample of 6 parts is selected from
the 50 without replacement. How many samples of size
6 contain 2 defective parts?
➢ First, how many ways are there for selecting 2 parts
from the 3 defective parts?
3!
C2 =
3
= 3 different ways
2!1!
➢ Now, how many ways are there for selecting 4 parts
from the 47 non-defective parts?
47! 47  46  45  44  43!
C4 =
47
= = 178,365 different ways
4! 43! 4  3  2 1  43!

April 2023 Semester Lecture 2_Probability


Example 2-11: Sampling w/o 23
Replacement-2
➢ Now, how many ways are there to obtain:
• 2 from 3 defectives, and
• 4 from 47 non-defectives?

𝐶23 𝐶447 = 3 ∗ 178,365 = 535,095 different ways

April 2023 Semester Lecture 2_Probability


24
Probability

➢ Probability is the likelihood or chance that a particular


outcome or event from a random experiment will occur.
➢ In this chapter, we consider only discrete (finite or
countably infinite) sample spaces.
➢ Probability is a number in the [0,1] interval.
➢ A probability of:
• 1 means certainty
• 0 means impossibility

April 2023 Semester Lecture 2_Probability


25
Types of Probability

➢ Subjective probability is a “degree of belief.”

Example: “There is a 50% chance that I’ll


study tonight.”

➢ Relative frequency probability is based on how often


an event occurs over a very large sample space.

Example: n( A)
lim
n→ ∞ n

April 2023 Semester Lecture 2_Probability


Probability Based on Equally-Likely 26
Outcomes
➢ Whenever a sample space consists of N possible
outcomes that are equally likely, the probability of each
outcome is 1/N.
➢ Example: In a batch of 100 diodes, 1 is laser diode. A
diode is randomly selected from the batch. Random
means each diode has an equal chance of being
selected. The probability of choosing the laser diode is
1/100 or 0.01, because each outcome in the sample
space is equally likely.

April 2023 Semester Lecture 2_Probability


27
Probability of an Event

➢ For a discrete sample space, the probability of an


event E, denoted by P(E), equals the sum of the
probabilities of the outcomes in E.

➢ The discrete sample space may be:


• A finite set of outcomes
• A countably infinite set of outcomes.

April 2023 Semester Lecture 2_Probability


28
Example 2-13: Probabilities of Events

➢ A random experiment has a sample space {a,b,c,d}.


These outcomes are not equally-likely; their
probabilities are: 0.1, 0.3, 0.5, 0.1.
➢ Let Event A = {a,b}, B = {b,c,d}, and C = {d}
• P(A) = 0.1 + 0.3 = 0.4
• P(B) = 0.3 + 0.5 + 0.1 = 0.9
• P(C) = 0.1
• P(A ) = 0.6 and P(B ) = 0.1 and P(C ) = 0.9
• Since event A∩B = {b}, then P(A∩B) = 0.3
• Since event A∪B = {a,b,c,d}, then P(A∪B) = 1.0
• Since event A∩C = {null}, then P(A∩C ) = 0

April 2023 Semester Lecture 2_Probability


29
Axioms of Probability

➢ Probability is a number that is assigned to each


member of a collection of events from a random
experiment that satisfies the following properties:

If S is the sample space and E is any event in the


random experiment,
1. P(S) = 1
2. 0 ≤ P(E) ≤ 1
3. For any two events E1 and E2 with E1∩E2 = Ø,
P(E1∪E2) = P(E1) + P(E2)
➢ The axioms imply that:
• P(Ø) =0 and P(E′ ) = 1 – P(E)
• If E1 is contained in E2, then P(E1) ≤ P(E2).

April 2023 Semester Lecture 2_Probability


30
Addition Rules

➢ Joint events are generated by applying basic set


operations to individual events, specifically:
• Unions of events, A ∪ B
• Intersections of events, A ∩ B
• Complements of events, A
➢ Probabilities of joint events can often be determined
from the probabilities of the individual events that
comprise them.

April 2023 Semester Lecture 2_Probability


31
Example 2-15: Semiconductor Wafers

A wafer is randomly selected from a batch that is


classified by contamination and location.
• Let H be the event of high concentrations of
contaminants. Then P(H) = 358/940.
• Let C be the event of the wafer being located at the
center of a sputtering tool. Then P(C) = 626/940.
• P(H∩C) = 112/940 Location of Tool
Contamination Total
Center Edge
Low 514 68 582
High 112 246 358
Total 626 314 940

• P(H∪C) = P(H) + P(C) − P(H∩C)


= (358/940) + (626/940) − (112/940) = 0.927
This is the addition rule.
April 2023 Semester Lecture 2_Probability
32
Probability of a Union

➢ For any two events A and B, the probability of union is


given by:
P(A∪B) = P(A) + P(B) – P(A∩B)

➢ If events A and B are mutually exclusive, then


P(A∩B) = 
and therefore,
P(A∪B) = P(A) + P(B)

April 2023 Semester Lecture 2_Probability


33
Addition Rule: 3 or More Events

P(A∪B∪C) = P(A) + P(B) + P(C) – P(A∩B) – P(A∩C)


– P(B∩C) + P(A∩B∩C)
Note the alternating signs.

If a collection of events Ei are pairwise mutually


exclusive; that is Ei ∩ Ej = , for all i, j
𝑘

P 𝐸1 ∪ 𝐸2 ∪ ⋯ ∪ 𝐸𝑘 = ෍ 𝑃(𝐸𝑖 )
𝑖=1

April 2023 Semester Lecture 2_Probability


34
Mutually Exclusive Event - Example

➢X denote the pH of a sample. Consider that X for a


range of samples pH is greater than 6.5 but less than
or equal to 7.8. This probability is the sum of any
collection of mutually exclusive events with union equal
to the same range for X.
➢ One example:
𝑃 6.5 < 𝑋 ≤ 7.8
= 𝑃 6.5 < 𝑋 ≤ 7.0 + 𝑃 7.0 < 𝑋 ≤ 7.5 + 𝑃 7.5 < 𝑋 ≤ 7.8

➢ Another example:
𝑃 6.5 < 𝑋 ≤ 7.8
= 𝑃 6.5 < 𝑋 ≤ 6.6 + 𝑃 6.6 < 𝑋 ≤ 7.1 + 𝑃 7.1 < 𝑋 ≤ 7.8

April 2023 Semester Lecture 2_Probability


35
Conditional Probability

➢ P(B | A) is the probability of event B occurring, given


that event A has already occurred.
➢ This is called conditional probability of B given A.
➢ A communications channel has an error rate of 1 per
1000 bits transmitted. Errors are rare, but do tend to
occur in bursts. If a bit is in error, the probability that
the next bit is also in error is greater than 1/1000.

April 2023 Semester Lecture 2_Probability


36
Conditional Probability Rule

➢ The conditional probability of an event B given an


event A, denoted as P(B | A), is:
𝑃(𝐴∩𝐵)
𝑃 𝐵𝐴 = ; for 𝑃(𝐴) > 0
𝑃(𝐴)
➢ From a relative frequency perspective of n equally
likely outcomes:
𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠 𝑖𝑛 𝐴
• 𝑃(𝐴) =
𝑛
𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠 𝑖𝑛 𝐴∩𝐵
• 𝑃(𝐴 ∩ 𝐵) =
𝑛
𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠 𝑖𝑛 𝐴∩𝐵
• 𝑃 𝐵𝐴 =
𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠 𝑖𝑛 𝐴

April 2023 Semester Lecture 2_Probability


37
Example 2-17

Problem: 400 parts classified by surface flaws and as


(functionally) defective. Parts Classified
What is the probability of the Defective
Surface Flaws
Total
parts having surface flaws Yes (F ) No (F' )
being defective and probability Yes (D ) 10 18 28
of the parts without any surface No (D' ) 30 342 372
flaws being defective Total 40 360 400

P( F ) = 40 400 and P( D) = 28 400


F )| =
P( D F )40= P
400 = 400
( D andF )P(PD()F=) 28 10 40
400400 = 10
40

P((D
D |' |FF) )==PP( D
( D ' F )F )P(PF()F=) 400
= 400
10
= 40=
3040 40 10
400 400
30
40

P ( D '| |FF') = P ( D ' FF ')) PP((FF)' )==400 400==40360


360 3018
3018 40
400 400

P ( D '| |FF')')==PP((DD ' FF')' ) PP( (FF' )' )==400


342 360
18 360
400 400 ==
400 360
342
18
360

P ( D ' | F ') = P ( D ' F ') P ( F ') = 342


400
360
400 = 342
360
April 2023 Semester Lecture 2_Probability
38
Example 2-18

There are total 4 conditional


probabilities for that example.

P( F ) = 40 400 and P( D) = 28 400


P( D | F ) = P( D F ) P( F ) = 10
400
40
400 = 10
40

P(D'| F ) = P(D' F ) P(F ) = 30


400
40
400 = 30
40

P ( D | F ') = P ( D F ') P ( F ') = 18


400
360
400 = 360
18

P ( D ' | F ') = P ( D ' F ') P ( F ') = 342


400
360
400 = 342
360

April 2023 Semester Lecture 2_Probability


39
Random Samples

➢ Random means each item is equally likely to be


chosen. If more than one item is sampled, random
means that every sampling outcome is equally likely.
• 2 items are taken from S = {a,b,c} without
replacement.
• Ordered sample space: S = {ab,ac,bc,ba,ca,cb}
• Unordered sample space: S = {ab,ac,bc}

April 2023 Semester Lecture 2_Probability


40
Example: Random Sampling

Problem: A batch of 50 parts contains 10 made by Tool


1 and 40 made by Tool 2. If 2 parts are selected
randomly,
a) What is the probability that the 2nd part came from Tool 2,
given that the 1st part came from Tool 1?
P(E1) = P(1st part came from Tool 1) = 10/50
P(E2 | E1) = P(2nd part came from Tool 2 given that 1st part
came from Tool 1) = 40/49
b) What is the probability that the 1st part came from Tool 1
and the 2nd part came from Tool 2?
P(E1∩E2) = P(1st part came from Tool 1 and 2nd part came
from Tool 2) = (10/50)∙(40/49) = 8/49

April 2023 Semester Lecture 2_Probability


41
Multiplication Rule

➢ The conditional probability can be rewritten to


generalize a multiplication rule.
𝑃(𝐴 ∩ 𝐵) = 𝑃 𝐵 𝐴 𝑃 𝐴 = 𝑃 𝐴 𝐵 𝑃(𝐵)

➢ The last expression is obtained by exchanging the


roles of A and B.

April 2023 Semester Lecture 2_Probability


42
Example 2-19: Machining Stages

Problem: The probability that a part made in the 1st


stage of a machining operation meets specifications is
0.90. The probability that it meets specifications in the 2nd
stage, given that met specifications in the first stage is
0.95.What is the probability that both stages meet
specifications?
Solution: Let A and B denote the events that the part
has met 1st and 2nd stage specifications, respectively.
𝑃(𝐴 ∩ 𝐵) = 𝑃 𝐵 𝐴 𝑃(𝐴)
= 0.95·0.90 = 0.855

April 2023 Semester Lecture 2_Probability


43
Two Mutually Exclusive Subsets

• 𝐴 and 𝐴′ are mutually


exclusive.
• 𝐴 ∩ 𝐵 and 𝐴′ ∩ 𝐵 are
mutually exclusive
𝐵 = 𝐴 ∩ 𝐵 ∪ 𝐴′ ∩ 𝐵
𝐵 = (𝐵 ∩ 𝐴) ∪ (𝐵 ∩ 𝐴′ )

Total Probability Rule


For any two events A and B
𝑃 𝐵 = 𝑃 𝐵 ∩ 𝐴 + 𝑃(𝐵 ∩ 𝐴′ )
= 𝑃 𝐵 𝐴 𝑃(𝐴) + 𝑃 𝐵 𝐴′ 𝑃 𝐴′

April 2023 Semester Lecture 2_Probability


Example 2-20: Semiconductor 44
Contamination
Problem: Information about product failure based on
chip manufacturing process contamination is given
below. Find the probability of failure.
Solution: Probability Level of Probability
of Failure Contamination of Level
0.1 High 0.2
0.005 Not High 0.8
Let F denote the event that the product fails.
Let H denote the event that the chip is exposed to high
contamination during manufacture. Then
𝑃 𝐹 = 𝑃 𝐹 ∩ 𝐻 + 𝑃(𝐹 ∩ 𝐻′ ); Total Probability Rule
= 𝑃 𝐹 𝐻 𝑃 𝐻 + 𝑃 𝐹 𝐻 𝑃 𝐻′
= 0.1 ∗ 0.2 + 0.005 ∗ 0.8 = 0.024
April 2023 Semester Lecture 2_Probability
45
Total Probability Rule (Multiple Events)

➢ A collectionof sets E1, E2, … Ek such that


E1 ∪ E2 ∪ … ∪ Ek = S is said to be exhaustive.
➢ Assume E1, E2, … Ek are k mutually exclusive and
exhaustive. Then

𝑃 𝐵 = 𝑃 𝐵 ∩ 𝐸1 + 𝑃 𝐵 ∩ 𝐸2 + ⋯ + 𝑃(𝐵 ∩ 𝐸𝑘 )
= 𝑃 𝐵 𝐸1 𝑃 𝐸1 + 𝑃 𝐵 𝐸2 𝑃 𝐸2 + ⋯ + 𝑃 𝐵 𝐸𝑘 𝑃 𝐸𝑘
April 2023 Semester Lecture 2_Probability
46
Example: Semiconductor Failures-1
Continuing the discussion Probability Level of Probability
of contamination during of Failure Contamination of Level
chip manufacture, find the 0.100 High 0.2
0.010 Medium 0.3
probability of failure.
0.001 Low 0.5
[3 levels of contamination]

April 2023 Semester Lecture 2_Probability


47
Example: Semiconductor Failures-2

Solution: (Equation Approach)


• Let F denote the event that a chip fails
• Let H denote the event that a chip is exposed to high
levels of contamination
• Let M denote the event that a chip is exposed to medium
levels of contamination
• Let L denote the event that a chip is exposed to low
levels of contamination.
Using Total Probability Rule,
P(F) = P(F | H)P(H) + P(F | M)P(M) + P(F | L)P(L)
= (0.1)(0.2) + (0.01)(0.3) + (0.001)(0.5)
= 0.0235

April 2023 Semester Lecture 2_Probability


48
Event Independence

➢ Ifthe knowledge of the outcome of event A does not


affect the probability of the outcome of event B, A and
B are independent.
➢ Two events are independent if any one of the following
equivalent statements is true:
1. P(A | B) = P(A)
2. P(B | A) = P(B)
3. P(A ∩ B) = P(A)·P(B)
➢ This means that occurrence of one event has no
impact on the probability of occurrence of the other
event.

April 2023 Semester Lecture 2_Probability


49
Example 2-21: Independence - 1

Two parts are selected randomly from a bin of 50 parts


by taking one at a time. Assume that the selected part is
replaced before the next one is selected. The bin
contains 3 defective parts and 47 non-defective parts.
What is the probability that the second part is defective
given that the first part is defective?
Solution:
Let A is the event of first part is defective and B is the
event of second part is defective.
When replaced, the bin still contains 50 parts, of which 3
are defective.
So, P(B | A) = 3/50

April 2023 Semester Lecture 2_Probability


50
Example 2-21: Independence - 2

What is the probability that the both parts are defective?


Solution:
So, P(A ∩ B) = P(B | A) ·P(A)
= 3/50 * 3/50
= 9/2500

April 2023 Semester Lecture 2_Probability


51
Example 2-22

Two parts are selected randomly from a bin of 50 parts


by taking one at a time. Assume that the selected part is
not replaced before the next one is selected. The bin
contains 3 defective parts and 47 non-defective parts.
What is the probability that the second part is defective
given that the first part is defective?
Solution:
Let A is the event of first part is defective and B is the
event of second part is defective.
When replaced, the bin contains 49 parts, of which 2 are
defective.
So, P(B | A) = 2/49

April 2023 Semester Lecture 2_Probability


52
Example 2-22

What is the probability that the both parts are defective?


Solution:
So, P(A ∩ B) = P(B | A) ·P(A)
= 2/49 * 3/50
= 9/2450

April 2023 Semester Lecture 2_Probability


53
Independence with Multiple Events

The events E1, E2, … , Ek are independent if and only if,


for any subset of these events:

𝑃 𝐸𝑖1 ∩ 𝐸𝑖2 ∩ ⋯ ∩ 𝐸𝑖𝑘 = 𝑃 𝐸𝑖1 × 𝑃 𝐸𝑖2 × ⋯ × 𝑃(𝐸𝑖𝑘 )

April 2023 Semester Lecture 2_Probability


54
Example: Semiconductor Wafers

Problem: Assume the probability that a wafer contains a large


particle of contamination is 0.01 and that the wafers are
independent; that is, the probability that a wafer contains a large
particle does not depend on the characteristics of any of the other
wafers. If 15 wafers are analyzed, what is the probability that no
large particles are found?
Solution:
Let Ei denote the event that the i-th wafer contains no large
particles, i = 1, 2, …,15.
Then , P(Ei) = 0.99.
The required probability is 𝑃 𝐸1 ∩ 𝐸2 ∩ ⋯ ∩ 𝐸15 .
From the assumption of independence,
𝑃 𝐸1 ∩ 𝐸2 ∩ ⋯ ∩ 𝐸15 = 𝑃 𝐸1 × 𝑃 𝐸2 × ⋯ × 𝑃(𝐸15 )
= (0.99)15
= 0.86

April 2023 Semester Lecture 2_Probability


55
Example: Flaws and Functions
Table 1 provides an example of 400 parts classified by surface flaws
and as (functionally) defective. Suppose that the situation is different
and follows Table 2. Let F denote the event that the part has surface
flaws. Let D denote the event that the part is defective.

The data shows whether the events are independent.


Table 1: Parts Classified Table 2: Parts Classified (data changed)
Surface Flaws Surface Flaws
Defective Yes (F) No (F') Total Defective Yes (F) No (F') Total
Yes (D) 10 18 28 Yes (D) 2 18 20
No (D') 30 342 372 No (D') 38 342 380
Total 40 360 400 Total 40 360 400

P(D|F) = 10/40 = 0.25 P(D|F) = 2/40 = 0.05


P(D) = 28/400 = 0.07 P(D) = 20/400 = 0.05

They are not same. They are same.


So, D and F are not independent. So, D and F are independent.

April 2023 Semester Lecture 2_Probability


Bayes’ Theorem 56

➢ Thomas Bayes (1702-1761) was an English


mathematician and Presbyterian minister.
➢ His idea was that we observe conditional probabilities
through prior information.
➢ Bayes’ theorem states that,

April 2023 Semester Lecture 2_Probability


57
Example 2-26

Problem: Find the conditional probability of the presence of


high level of contamination when a failure occurred from the
following information.
Probability Level of Probability
of Failure Contamination of Level
0.1 High 0.2
0.005 Not High 0.8
Solution:
Let F denote the event that the product fails, and let H denote the event
that the chip is exposed to high levels of contamination.
𝑃(𝐹|𝐻) × 𝑃(𝐻) 0.10 × 0.20
𝑃(𝐻|𝐹) = = = 0.83
𝑃(𝐹) 0.024
𝑃(𝐹) = 𝑃(𝐹|𝐻) × 𝑃(𝐻) + 𝑃(𝐹|𝐻′ ) × 𝑃(𝐻′ )
= 0.1 × 0.2 + 0.005 × 0.8 = 0.024

April 2023 Semester Lecture 2_Probability


58
Bayes Theorem with Total Probability

If E1, E2, … Ek are k mutually exclusive and exhaustive


events and B is any event,

P ( B | E1 ) P ( E1 )
P ( E1 | B ) =
P ( B | E1 ) P ( E1 ) + P ( B | E2 ) P ( E2 ) + ... + P ( B | Ek ) P ( Ek )

where P(B) > 0

Note : Numerator expression is always one of the terms


in the sum of the denominator.

April 2023 Semester Lecture 2_Probability


59
Example 2-27: Medical Diagnostic

Problem: A new medical procedure has been shown to be


effective in the early detection of an illness. The probability
that the test correctly identifies someone with the illness as
positive is 0.99, and the probability that the test correctly
identifies someone without the illness as negative is 0.95. The
incidence of the illness in the general population is 0.0001.
You take the test, and the result is positive. What is the
probability that you have the illness?

Solution:
Let D denote the event of having the illness, and
S denote the event that the test signals positive.
N denote the event that the test signals positive.
P(D) = 0.0001
P(S | D) = 0.99
P(N | D') = 0.95
April 2023 Semester Lecture 2_Probability
60
Example 2-27: Medical Diagnostic - 2

The probability that the test correctly signals someone without


the illness as negative is 0.95. Consequently, the probability
of a positive test without the illness is
P(S | D′) = 1 – 0.95 = 0.05

So, The probability of having the illness if the test result is


positive can be denoted as P(D | S).

𝑃(𝑆|𝐷)𝑃(𝐷) 𝑃(𝑆|𝐷)𝑃(𝐷)
𝑃 𝐷𝑆 = =
𝑃(𝑆) 𝑃 𝑆 𝐷 𝑃 𝐷 + 𝑃 𝑆 𝐷′ 𝑃(𝐷′)
0.99(0.0001) 1
= = = 0.002
0.99(0.0001) + 0.05(1 − 0.0001) 506

April 2023 Semester Lecture 2_Probability


61
Example: Bayesian Network

Problem: A printer manufacturer obtained the following three


types of printer failure probabilities. Hardware P(H) = 0.3,
software P(S) = 0.6, and other P(O) = 0.1. Also, P(F | H) =
0.9, P(F | S) = 0.2, and P(F | O) = 0.5. If a failure occurs,
determine the most likely type of failure.
P( F ) = P( F | H ) P( H ) + P( F | S ) P ( S ) + P ( F | O) P (O )
= 0.9(0.1) + 0.2(0.6) + 0.5(0.3) = 0.36
P( F | H )  P( H ) 0.9  0.1
P( H | F ) = = = 0.250
P( F ) 0.36
P( F | S )  P( S ) 0.2  0.6
P( S | F ) = = = 0.333
P( F ) 0.36
P( F | O)  P(O) 0.5  0.3
P(O | F ) = = = 0.417
P( F ) 0.36
Note that the conditionals given failure add to 1. Because P(O | F) is
largest, the most likely cause of the problem is in the other category.
April 2023 Semester Lecture 2_Probability
62
Random Variable and its Notation

➢ A variable that associates a number with the outcome


of a random experiment is called a random variable.
➢ A random variable is a function that assigns a real
number to each outcome in the sample space of a
random experiment.
➢ A random variable is denoted by an uppercase letter
such as X. After the experiment is conducted, the
measured value of the random variable is denoted by a
lowercase letter such as
x = 70 milliamperes. X and x are shown in italics, e.g.,
P(X = x).

April 2023 Semester Lecture 2_Probability


Discrete & Continuous Random 63
Variables
➢ A discrete random variable is a random
variable with a finite or countably infinite range.
Its values are obtained by counting.
➢ A continuous random variable is a random
variable with an interval (either finite or infinite)
of real numbers for its range. Its values are
obtained by measuring.

April 2023 Semester Lecture 2_Probability


Examples of Discrete & Continuous Random 64
Variables

➢ Discrete random variables:


• Number of scratches on a surface.
• Proportion of defective parts among 100 tested.
• Number of transmitted bits received in error.
• Number of common stock shares traded per day.
➢ Continuous random variables:
• Electrical current and voltage.
• Physical measurements, e.g., length, weight, time,
temperature, pressure.

April 2023 Semester Lecture 2_Probability


Thank you

Acknowledgement: Most of the slides of this lecture are based on “Applied Statistics
and Probability for Engineers”. Seventh Edition. D. C. Montgomery, and G. C. Runger,
Wiley, 2018.

April 2023 Semester Lecture 2_Probability

You might also like