0% found this document useful (0 votes)
21 views

Chapter 2 - Probability

Uploaded by

funnymine04
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Chapter 2 - Probability

Uploaded by

funnymine04
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 91

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 is0an 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)

Fig 1: Tree diagram for three messages.


2.1.Sample Spaces and Events
2.1.2 Sample Spaces
Example 3
An automobile manufacturer provides vehicles
equipped with selected options. Each vehicle is
ordered
 With or without an automatic transmission
 With or without a sunroof
 With one of three choices of a stereo system
 With one of four exterior colors
2.1 Sample Spaces and Events
2.1.2 Sample Spaces
Example 3 (cont)
If the sample space consists of the set of all
possible vehicle types, what is the number of
outcomes in the sample space?
The sample space contains 48 outcomes. The tree
diagram for the different types of vehicles is
displayed in Fig 2
2.1 Sample Spaces and Events
2.1.2 Sample Spaces
Example 3 (cont)

Fig 2: Tree diagram for different types of vehicles


with 48 outcomes in the sample space.
2.1 Sample Spaces and Events

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

Fig 3: Venn diagrams.


2.1 Sample Spaces and Events
2.1.4 Counting Techniques
Multiplication
If an operation can be described as a sequence of steps,
k
and
If the number of ways of completing step 1 is n,1 and
If the number of ways of completing step 2 is n2for each
way of completing step 1, and
If the number of ways of completing step 3 is nfor
3
each
way of completing step 2, and so forth
The total number of ways of completing the operation is
n1  n2  ...  nk
2.1 Sample Spaces and Events
2.1.4 Counting Techniques
Example
In the design of a casing for a gear housing, we can
ues four different types of fasteners, three
different bolt lengths and three different bolt
locations.
From
4  the
3  3multiplication
 36 rule,
different design are possible
2.1 Sample Spaces and Events
2.1.4 Counting Techniques
Permutation
A permutation of the elements is an ordered
sequence of the elements
The number of permutation of n different elements
is n! where
n!  n   n  1  ...  2  1
Example
Let S  a, b, c then abc, acb, bac, bca, cab, cba
are all of the permutations of the elements of S
2.1 Sample Spaces and Events
2.1.4 Counting Techniques
Permutation of Subsets
The number of permutations of subsets of r elements
selected from a set of n different elements is
n!
P 
n
r
 n  r !
Example
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?
2.1 Sample Spaces and Events
Solution:
Each design consists of selecting a location from the eight
locations for the first component, a location from the
remaining seven for the second component, a location from
the remaining five for the third component, and a location
from the remaining five for the fourth component.
Therefore,

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

Equally Likely Outcomes


Whenever a sample space consists of N possible
outcomes that are equally likely, the probability of each
outcome is 1/N.
For a discrete sample space, the probability of an event
E, denoted as P(E), equals the sum of the probabilities of
the outcomes in E.
2.2 Interpretations of Probability
Example
A random experiment ca result in one of the outcomes
a, b, c, d with probabilities 0.1,0.3,0.5 and 0.1, respectively.
Let A denote the event a, b,  the B event b, c,, dand  theC
event d . Find:
a/ b/
P  A  , P  B  , P C  P  A  , P  B  , P C
   
c/
P  A  B , P  A  B , P  A  C 
2.2 Interpretations of Probability
Solution:
a/ P  A   0.1  0.3  0.4

P  B   0.3  0.5  0.1  0.9


P C   0.1

b/ Also, P  A   0.6, P  B   0.1and P C    0.9


.
c/ Furthermore, because A  B  b, P  A  B   0.3 . Because
A  B  , a, b, c, d 
P  A  B   0.1  0.3  0.5  0.1  1
Because is null set,
AC P A  C  0
2.2 Interpretations of Probability
Solution:
a/ P  A   0.1  0.3  0.4

P  B   0.3  0.5  0.1  0.9


P C   0.1

b/ Also, P  A   0.6, P  B   0.1and P C    0.9


.
c/ Furthermore, because A  B  b, P  A  B   0.3 . Because
A  B  , a, b, c, d 
P  A  B   0.1  0.3  0.5  0.1  1
Because is null set,
AC P A  C  0
2.2 Interpretations of Probability
2.2.2 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 a random
experiment,
a/ P  S   1 b/0  P  E   1

c/ For two events E1 and E2 with E1  E2  


P  E1  E2   P  E1   P  E2 
2.3 Addition Rules

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 ?
PJ  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  PH  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 

For a collection events, E1 , E2 ,..., Ek ,is said to be


mutually exclusive if for all pairs,
Ei  E j  
For a collection of mutually exclusive events,
P  E1  E2  ...  Ek   P  E1   P  E2   ...  P  Ek 
2.3 Addition Rules
Example 2:
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/ none of the newspapers
b/ at least one of the newspapers
c/ exactly one of the newspapers
d/ A or B.
2.4 Conditional Probability

The conditional probability of an event B given


event A, denote as P  B | A  is

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

casting is selected from the local supplier. Determine:


a/ P(A) b/ P(B|A)

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  , PB  0
PB

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

Why do you not use fomula ?


P  A  B   P  A | B .P  B 
2.6 Independence

Definition (two events)


Two events are independent if any one of the
following equivalent statements is true:
a/ P  A | B   P  A 

b/ P  B | A   P  B 

