Chapter 2: Probability: Course Name: Probability & Statistics
Chapter 2: Probability: Course Name: Probability & Statistics
Hanoi, 2024
6 2.6 Independence
Content
6 2.6 Independence
Random Experiment
An experiment that can result in different outcomes, even though
it is repeated in the same manner every time, is called a random
experiment.
Random Experiment
An experiment that can result in different outcomes, even though
it is repeated in the same manner every time, is called a random
experiment.
Examples of random experiment:
- Tossing a coin and watching the face appear;
Random Experiment
An experiment that can result in different outcomes, even though
it is repeated in the same manner every time, is called a random
experiment.
Examples of random experiment:
- Tossing a coin and watching the face appear;
- Measuring rainfall in Hanoi city in January;
Random Experiment
An experiment that can result in different outcomes, even though
it is repeated in the same manner every time, is called a random
experiment.
Examples of random experiment:
- Tossing a coin and watching the face appear;
- Measuring rainfall in Hanoi city in January;
- Randomly selecting 10 people and measuring their height.
Sample Space
The set of all possible outcomes of a random experiment is called the
sample space of the experiment. The sample space is denoted as S.
Sample Space
The set of all possible outcomes of a random experiment is called the
sample space of the experiment. The sample space is denoted as S.
A sample space is discrete if it consists of a finite or countable
infinite set of outcomes.
Sample Space
The set of all possible outcomes of a random experiment is called the
sample space of the experiment. The sample space is denoted as S.
A sample space is discrete if it consists of a finite or countable
infinite set of outcomes.
A sample space is continuous if it contains an interval (either finite
or infinite) of real numbers.
Example 1
Consider an experiment in which you select a molded plastic part,
such as a connector, and measure its thickness. If it is known
that all connectors will be between 10 and 11 millimeters thick, the
sample space could be
Example 1
Consider an experiment in which you select a molded plastic part,
such as a connector, and measure its thickness. If it is known
that all connectors will be between 10 and 11 millimeters thick, the
sample space could be
S = {x | 10 < x < 11},
Example 1
Consider an experiment in which you select a molded plastic part,
such as a connector, and measure its thickness. If it is known
that all connectors will be between 10 and 11 millimeters thick, the
sample space could be
S = {x | 10 < x < 11},
which is an example of a continuous sample space.
Example 1
Consider an experiment in which you select a molded plastic part,
such as a connector, and measure its thickness. If it is known
that all connectors will be between 10 and 11 millimeters thick, the
sample space could be
S = {x | 10 < x < 11},
which is an example of a continuous sample space.
If the objective of the analysis is to consider only whether or not
a particular part conforms to the manufacturing specifications, the
sample space might be simplified to the set of two outcomes
Example 1
Consider an experiment in which you select a molded plastic part,
such as a connector, and measure its thickness. If it is known
that all connectors will be between 10 and 11 millimeters thick, the
sample space could be
S = {x | 10 < x < 11},
which is an example of a continuous sample space.
If the objective of the analysis is to consider only whether or not
a particular part conforms to the manufacturing specifications, the
sample space might be simplified to the set of two outcomes
S = {yes, no},
Example 1
Consider an experiment in which you select a molded plastic part,
such as a connector, and measure its thickness. If it is known
that all connectors will be between 10 and 11 millimeters thick, the
sample space could be
S = {x | 10 < x < 11},
which is an example of a continuous sample space.
If the objective of the analysis is to consider only whether or not
a particular part conforms to the manufacturing specifications, the
sample space might be simplified to the set of two outcomes
S = {yes, no},
which is a discrete sample space.
Example 2
If two connectors are selected and measured their thickness. Then,
the sample space is
S = {(x1 , x2 ) | 10 < xi < 11, i = 1, 2}.
Example 2
If two connectors are selected and measured their thickness. Then,
the sample space is
S = {(x1 , x2 ) | 10 < xi < 11, i = 1, 2}.
If the objective of the analysis is to consider only whether or not the
parts conform to the manufacturing specifications, the sample space
can be represented by the four outcomes
S = {yy, yn, ny, nn}.
Tree Diagrams
Tree Diagrams
Example 3
Each message in a digital communication system is classified as to
whether it is received within the time specified by the system design. If
three messages are classified, use a tree diagram to represent the sample
space of possible outcomes.
Event
An event is a subset of the sample space of a random experiment.
Event
An event is a subset of the sample space of a random experiment.
Event
An event is a subset of the sample space of a random experiment.
Event
An event is a subset of the sample space of a random experiment.
Example 4
Consider the sample space S = {yy, yn, ny, nn} in Example 2. Suppose
that the subset of outcomes for which at least one part conforms is
denoted as E1 .
Example 4
Consider the sample space S = {yy, yn, ny, nn} in Example 2. Suppose
that the subset of outcomes for which at least one part conforms is
denoted as E1 . Then E1 = {yy, yn, ny}.
Example 4
Consider the sample space S = {yy, yn, ny, nn} in Example 2. Suppose
that the subset of outcomes for which at least one part conforms is
denoted as E1 . Then E1 = {yy, yn, ny}.
The event in which both parts do not conform, denoted as E2 = {nn}.
Example 4
Consider the sample space S = {yy, yn, ny, nn} in Example 2. Suppose
that the subset of outcomes for which at least one part conforms is
denoted as E1 . Then E1 = {yy, yn, ny}.
The event in which both parts do not conform, denoted as E2 = {nn}. If
E3 = {yn, ny, nn},
Example 4
Consider the sample space S = {yy, yn, ny, nn} in Example 2. Suppose
that the subset of outcomes for which at least one part conforms is
denoted as E1 . Then E1 = {yy, yn, ny}.
The event in which both parts do not conform, denoted as E2 = {nn}. If
E3 = {yn, ny, nn},
0
E1 ∪ E3 = S, E1 ∩ E3 = {yn, ny}, E1 = {nn}.
Note
0 0
(E ) = E.
(A ∪ B) ∩ C = (A ∩ C) ∪ (B ∩ C) and
(A ∩ B) ∪ C = (A ∪ C) ∩ (B ∪ C).
DeMorgan’s laws imply that
0 0 0 0 0 0
(A ∪ B) = A ∩ B and (A ∩ B) = A ∪ B .
Counting Techniques
n1 × n2 × ... × nk .
Counting Techniques
Example 5
In the design of a casing for a gear housing, we can use four different types
of fasteners, three different bolt lengths, and three different bolt locations.
From the multiplication rule 4 × 3 × 3 = 36 different designs are possible.
Counting Techniques
Permutations
Consider a set of elements, such as S = {a, b, c}. A permutation of the
elements is an ordered sequence of the elements. For example,
abc, acb, bac, bca, cab, and cba are all of the permutations of the elements
of S.
The number of permutations of n different elements is n! where
n! = n × (n − 1) × ... × 2 × 1.
Counting Techniques
Permutations
Consider a set of elements, such as S = {a, b, c}. A permutation of the
elements is an ordered sequence of the elements. For example,
abc, acb, bac, bca, cab, and cba are all of the permutations of the elements
of S.
The number of permutations of n different elements is n! where
n! = n × (n − 1) × ... × 2 × 1.
Permutations of Subsets
The number of permutations of subsets of r elements selected from a set
of n different elements is
n!
Prn = n × (n − 1) × ... × (n − r + 1) = (n−r)! .
Counting Techniques
Combinations
Another counting problem of interest is the number of subsets of r
elements that can be selected from a set of n elements. Here, order is not
important. These are called combinations.
n!
The number of combinations is denoted as Crn = r!(n−r)! .
Counting Techniques
Example 6
A printed circuit board has 8 different locations in which a component can
be placed.
If 4 different components are to be placed on the board,
Counting Techniques
Example 6
A printed circuit board has 8 different locations in which a component can
be placed.
If 4 different components are to be placed on the board,
each design consists of selecting a location from the 8 locations for
the first component,
Counting Techniques
Example 6
A printed circuit board has 8 different locations in which a component can
be placed.
If 4 different components are to be placed on the board,
each design consists of selecting a location from the 8 locations for
the first component,
a location from the remaining 7 for the second component,
Counting Techniques
Example 6
A printed circuit board has 8 different locations in which a component can
be placed.
If 4 different components are to be placed on the board,
each design consists of selecting a location from the 8 locations for
the first component,
a location from the remaining 7 for the second component,
a location from the remaining 6 for the third component, and
Counting Techniques
Example 6
A printed circuit board has 8 different locations in which a component can
be placed.
If 4 different components are to be placed on the board,
each design consists of selecting a location from the 8 locations for
the first component,
a location from the remaining 7 for the second component,
a location from the remaining 6 for the third component, and
a location from the remaining 5 for the fourth component.
Counting Techniques
Example 6
A printed circuit board has 8 different locations in which a component can
be placed.
If 4 different components are to be placed on the board,
each design consists of selecting a location from the 8 locations for
the first component,
a location from the remaining 7 for the second component,
a location from the remaining 6 for the third component, and
a location from the remaining 5 for the fourth component.
Therefore, P48 = 8 × 7 × 6 × 5 = 1680 different designs are possible.
Counting Techniques
Example 6
A printed circuit board has 8 different locations in which a component can
be placed.
If 4 different components are to be placed on the board,
each design consists of selecting a location from the 8 locations for
the first component,
a location from the remaining 7 for the second component,
a location from the remaining 6 for the third component, and
a location from the remaining 5 for the fourth component.
Therefore, P48 = 8 × 7 × 6 × 5 = 1680 different designs are possible.
If 5 identical components are to be placed on the board, the number
8!
of possible designs is C58 = 5!3! = 56.
Exercise 1
Provide a reasonable description of the sample space for each of the
random experiments:
a) Each of three machined parts is classified as either above or below the
target specification for the part.
b) The number of hits (views) is recorded at a high-volume Web site in a
day.
c) Each of 24 Web sites is classified as containing or not containing banner
ads
d) The time of a chemical reaction is recorded to the nearest millisecond.
e) Calls are repeatedly placed to a busy phone line until a connection is
achieved.
Exercise 2
A digital scale is used that provides weights to the nearest gram.
a) What is the sample space for this experiment?
Let A denote the event that a weight exceeds 11 grams, let B denote the
event that a weight is less than or equal to 15 grams, and let C denote the
event that a weight is greater than or equal to 8 grams and less than 12
grams.
Describe the following events.
0
b)A ∪ B c)A ∩ B d)A e)A ∪ B ∪ C
0 0
f )(A ∪ C) g)B ∩ C
Exercise 3
A sample of two items is selected without replacement from a batch. Describe
the (ordered) sample space for each of the following batches:
a) The batch contains the items {a, b, c, d}.
b) The batch contains the items {a, b, c, d, e, f, g}.
c) The batch contains 4 defective items and 20 good items.
d) The batch contains 1 defective item and 20 good items.
Exercise 4
A batch of 140 semiconductor chips is inspected by choosing a sample of five
chips. Assume 10 of the chips do not conform to customer requirements.
a) How many different samples are possible?
b) How many samples of five contain exactly one nonconforming chip?
c) How many samples of five contain at least one nonconforming chip?
Content
6 2.6 Independence
Probability of an Event
• a priori classical probability
X number of ways the event can occur
Probability of Occurrence = = .
T total number of possible outcomes
• empirical classical probability
X number of favorable outcomes observed
Probability of Occurrence = = .
T total number of outcomes observed
Example 7
Find the probability of selecting a face card (Jack, Queen, or King) from a
standard deck of 52 cards.
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:
(S is the sample space and E is any event in a random experiment)
P (S) = 1.
P (∅) = 0.
0
P (E ) = 1 − P (E).
0 ≤ P (E) ≤ 1.
For two events E1 and E2 with E1 ∩ E2 = ∅ :
P (E1 ∪ E2 ) = P (E1 ) + P (E2 ).
Example 8
A random experiment can result in one of the outcomes {a, b, c, d, e} with prob-
abilities 0.1; 0.1; 0.2; 0.4, and 0.2, respectively. Let A denote the event {a, b, c},
and let B denote the event {c, d, e}. Determine the following:
0
a) P (A), P (B), P (A );
b) P (A ∪ B), P (A ∩ B).
Example 8
A random experiment can result in one of the outcomes {a, b, c, d, e} with prob-
abilities 0.1; 0.1; 0.2; 0.4, and 0.2, respectively. Let A denote the event {a, b, c},
and let B denote the event {c, d, e}. Determine the following:
0
a) P (A), P (B), P (A );
b) P (A ∪ B), P (A ∩ B).
Answer: P (A) = 0.1 + 0.1 + 0.2 = 0.4, P (B) = 0.2 + 0.4 + 0.2 = 0.8,
0
P (A ) = 0.6, P (A ∪ B) = P (S) = 1, P (A ∩ B) = 0.2.
Example 8
A random experiment can result in one of the outcomes {a, b, c, d, e} with prob-
abilities 0.1; 0.1; 0.2; 0.4, and 0.2, respectively. Let A denote the event {a, b, c},
and let B denote the event {c, d, e}. Determine the following:
0
a) P (A), P (B), P (A );
b) P (A ∪ B), P (A ∩ B).
Answer: P (A) = 0.1 + 0.1 + 0.2 = 0.4, P (B) = 0.2 + 0.4 + 0.2 = 0.8,
0
P (A ) = 0.6, P (A ∪ B) = P (S) = 1, P (A ∩ B) = 0.2.
Example 9
If the last digit of a weight measurement is equally likely to be any of the digits
0 through 9,
a) What is the probability that the last digit is 0?
b) What is the probability that the last digit is greater than or equal to 5?
Example 8
A random experiment can result in one of the outcomes {a, b, c, d, e} with prob-
abilities 0.1; 0.1; 0.2; 0.4, and 0.2, respectively. Let A denote the event {a, b, c},
and let B denote the event {c, d, e}. Determine the following:
0
a) P (A), P (B), P (A );
b) P (A ∪ B), P (A ∩ B).
Answer: P (A) = 0.1 + 0.1 + 0.2 = 0.4, P (B) = 0.2 + 0.4 + 0.2 = 0.8,
0
P (A ) = 0.6, P (A ∪ B) = P (S) = 1, P (A ∩ B) = 0.2.
Example 9
If the last digit of a weight measurement is equally likely to be any of the digits
0 through 9,
a) What is the probability that the last digit is 0?
b) What is the probability that the last digit is greater than or equal to 5?
Answer: a) P (A) = 0.1, b) P (B) = 0.5.
Exercise 1
Suppose your vehicle is licensed in a state that issues license plates
that consist of three digits (between 0 and 9) followed by three letters
(between A and Z). If a license number is selected randomly, what is
the probability that yours is the one selected?
Exercise 2
A part selected for testing is equally likely to have been produced on any
one of six cutting tools.
a) What is the sample space?
b) What is the probability that the part is from tool 1?
c) What is the probability that the part is from tool 3 or tool 5?
d) What is the probability that the part is not from tool 4?
Exercise 3
Orders for a computer are summarized by the optional features that are
requested as follows:
proportion of orders
no optional features 0.3
one optional feature 0.5
more than one optional feature 0.2
a) What is the probability that an order requests at least one optional
feature?
b) What is the probability that an order does not request more than one
optional feature?
Exercise 4
Samples of emissions from three suppliers are classified for conformance to
air-quality specifications. The results from 100 samples are summarized as
follows:
Content
6 2.6 Independence
Addition Rules
Any two events A; B
P (A ∪ B) = P (A) + P (B) − P (A ∩ B).
If A and B are mutually exclusive events,
P (A ∪ B) = P (A) + P (B).
A collection of events E1 , E2 , ..., Ek is said to be mutually exclusive if
for all pairs
Ei ∩ Ej 6= ∅,
For a collection of mutually exclusive events,
P (E1 ∪ E2 ∪ ... ∪ Ek ) = P (E1 ) + P (E2 ) + ... + P (Ek ).
Addition Rules
Any three events A, B, C
Example 10
If A, B, and C are mutually exclusive events with P (A) = 0.2,
P (B) = 0.3, and P (C) = 0.4, determine the following probabilities:
a) P (A ∪ B ∪ C)
b) P (A ∩ B ∩ C)
c) P (A ∩ B)
d) P [(A ∪ B) ∩ C]
0 0 0
e) P (A ∩ B ∩ C )
Exercise 1
If P (A) = 0.3, P (B) = 0.2 and P (A ∩ B) = 0.1 determine the following
probabilities:
0 0
a) P (A ) b) P (A ∪ B) c) P (A ∩ B)
0 0 0
d) P (A ∩ B ) e) P [(A ∪ B) ] f) P (A ∪ B)
Exercise 2
Disks of polycarbonate plastic from a supplier are analyzed for scratch and shock
resistance. The results from 100 disks are summarized as follows:
shock resistance
high low
high scratch 70 9
low scratch 16 5
a) If a disk is selected at random, what is the probability that its scratch
resistance is high and its shock resistance is high?
b) If a disk is selected at random, what is the probability that its scratch
resistance is high or its shock resistance is high?
c) Consider the event that a disk has high scratch resistance and the event that a
disk has high shock resistance. Are these two events mutually exclusive?
Exercise 3
A computer system uses passwords that are six characters and each char-
acter is one of the 26 letters (a–z) or 10 integers (0–9). Uppercase letters
are not used. Let A denote the event that a password begins with a vowel
(either a, e, i, o, or u) and let Bdenote the event that a password ends
with an even number (either 0, 2, 4, 6, or 8). Suppose a hacker selects a
password at random. Determine the following probabilities:
a) P (A) b) P (B)
c) P (A ∩ B) d) P (A ∪ B)
Exercise 4
Strands of copper wire from a manufacturer are analyzed for strength and
conductivity. The results from 100 strands are as follows:
strength
high low
high conductivity 74 8
low conductivity 15 3
a) If a strand is randomly selected, what is the probability that its conductivity is
high and its strength is high?
b) If a strand is randomly selected, what is the probability that its conductivity is
low or the strength is low?
c) Consider the event that a strand has low conductivity and the event that the
strand has a low strength. Are these two events mutually exclusive?
Content
6 2.6 Independence
Conditional Probability
The probability of an event B under the knowledge that the outcome will
be in event A is denoted as P (B | A) and this is called the conditional
probability of B given A, and is calculated by
P (A ∩ B)
P (B | A) = , P (A) > 0.
P (A)
Similar,
P (A ∩ B)
P (A|B) = , P (B) > 0.
P (B)
Example 12
A day’s production of 850 manufactured parts contains 50 parts that
do not meet customer requirements. Two parts are selected randomly
without replacement from the batch. What is the probability that the
second part is defective given that the first part is defective?
Example 12
A day’s production of 850 manufactured parts contains 50 parts that
do not meet customer requirements. Two parts are selected randomly
without replacement from the batch. What is the probability that the
second part is defective given that the first part is defective?
Let A denote the event that the first part selected is defective, and let
B denote the event that the second part selected is defective. If the first
part is defective, prior to selecting the second part, the batch contains
849 parts, of which 49 are defective; therefore, P (B | A) = 49/849.
Content
6 2.6 Independence
P (B) = P (B ∩ E1 ) + P (B ∩ E2 ) + ... + P (B ∩ Ek )
= P (B | E1 )P (E1 ) + P (B | E2 )P (E2 ) + ... + P (B | Ek )P (Ek ).
Exercise 1
Suppose that P (A|B) = 0.4 and P (B) = 0.5. Determine the following:
0
a)P (A ∩ B); b)P (A ∩ B)
Exercise 2
The probability is 1% that an electrical connector that is kept dry fails
during the warranty period of a portable computer. If the connector is
ever wet, the probability of a failure during the warranty period is 5%. If
90% of the connectors are kept dry and 10% are wet, what proportion of
connectors fail during the warranty period?
Exercise 3
A lot of 100 semiconductor chips contains 20 that are defective.
a) Two are selected, at random, without replacement, from the lot.
Determine the probability that the second chip selected is defective.
b) Three are selected, at random, without replacement, from the lot.
Determine the probability that all are defective.
Content
6 2.6 Independence
2.6 Independence
Independence
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)
The events E1 , E2 , ..., En are independent if and only if for any
subset of these events Ei1 , Ei2 , ..., Eik
P (Ei1 ∩ Ei2 ∩ ... ∩ Eik ) = P (Ei1 ) × P (Ei2 ) × ... × P (Eik )
2.6 Independence
Exercise 1
If P (A|B) = 0.3, P (B) = 0.8, and P (A) = 0.3 are the events B and the
complement of A independent?
Exercise 2
If P (A) = 0.2, P (B) = 0.2, and A and B are mutually exclusive, are they
independent?
Exercise 3
A batch of 500 containers for frozen orange juice contains five that
are defective. Two are selected, at random, without replacement, from
the batch. Let A and B denote the events that the first and second
containers selected are defective, respectively.
a) Are A and B independent events?
b) If the sampling were done with replacement, would A and B be
independent?
Dr. Duong Thi Viet An Chapter 2: Probability Hanoi, 2024 53 / 66
2.6 Independence
2.6 Independence
Exercise 4
The probability that a lab specimen contains high levels of contamination
is 0.10. Five samples are checked, and the samples are independent.
a) What is the probability that none contains high levels of contamina-
tion?
b) What is the probability that exactly one contains high levels of con-
tamination?
c) What is the probability that at least one contains high levels of con-
tamination?
Content
6 2.6 Independence
Bayes’ Theorem
If A and B are any two events
P (B | A)P (A)
P (A | B) = , for P (B) > 0.
P (B)
If E1 , E2, ..., Ek are k mutually exclusive and exhaustive events and
B is any event,
P (E1 | B)
P (B | E1 )P (E1 )
= ,
P (B | E1 )P (E1 ) + P (B | E2 )P (E2 ) + ... + P (B | Ek )P (Ek )
Example 13
A new medical procedure has been shown to be effective in the early
detection of an illness, a medical screening of the population is proposed.
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?
Example 13
Let D denote the event that you have the illness, and let S denote the
event that the test signals positive. The probability requested can be de-
noted as P (D|S). The probability that the test correctly signals someone
without the illness as negative is 0.95. Consequently, the probability of a
0
positive test without the illness is P (S | D ) = 0.05.
From Bayes’ Theorem,
Exercise 2
0
Suppose that P (A|B) = 0.4, P (A|B ) = 0.2, and P (B) = 0.8. Determine
P (B|A).
Exercise 3
An inspector working for a manufacturing company has a 99% chance of cor-
rectly identifying defective items and a 0.5% chance of incorrectly classifying a
good item as defective. The company has evidence that its line produces 0.9%
of nonconforming items.
a) What is the probability that an item selected for inspection is classified as
defective?
b) If an item selected at random is classified as nondefective, what is the prob-
ability that it is indeed good?
Dr. Duong Thi Viet An Chapter 2: Probability Hanoi, 2024 59 / 66
2.7 Bayes’ Theorem
Exercise 4
A new analytical method to detect pollutants in water is being tested. This new
method of chemical analysis is important because, if adopted, it could be used
to detect three different contaminants -organic pollutants, volatile solvents, and
chlorinated compounds - instead of having to use a single test for each pollutant.
The makers of the test claim that it can detect high levels of organic pollutants
with 99.7% accuracy, volatile solvents with 99.95% accuracy, and chlorinated
compounds with 89.7% accuracy. If a pollutant is not present, the test does not
signal. Samples are prepared for the calibration of the test and 60% of them are
contaminated with organic pollutants, 27% with volatile solvents, and 13% with
traces of chlorinated compounds. A test sample is selected randomly.
a) What is the probability that the test will signal?
b) If the test signals, what is the probability that chlorinated compounds are
present?
Content
6 2.6 Independence
Exercise 2
A sample of three calculators is selected from a manufacturing line,
and each calculator is classified as either defective or acceptable.
Let A, B, and C denote the events that the first, second, and third
calculators, respectively, are defective.
a) Describe the sample space for this experiment with a tree diagram.
Use the tree diagram to describe each of the following events:
b) A c) B
d) A ∩ B e) B ∪ C
Sample Questions
Sample Questions