CH 02
CH 02
1
Course Learning Outcomes
The students who succeeded in this course;
• use fundamental concepts such as sample space, events
and counting techniques.
• explain concepts of probability.
• use conditional probability, the total probability rule and
Bayes' theorem.
• compute discrete and continuous random variables.
• investigate the advantages of joint probability
distributions.
• find mean and variance of random variables.
• apply discrete and continuous distributions.
• examine the relationship between two random variables. 2
Applied Statistics and Probability for
Engineers
Seventh Edition
Douglas C. Montgomery George C. Runger
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 3
Importance of Statistics
4
Variability
• Statistical techniques are useful to describe
and understand variability.
• By variability, we mean successive observations
of a system or phenomenon that do not produce
exactly the same result.
• Statistics gives us a framework for describing this
variability and for learning about potential
sources of variability.
5
Why Study Probability and
Statistics?
• Many problems we face in daily life involve some degree of
uncertainty
6
Figure: Fundamental relationship between probability and inferential statistics.
7
Where We Use Statistics and
Probability in Daily Life?
• Gambling, sports, and games industry
• Insurance industry
• Meteorology and weather forecasting
• Economics
• Manufacturing
• Medicine
• Social sciences
• Computer science
• Research
8
Applied Statistics and Probability
for Engineers
Seventh Edition
Douglas C. Montgomery George C. Runger
Chapter 2
Probability
Chapter 2 Title Slide
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 9
2 Probability
CHAPTER OUTLINE
Chapter 2 Contents
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 10
Random Experiment
• An experiment is a procedure that is
• carried out under controlled conditions, and
• executed to discover an unknown result
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 11 11
Sample Spaces
The set of all possible outcomes of a random experiment is called the sample
space, 𝑆.
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 12
Example 2.1 | Camera Flash
• Randomly select a camera and record the recycle time of a flash. 𝑆 =
𝑅 = {𝑥 | 𝑥 > 0}, the positive real numbers.
• Suppose it is known that all recycle times are between 1.5 and 5 seconds.
Then 𝑆 = {𝑥 | 1.5 < 𝑥 < 5} is continuous.
• It is known that the recycle time has only three values (low, medium or
high). Then 𝑆 = {𝑙𝑜𝑤, 𝑚𝑒𝑑𝑖𝑢𝑚, ℎ𝑖𝑔ℎ} is discrete.
• Does the camera conform to minimum recycle time specifications?
𝑆 = {𝑦𝑒𝑠, 𝑛𝑜} is discrete.
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 13
Discrete and Continuous Sample
Spaces
• A sample space is discrete if it is a countable set (finite or
infinite).
• The experiments involving flipping coins and rolling dice are discrete
cases.
• The sample space is continuous if it is an uncountable set
(finite or infinite).
• The experiment involving dart throwing is a continuous case.
14
Example/Sample Space
1. S = R+ = { x | x > 0}
2. S = { x | 10 < x < 11}
3. S = {low, medium, high}
4. S = {3, 6, 10}
5. S = {yes, no}
6. S = {1, 2, 3, 4, 5, …}
15
Defining Sample Spaces
• Suppose that the recycle times of two cameras are recorded.
S = R+ × R+.
If the objective is only to evaluate whether or not the cameras conform
to the manufacturing specifications, either camera may or may not
conform.
We abbreviate yes and no as y and n. Define the sample space.
16
Example 2.3 | Message Delays
Messages are classified as on-time or late within the time specified by
the system design. Use a tree diagram to represent the sample space
of possible outcomes.
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 17
Events
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 18
• Random experiment: Rolling a die.
• B: Rolling doubles
Event combinations
• The union of two events consists of all outcomes that are contained in either of the two
events, denoted as 𝐸1 ∪ 𝐸2.
• The intersection of two events is the event that consists of all outcomes that are contained
in both of the two events, denoted as 𝐸1 ∩ 𝐸2.
• The complement of an event in a sample space is the set of outcomes in the sample
space that are not in the event. We denote the complement of the event 𝐸 as 𝐸′.
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 20
Example 2.4 | 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.
Consider the sample space 𝑆 = {𝑦𝑦, 𝑦𝑛, 𝑛𝑦, 𝑛𝑛}.
• Suppose that the subset of outcomes for which at least one camera conforms is denoted as 𝐸1.
Then, 𝐸1 = {𝑦𝑦, 𝑦𝑛, 𝑛𝑦}.
• Suppose that the subset of outcomes for which both cameras do not conform, denoted as 𝐸2,
contains only the single outcome, 𝐸2 = {𝑛𝑛}.
• Other examples of events are 𝐸3 = Ø, the null set, and 𝐸4 = 𝑆, the sample space.
• If 𝐸5 = {𝑦𝑛, 𝑛𝑦, 𝑛𝑛}, 𝐸 ∪ 𝐸 = 𝑆, 𝐸 ∩ 𝐸 = 𝑦𝑛, 𝑛𝑦 , 𝐸 = 𝑛𝑛
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 21
Example 2.5 | Camera Recycle Time
Camera recycle times might use the sample space S = R+.
Let E1 = {x | 10 ≤ x < 12} and E2 = {x | 11 < x < 15}
Then,
and
Also
And
Section 2.1.3 Events Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 22
Venn Diagrams
We can use Venn diagrams to represent a sample space and events in a
sample space.
Section 2.1.3 Events Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 23
Venn Diagrams/Laws
• Commutative law (event order is unimportant):
– A U B = B U A and A ∩ B = B ∩ A
24
Venn Diagrams/Laws
• DeMorgan’s law:
– (A U B) = A ∩ B The complement of the union is the
intersection of the complements.
– (A ∩ B) = A U B The complement of the intersection
is the union of the complements.
• Complement law:
(A) = A.
25
Figure Events represented by various regions
Copyright © 2017 2 - 26
Mutually Exclusive Events
Section 2.1.3 Events Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved
2-28
Example
An electrical engineer has on hand two boxes of resistors, with four
resistors in each box. The resistors in the first box are labeled 10
ohms but in fact their resistances are 9, 10, 11, and 12 ohms. The
resistors in the second box are labeled 20 but in fact their
resistances are 18, 19, 20, and 21 ohms. The engineer chooses
one resistor from each box and determines the resistance of each.
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 30
Counting – Multiplication Rule
Assume an operation can be described as a sequence of k steps, and
• The number of ways to complete step 1 is n1, and
• The number of ways to complete step 2 is n2 for each way to complete step 1, and
• The number of ways to complete step 3 is n3 for each way to complete step 2, and
so fourth
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 31
Example 2.7 | Web Site Design
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 32
Example/Tree Diagram
• An automobile manufacturer provides vehicles equipped with selected
options. Each vehicle is ordered
–With or without an automatic transmission If the sample
–With or without air conditioning space consists
–With one of three choices of a stereo system of the set of all
possible vehicle
–With one of four exterior colors types,
what is the
number of
outcomes in the
sample space?
33
Counting – Permutations
A permutation of the elements is an ordered sequence of the elements
Example How many different ways can 5 exactly the same math books
be arranged on a shelf?
Section 2.2 Counting Techniques
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 34
Counting – Permutations
Permutations of Subsets
The number of permutations of subsets of r elements selected from a set of n different
elements is
n!
r
n
P n(n 1)(n 2)...(n r 1)
(n r )!
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 different designs are possible?
8! 8 7 6 5 4!
Answer: P48 8 7 6 5 1,680 different designs are possible
(8 4)! 4!
Section 2.2 Counting Techniques
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 35
Counting – Permutations
Permutations of Similar Objects
n!
n1 !n2 ! ... nr !
5! 5 4 3!
= = 10
2! 3! 2 1 3!
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 37
Counting – Combinations
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 38
Example 2.11a | Sampling without Replacement
• 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?
• The number of different ways this step can be completed is
3!
= 3 different ways
2! 1!
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 39
Example 2.11b | Sampling without Replacement
The second step is to select the remaining 4 parts form the 47 acceptable parts in the bin.
The number of different ways the second step can be completed is
47! 47 46 45 44 43!
= = 178, 365 different ways
4! 43! 4 3 2 1 43!
Section 2.2 Counting Techniques Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 40
Example 2.11c | Sampling without Replacement
Therefore, from the multiplication rule, the number of subsets of size 6 that
contain exactly 2 defective parts is
3 178, 365 = 535, 095
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 41
Example
E
d1
A B C D
By using points A, B, C, D and E as edges, how many
different triangles can be drawn?
42
Counting Techniques
Consider a set of elements, such as S ={a, b, c}.
A permutation of the elements is an In combinations, order is not important.
ordered sequence of the elements.
3! 3!
= 6/1 = 6 = 6/2 = 3
(3-2)! 2!(3-2)! 43
Interpretations and Axioms of Probability
• Probability is used to quantify the likelihood, or chance, that an outcome of a random
experiment will occur
• The likelihood of an outcome is quantified by assigning a number from the interval [0,1] to
the outcome (or a percentage from 0 to 100%)
• 0 indicates an outcome will not occur
• 1 indicates that an outcome will occur with certainty
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 44
Interpretations and Axioms of Probability
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 45
Interpretations and Axioms of Probability
For example, suppose that we select 1 laser diode randomly from a batch of 100.
Randomly implies that it is reasonable to assume that each diode in the batch has an
equal chance of being selected. The probability model for this experiment assigns
probability of 0.01 to each of the 100 outcomes, because each outcome in the sample
space is equally likely
Sample Space
47
Interpretations and Axioms of Probability
For a discrete sample space, the probability of an event can be defined by the reasoning
used in the preceding example
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 48
Example 2.13 | Probabilities of Events
A random experiment can result in one of the outcomes {a, b, c, d} with probabilities 0.1, 0.3, 0.5, 0.1,
respectively
Let A denote the event {a, b}, B the event {b, c, d}, and C the event {d}
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 49
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:
1. P(S) = 1
2. 0 ≤ P(E) ≤ 1
3. For any two events E1 and E2 with 𝐸1 ∩ 𝐸2 = Ø,
𝑃(𝐸1 ∪ 𝐸 = 𝑃(𝐸1) + 𝑃(𝐸2)
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 50
Unions of Events and Addition Rules
Joint events are generated by applying basic set operations to individual events,
specifically:
• Unions of events, 𝐴 ∪ 𝐵
• Intersections of events, 𝐴 ∩ 𝐵
• Complements of events, 𝐴
Probabilities of joint events can often be determined from the probabilities of the individual
events it comprises
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 51
Example 2.15a | Semiconductor Wafers
A wafer is randomly selected from a batch of 940 wafers in a semiconductor
manufacturing process
• Let H denote the event that the wafer contains high levels of contamination
• Then P(H) = 358/940.
• Let C denote the event of the wafer is in center of a sputtering tool
• Then P(C) = 626/940.
Location of Tool
Contamination Total
Center Edge
Low 514 68 582
High 112 246 358
Total 626 314 940
54
Example
55
Example
HH.TT HT TH
E 41,231
5 P gett ng
PLEI P gett ng pgett ng2
5 1 2 3 415 64
FaIaFa 1
a
56
Example
Elys an
ŞEY
Fg
57
Example
and
0
• A bin of 50 parts contains 3 defectives and 47 non-
0 from
defective parts. A sample of 6 parts is selected
the 50 without replacement.
• a) what is the probability that a sample contains no
defective parts?
58
Example
• 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.
• b) what is the probability that a sample contains
exactly two defective parts?
59
Dart Throwing
y – what is the probability of your
dart will hit the area (x + y ≤
1 1/2)?
the area of tr angle
1/2 the area of square
x
1/2 1
60
Addition Rule
3
• Rolling 1 die – what is the probability of rolling a
prime number or a number > 4 ?
Asroll ng a pr me number A 213,51 AnB 451
B amber 14 B 15,61 63
1 B _planB
Conditional Probability
• The probability of an event B under the knowledge that the outcome will be in
event A is called the conditional probability of B given A, denoted as 𝑃(𝐵 | 𝐴)
• A digital communications channel has an error rate of 1 per 1000 bits transmitted.
Errors are rare, occur in bursts. If a single bit is transmitted, we might model the
probability of an error as 1/1000. However, if the previous bit was in error
because of the bursts, we might believe that the probability that the next bit will
be in error is greater than 1/1000.
65
Example (HW)
A target on a test firing range consists of a bull’s-eye with
two concentric rings around it. A projectile is fired at the
target. The probability that it hits the bull’s-eye is 0.10, the
probability that it hits the inner ring is 0.25, and the
probability that it hits the outer ring is 0.45.
1. What is the probability that the projectile hits the target?
2. What is the probability that it misses the target?
Example (HW)
TEE 3,31
Section 2.5 Conditional Probability
çıkarıyoruz
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 68
Conditional Probability
This definition can be understood in a special case in which all outcomes of a random experiment are
equally likely. If there are N total outcomes,
𝑃(𝐴) = (number of outcomes in A) / N
𝑃(𝐴 ∩ 𝐵) = (number of outcomes in 𝐴 ∩ 𝐵) / N
𝑃(𝐵 | 𝐴) = (number of outcomes in 𝐴 ∩ 𝐵) / (number of outcomes in A)
Solution
73
Random Samples
Section 2.6 Intersections of Events and Multiplication and Total Probability Rules
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 75
Example 2.19 | Machining Stages
The probability that the 1st stage of a numerically controlled 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.
• Let A and B denote the events that the 1st and 2nd stages meet specifications, respectively.
• 𝑃(𝐴 ∩ 𝐵) = 𝑃(𝐵 | 𝐴) · 𝑃(𝐴) = 0.95 · 0.90 = 0.855
Section 2.6 Intersections of Events and Multiplication and Total Probability Rules
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 76
Independence
The probabilities that the devices function are shown. Assume that the devices fail
independently.
Top (T)
0.9
5
0.8 0.9
0.9
Left (L) Right (R) 5
There is only a path if both Bottom (B)
devices function. There is a path if at least one device functions.
What is the probability that the What is the probability that the system functions?
system functions?
Top (T)
0.9
5
0.8 0.9
0.9
Left (L) Right (R) 5
Bottom (B)
P(L and R) = P(T or B) =
Example
86
Figure 2.9 An electrical system for Example
P(L1 or L2 or L3) =
Total Probability Rule
• A and A are mutually exclusive.
• 𝐴 ∩ 𝐵 and 𝐴 ∩ 𝐵 are mutually exclusive
• 𝐵 = 𝐴 ∩ 𝐵 ∪ (𝐴 ∩ 𝐵)
Total Probability Rule
For any two events A and B
Section 2.6 Intersections of Events and Multiplication and Total Probability Rules
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 90
Example 2.20 | Semiconductor Contamination
Information about product failure based on chip manufacturing process contamination is given
below. Find the probability of failure.
Section 2.6 Intersections of Events and Multiplication and Total Probability Rules
Copyright © 2019 John Wiley & Sons, Inc. All Rights Reserved 92
Total Probability Rule-Example
Sometimes the probability of an event is given under each of
several conditions. With enough of these conditional
probabilities, the probability of the event can be recovered.
However, you also find out that the probability of product failure is 0.005, when a chip is not
exposed to high levels of contamination during manufacturing.
In addition, you know that in a particular run, 20% of the chips are exposed to high levels of
contamination.
By using all these information, you want to learn the probability that a product using one of
these chips fails. How would you calculate it?
Total Probability Rule-Example
• The probability of product failure is 0.10, given that a chip is exposed to high levels of
contamination.
• The probability of product failure is 0.005, given that a chip is not exposed to high levels of
contamination.
• In a particular run, 20% of the chips are exposed to high levels of contamination.
What is the probability that a product using one of these chips fails?
F: the event that the product fails H: the event that the chip is exposed
to high levels of contamination
FC : the event that the HC : the event that the chip is not
product does not fail exposed to high levels of
contamination
Total Probability Rule-Example
F H P(H)= P(F|H) =
P(HC) = P(F|HC) =
P(F|H) = P(F|HC) =
P(F) =
Example
Note:
Numerator expression is always one of the terms in the sum of the denominator.
103
Example: Medical Diagnostic
The proportion of people in a given community who have a certain
disease is 0.005. A test is available to diagnose the disease. If a
person has the disease, the probability that the test will produce a
positive signal is 0.99. If a person does not have the disease, the
probability that the test will produce a positive signal is 0.01. If a
person tests positive, what is the probability that the person actually
has the disease?
Random Variables
• The variable that associates a number with the outcome of a random experiment is referred to
as a random variable
• Notation is used to distinguish between a random variable and the real number