c/ P  A  B   P  A .P  B 
2.6 Independence

Example 1 : Suppose a days production of 850


manufactured parts contains 50 parts that do no meet
customer requirement. Suppose two parts are selected from
the batch, but the first part is replaced before the second
part is selected.
What is the probability that second part is defective given
that the first part is defective ?
Solution
The probability that both parts are defective is
50 50
P  A  B   P  A .P  B   
850 850
 0.0035
2.6 Independence

Example 1 : Suppose a days production of 850


manufactured parts contains 50 parts that do no meet
customer requirement. Suppose two parts are selected from
the batch, but the first part is replaced before the second
part is selected.
What is the probability that second part is defective given
that the first part is defective ?
Solution:
Let A be event that the first part is defective.
Let B be event that the second part is defective.
The probability that both parts are defective is
50
P  B | A  P  B    0.0588
850
2.6 Independence
Example 2:
The following circuit operates only if there is path of
functional devices from left to right. The probability that
each device functions is shown on the graph. Assume
that devise fail independently.

What is the probability that the circuit operates ?


2.6 Independence
Example 2:
The following circuit operates only if there is path of
functional devices from left to right. The probability that
each device functions is shown on the graph. Assume
that devise fail independently. What is the probability
that the circuit operates ?
Solution:

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

Definition (multiple events)


The events E1 , E2 ,...,are
En independent if and
only if for any subset of these events Ei1 , Ei2 ,..., Eik ,
     
P Ei1  E  ...  Eik  P Ei1 .P Ei2 ......P Eik  
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

Let A be the event the first time the archer hits.


Let B be the event the second time the archer hits
Let C be the event the third time the archer hits
a/ P  A  B  C   P  A .P  B .P C 
2 2 2
  
5 5 5
 0.064
2.6 Independence
Solution:
b/ P  A  B  C    P  A .P  B .P C  
2 2 3
  
5 5 5
 0.096

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

P  E1  E2  ...  E15   P  E1  P  E2 ...P  E15   0.9915  0.86


2.6 Independence
Difference Between Mutually Exclusive and Independent
Events
2.6 Independence
Difference Between Mutually Exclusive and Independent
Events.
BASIS FOR MUTUALLY INDEPENDENT
COMPARISON EXCLUSIVE EVENTS EVENTS
Meaning Two events are said to be Two events are said to
mutually exclusive, when be independent, when
their occurrence is not the occurrence of one
simultaneous. event cannot control the
occurrence of other.
Influence Occurrence of one event Occurrence of one event
will result in the non- will have no influence
occurrence of the other. on the occurrence of the
other.
Mathematical formula P(A and B) = 0 P(A and B) = P(A) P(B)
Sets in Venn diagram Does not overlap Overlaps
2.7 Multiplication and Total Probability Rules
2.7.1 Total Probability Rule (two events)
Partitioning an event into
two mutually exclusive
subsets.

For any events A and B ,


P  B   P  B  A   P  B  A 
 P  B | A  P  A   P  B | A .P  A 
2.7 Multiplication and Total Probability Rules
2.7.1 Total Probability Rule (two events)
Example 1:A can contains 4 blue and 2 green marbles. One
marble is randomly drawn from the can without
replacement and its colour is noted. A second marble is
then drawn.
Find the probability that the second marble is blue ?
2.7 Multiplication and Total Probability Rules
2.7.1 Total Probability Rule (two events)
Solution
Let A be the event that the first marble is green.
Let B be the event that the second marble is blue.
2.7 Multiplication and Total Probability Rules
2.7.1 Total Probability Rule (two events)
Example 2
Suppose that in semiconductor manufacturing the
probability is 0.10 that a chip that is subjected to high
levels of contamination during manufacturing causes a
product failure. The probability is 0.005 that a chip that is
not subjected to high contamination levels during
manufacturing causes a product failure. In a particular
production run, 20% of the chip are subject to high levels
of contamination.
What is the probability that a product using one of these
chips fails?
2.7 Multiplication and Total Probability Rules
2.7.1 Total Probability Rule (two events)
Solution
Let E denote the event that the product fails, and let H
denote the event that the chip is exposed to high
levels of contamination.
The requested probability is P  E 
P  E | H   0.1 and P  E | H    0.05

P  H   0.2 and P  H    0.8

Then
P  E   P  E | H .P  H   P  E | H  .P  H    0.024
2.7 Multiplication and Total Probability Rules

2.7.2 Total Probability Rule (multiple events)

Partitioning an event into


several mutually exclusive
subsets.

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.

Find the probability that a randomly chosen newspaper


does not have streaks ?
2.8 Bayes’ Theorem

Definition
P  B | A .P  A 
P A | B  , P B  0
PB
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

The probability that the student is female


P  B | A .P  A  98%  54%
P  A | B     0.5556
P  B  0.9524
2.8 Bayes’ Theorem
Example 3
A man drives his car to work 80% of the time. The
remainder of the time he rides his bicycle. When he
rides his bicycle to work he is late 25% of the time,
whereas when he drives his car to work he is late
15% of the time. On a particular day, the man
arrives early. Find the probability that he rode his
bicycle to work that day.
2.8 Bayes’ Theorem

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 

PB
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
PH | F     0.25
PF  0.36
Similarly,
P S | H  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
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 ?

You might also like