Chapter 2 - Probability
Chapter 2 - Probability
Chapter outline
2.1 Sample Spaces and Events
2.2 Interpretations of Probability
2.3 Addition Rules
2.4 Conditional Probability
2.5 Multiplication Rules
2.6 Independence
2.7 Multiplication and Total Probability Rules
2.8 Bayes’ Theorem
Learning Objectives
After careful study of this chapter, you should be able to do the
following:
1. Understand and describe sample spaces and events for random
experiments with graphs, tables, lists,or tree diagrams.
2. Interpret probabilities and use the probabilities of outcomes to
calculate probabilities of events indiscrete sample spaces.
3. Use permuations and combinations to count the number of
outcomes in both an event and the sample space.
4. Calculate the probabilities of joint events such as unions and
intersections from the probabilities of individual events.
5. Interpret and calculate conditional probabilities of events.
6. Determine the independence of events and use independence to
calculate probabilities.
7. Use Bayes’ theorem to calculate conditional probabilities.
Key words
1. Sample spaces
2. Events
3. Random experiments
4. Outcomes
5. Permutation
6. Arrangements
7. Combinations
8. Mutually exclusive
2.1 Sample Spaces and Events
2.1.1 Random Experiments
Definition: An experiment that can result in
different outcomes, even though it is repeated in
the same manner every time, is called a random
experiment.
2.1.2 Sample Spaces
Definition: 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.
2.1 Sample Spaces and Events
2.1.2 Sample Spaces
Example 1
Consider an experiment that selects a cell phone
camera and records the recycle time of a flash
(the time taken to ready the camera for another
flash). The possible values for this time depend
on the resolution of the timer and on the
minimum and maximum recycle times. However,
because the time is positive it is convenient to
define the sample space as simply the positive
real line S R x | x 0
2.1 Sample Spaces and Events
2.1.2 Sample Spaces
Example 1(cont)
If it is known that all recycle times are between 1.5
and 5 seconds, the sample space can be
S x |1.5 x 5
If the objective of the analysis is to consider only
whether the recycle time is low, medium, or high,
the sample space can be taken to be the set of
three outcomes S
S low, medium, high
2.1 Sample Spaces and Events
2.1.2 Sample Spaces
Example 1 (cont)
If the objective is only to evaluate whether or not a
particular camera conforms to a minimum recycle
time specifi cation,the sample space can be
simplified to a set of two outcomes
S yes, no
that indicates whether or not the camera conforms.
2.1 Sample Spaces and Events
2.1.2 Sample Spaces
Two types of sample spaces
A sample space is discrete if it consists of a fi
nite or countable infinite set of outcomes.
A sample space is continuous if it contains an
interval (either fi nite or infi nite) ofreal numbers.
Example 2: In example 1
S x | x is0an example of a continuous sample
space.
S low, medium, highis a discrete sample space
2.1 Sample Spaces and Events
Tree Diagrams
Sample spaces can also be described graphically
with tree diagrams.
– When a sample space can be constructed in several
steps or stages, we can represent each of the n1 ways of
completing the first step as a branch of a tree.
– Each of the ways of completing the second step can be
represented as n2 branches starting from the ends of
the original branches, and so forth.
2.1 Sample Spaces and Events
2.1.2 Sample Spaces
Example 2
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.
Each message can be received either on time or
late. The possible results for three messages can
be displayed by eight branches in the tree
diagram shown in Fig 1.
2.1.Sample Spaces and Events
2.1.2 Sample Spaces
Example 2 (cont)
2.1.3 Events
Definition
An event is a subset of the sample space of a
random experiment.
2.1 Sample Spaces and Events
2.1.3 Events
Basic Set Operations
The union of two events is the event that consists
of all outcomes that are contained in either of the
two events. We denote the union as E1 E2
The intersection of two events is the event that
consists of all outcomes that are contained
in both of the two events. We denote the
E1 E2
intersection as
2.1 Sample Spaces and Events
2.1.3 Events
Basic Set Operations
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
E C
E as E( or ).
2.1 Sample Spaces and Events
Venn Diagrams
8!
P 1680 different designs are possible.
8
4
4!
2.1 Sample Spaces and Events
2.1.4 Counting Techniques
Permutation of Similar Objects
The number of permutations of n n1 n2 ... nr
objects of which n1 are of one types, n2 are of a second
type ,…., and nr are of an r th type is
n!
n1 !n2 !nr !
2.1 Sample Spaces and Events
2.1.4 Counting Techniques
Permutation of Similar Objects
Example:
A part is labeled by printing with four thick lines, three
medium lines, and two thin lines. If each ordering of the
nine lines represents a different label, how many different
labels can be generated by using this sheme ?
Solution:
The number of possible part label is
9!
1260
4!3!2!
2.1 Sample Spaces and Events
2.1.4 Counting Techniques
Combination
r
The number of combinations, subsets of size that can be
selected from a set of elements ( order is not important),
n n
C
is denoted as or r , and
r
n n!
r r! n r !
2.1 Sample Spaces and Events
2.1.4 Counting Techniques
Combination
Example 1:
A printed circuit board has eight different locations in
which a component can be placed. If five identical
components are to be placed on the board. How many
different designs are possible ?
Solution: Each design is a subset of the eight locations
that are to contain the components, so the number of
8!
possible designs is 56 .
5!3!
2.1 Sample Spaces and Events
2.1.4 Counting Techniques
Combination
Example 2: A bin of 50 manufactured parts contains
three defective parts and 47 nondefective parts. A sample
of six parts is selected from the 50 parts. Selected parts
are not replaced. How many different samples are there
of six that contain exactly two defective parts ?
Solution:
From the multiplication rule, the number of subsets of
size six that contain exactly two defective items is
3 47
2 4 535095
2.2 Interpretations of Probability
Probability of a Union
P A B P A P B P A B
2.3 Addition Rules
Example 1
The class has 28 students. Of these, 12 students
prefer to study English, 16 students prefer to
study Japanese and 8 students prefer to learn
both these subjects. A student selected at
random.
Find the probability to select the students prefer
to learn Japanese or English ?
2.3 Addition Rules
Example 1
The class has 28 students. Of these, 12 students
prefer to study English, 16 students prefer to
study Japanese and 8 students prefer to learn
both these subjects. A student selected at
random.
Find the probability to select the students prefer
to learn Japanese or English ?
PJ E P J P E P J E
16 12 8 5
28 28 28 7
Example 2
If P A 0.6, P A B 0.7 andP A B 0.3
Find P B .
2.3 Addition Rules
Definition
Two events, denoted A and B such that
A B
are said be mutually exclusive.
Theorem
If A and B are mutually exclusive events,
P A B P A P B
2.3 Addition Rules
Example 1: A chocolate is randomly selected from a
box which contains 6 chocolates with hard centres
and 12 chocolates with soft centres.
Let H be the event that a randomly selected chocolate
from the box has a hard centre, and S be the event
that a randomly selected chocolate from the box has a
soft centre.
a/ Are the events H and S mutually exclusive ?
b/ Find
i/ P H P S
ii/
iii/ P H S PH S
iv/
Solution:
a/ Chocolates cannot have both a hard and a soft centre
H and S are mutually exclusive.
6 1 12 2
b/ i/ P H ii/ P S
18 3 18 3
iii/ P H S 0
{ a chocolate cannot have a have and a soft centre}
iv/ P H S 1
{ a chocolate must have a have or a soft centre}
2.3 Addition Rules
Three 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
P A B
P B | A , P A 0
P A
2.4 Conditional Probability
Example 1:
In a certain town three newspapers are published. 20% of the
population read A, 16% read B, 14% read C, 8% read A and
B, 5% read A and C, 4% read B and C, and 2% read all 3
newspapers. A person is selected at random. Use a Venn
diagram to help determine the probability that the person
reads:
a/ A, given that the person reads at least one newspaper
b/ C, given that the person reads either A or B or both.
2.4 Conditional Probability
Example 2:
A box contains 4 red and 2 yellow tickets. Two tickets are
random selected from the box one by one without
replacement. Find the probability that:
a. Both are red
b. The first is red and the second is yellow.
2.4 Conditional Probability
Solution
2.4 Conditional Probability
Example 3
A days production of 850 manufactured parts contains 50
parts that do not meet customer requirement. Two parts are
selected randomly without replacement from the batch.
a/ What is the probability the the second part is defective
given that the first part is defective ?
b/ If three parts are selected at random, what is the
probability that the first two are defective and the third is
not defective ?
2.4 Conditional Probability
Solution
a/ 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. The
probability needed can be expressed as
P B | A
49
P B | A
b/ This event can be described in shorthand notation as simply
P(ddn). 849
We have
50 49 800
P ddn 0.0032
850 849 848
2.4 Conditional Probability
Example 4:
Disks of polycarbonate plastic from a supplier are analyzed for
scratch and shock resistance. The results from 100 disks summarized
as follows:
Let A denote the Shock resistance
event that a disk high low
has high shock Scratch High 70 9
resistance, and B resistance low 16 5
denote the
event that a disk has high scratch resistance. Determine the
following probabilities:
a/ P(A) b/ P(B) c/ P(A|B) d/ P(B|A)
2.4 Conditional Probability
Example 5
A lot contains 15 castings from a local supplier and 25
castings from a supplier in the next state. Two castings are
selected randomly, without replacement, from the lot of 40.
Let A be the event that the first casting selected is from the
local supplier, and let B denote the event that the second
c/ d/
2.5 Multiplication Rules
2.5.1 Multiplication Rule
From conditional probability formula
P A B
P B | A , P A 0
P A
or
P A B
P A | B , PB 0
PB
We have
P A B P A | B .P B P B | A .P A
2.5 Multiplication Rules
Example:
The probability that the first stage of a numerically
controlled machining operation for high-rpm pistons
meet specifications is 0.9. Failures are due to metal
variation, fixture alignment, cutting blade condition,
vibration, and ambient environmental conditions.
Given that the first stage mets specifications the
probability that a second stage of matchining meets
specifications is 0.95. What is the probability that
both satges meet specification ?
2.5 Multiplication Rules
Solution
Let A and B denote the events that first and seconds
stages meet specification, respectively.The probability
requested is
P A B P B | A .P A 0.95 0.9 0.855
b/ P B | A P B
c/ P A B P A .P B
2.6 Independence
Let L and R denote the events that the left and right
devices operate, respectively. There is only a path if both
operate. The probability the circuit operates is
P L and R P L R P L P R 0.8 0.9 0.72
2.6 Independence
Example 3:
The following circuit operates only if there is a path of
functional devices from left to right. The probability that
each device funtions is shown on the graph. Assume that
devices fail independently. What is the probability that
the circuit operates ?
2.6 Independence
Solution:
Let T and B denote the events that the top and bottom
devices operate, respectively. There is a path if at least
one device operates. The probability that the circuit
operates is
P T or B 1 P T or B 1 P T and B
A simple formula for the solution can be derived from
the complements T and B. From the independence
assumption,
P T and B P T P B 1 0.95 0.052
2
So
P T or B 1 0.052 0.9975
2.6 Independence
Practical Interpretation:
Notice that the probability that the circuit operates is larger
than the probability that either device is functional. This is
an advantage of a parallel architecture. A disadvantage is
that multiple devices are needed
2.6 Independence
Example 4:
An archer always hits a circular target with each
arrow fired, and hits the bullseye on average 2 out
of every 5 shots. If 3 arrows are fired at the target,
determine the probability that the bullseye is hit:
a/ every time
b/ the first two times, but not on the third shot
c/ on no occasion.
2.6 Independence
Solution
c/ P A B C P A .P B .P C
3 3 3
5 5 5
0.216
2.6 Independence
Example 5:
The following circuit operates only if there is a path of
functional devices from left to right. The probability that
each device functions is shown on the graph. Assume that
devices fail independently. What is the probability that the
circuit operates ?
2.6 Independence
Solution: The solution can be obtained from a partition of the
graph into three columns. Let L denote the event that there is a
path of functional devices only through the three units on the left.
From the independence and based upon the previous example,
P the
Similarly, let M denote L event that
1 0.13 there is a path of functional
.
devices only through the two units in the middle. Then,
The probability that there is a path of functional devices only
through the one unit on the2 right is simply the probability
P M 1 0.05 .
that the device functions, namely, 0.99. Therefore, with the
independence assumption used again, the solution is
1 0.13
1 0.05 2
0.99 0.987
2.6 Independence
Example 6:
Assume that 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 denote the event that the ith wafer contains no
large particles, Ei . Then, . The probability
i 1,2,...,15
requested can be represented as P Ei 0.99
P E1 E2
From the independence ... E15
assumption
Then
P E P E | H .P H P E | H .P H 0.024
2.7 Multiplication and Total Probability Rules
Assume E1 , E2 ,...,are
Ek mutually
k exclusive and
exhaustive sets. Then
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
2.7 Multiplication and Total Probability Rules
2.7.2 Total Probability Rule (multiple events)
Example 3:
A newspaper printer has three presses A, B, and C which
print 30%, 40%, and 30% of daily production
respectively. Due to the age of the machines and other
problems, the presses will produce streaks on their output
3%, 5%, and 7% of the time, respectively.
Definition
P B | A .P A
P A | B , P B 0
PB
2.8 Bayes’ Theorem
Example 1
A can contains 4 blue and 2 green marbles. One marble
is randomly draw from the can without replacement and
its colour is noted. A second marble is the drawn. Find
the probability that:
a/ The second marble is blue.
b/ The first was green given that the second marble is
blue.
2.8 Bayes’ Theorem
Solution
Let A be the events that first marble is green.
Let B be the events that first marble is blue.
a/ P B P B | A .P A
P B | A .P A
4 2 3 4 2
5 6 5 6 3
2.8 Bayes’ Theorem
Solution
b/ P first was green | sec ond is blue
4 2
P B2 | A1 .P A1 5 6 2
P A1 | B2
P B2 2 5
3
2.8 Bayes’ Theorem
Example 2
54% of the students at a university are female. 8% of the
male students are colour-blind and 2% of the female
students are colour-blind.
a/ A randomly chosen student is colour-blind. Find the
probability that the student is male.
b/ A randomly chosen student is not colour-blind. Find
the probability that the student is female.
2.8 Bayes’ Theorem
Solution
Let A be the events that the student is male
Let B chosen student is colour-blind.
a/ P B P B | A .P A P B | A .P A
8% 46% 2% 54% 0.0476
The probability that the student is male
P A | B .P A 8% 46%
P A | B 0.773
P B 0.0476
2.8 Bayes’ Theorem
Solution
Let A be the events that the student is female
Let B chosen student is not colour-blind.
b/ P B 1 P B 0.9524
Example 4
A new blood test has been designed to detect a form of
cancer. The probability that the test correctly identifies
someone with the cancer is 0.97, and the probability that the
test correctly identifies someone without the cancer is 0.93.
Approximately 0.1% of the general population are known to
contract this cancer. When a patient has a blood test, the test
results are positive for the cancer.
Find the probability that the patient actually has the cancer ?
2.8 Bayes’ Theorem
General
Assume E1 , E2 ,..., are k
Ek mutually exclusive and
exhaustive sets. Then
P E1 | B
P B | E1 .P E1
PB
P B | E1 .P E1
P B | E1 P E1 P B | E2 P E2 ... P B | Ek P Ek
for P B 0
Example 5:
Bayesian networks are used on the Web sites of hight
– technology manufactures to allow customers to
quickly diagnose problems with products. An
oversimplified example is presented here. A printer
manufacturer obtained the following probabilities
from a database of test results. Printer failures are
associated with three types of problems: hardware,
software and other (such as connectors), with
probabilities 0.1, 0.6, and 0.3, respectively. The
probability of a printer failure given a hardware
problem is 0.9, given software problem is 0.2 and
given any other type of problem is 0.5. If a customer
enters the manufacturer’s Web site to diagnose, what
is the most likely cause of the problem?
Solution:
Let the events H, S and O denote a hardware, software and
other problem, respectively and let F denote a printer
failure. The most likely cause of the problem is the one that
corresponds to the largest of P(H/F), P(S|F) and P(O|F). In
Bayes’Theorem the denominatior is
P F P H P F | H P S P F | S P O P F | O
0.9. 0.1 0.2 0.6 0.5 0.3 0.36
Then
P F | H P H 0.9 0.1
PH | F 0.25
PF 0.36
Similarly,
P S | H P S 0.2 0.6
P S | F 0.333
PF 0.36
P F | O P O 0.5 0.3
P O | F 0.417
PF 0.36
An inspector working for a manufacturing
company has a 99% chance of correctly
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
non-defective, what is the probability that it is
indeed good ?