Lecture 05
Lecture 05
Lecture 05
Probability
Learning Objectives
Probability concepts
Conditional probability
Bayes’ Theorem
Counting rules
Random Experiments
A random experiment is an observational process
whose outcomes cannot be known in advance.
The set of all outcomes is the sample space for
the experiment.
A sample space with a countable number of
outcomes is discrete.
Example:
Flip a coint, the sample space consists of 2
outcomes S = {H, T}
Roll a die, the sample space consists of 6 outcomes
S = {1, 2, 3, 4, 5, 6}
Events
An event is any subset of outcomes in the
sample space.
A simple event or elementary event is a single
outcome.
A discrete sample space S consists of all the
simple events (Ei): S = {E1, E2, …, En}
Examples
Flip a coin:
The sample space consists
of 2 elementary events: S = {H, T}
An event of getting one Head: E = {H}
If A B = , then P(A B) = 0
Special Law of Addition
A = Weekday; B = Weekend;
C = January; D = Spring;
Events A, B, C and D are collectively exhaustive
(but not mutually exclusive – a weekday can be in
January or in Spring)
Events A and B are collectively exhaustive and
also mutually exclusive
Conditional Probability
P(A | B) P(A)
Events A and B are independent when the
probability of one event is not affected by the
fact that the other event has occurred
Multiplication Rules
P ( A) P ( A)
Odds =
P ( A ') 1 P ( A)
P( A | B) P( B)
P ( B | A)
P ( A | B ) P ( B ) P ( A | B ') P ( B ')
General Forms of Bayes’ Theorem
P(A | B i )P(B i )
P(B i | A)
P(A | B 1 )P(B 1 ) P(A | B 2 )P(B 2 ) P(A | B k )P(B k )
where:
Bi = ith event of k mutually exclusive and
collectively
exhaustive events
A = new event that might impact P(Bi)
Bayes’ Theorem Example
The entire output of a factory is produced on
two machines, which accounts for 60% and
40% of the output, repsectively.
The fraction of defective items for the 1 st
machine is 5% and for the 2nd machine is 3% .
Randomly select one product and found to be
is defective. What is the probability that it was
produced by the 1st machine?
Bayes’ Theorem Example
(continued)
Denote:
A1: item was made by the 1st machine
A2: item was made by the 2nd machine
B: item was defective
Probability:
P(A1) = 0.6 , P(A2) = 0.4
P(B|A1) = 0.05 , P(B|A2) = 0.03
Goal is to find P(A1|B)
Bayes’ Theorem Example
(continued)
P(B |A1)P(A 1 )
P(A1 | B)
P(B)
(0.05)(0.6 )
0.7143
(0.042)
kn
Example: If you roll a fair die 3 times then there are
63 = 216 possible outcomes
Counting Rules
(continued)
Counting Rule 2:
If there are k1 events on the first trial, k2 events on
the second trial, … and kn events on the nth trial, the
number of possible outcomes is
(k1)(k2)…(kn)
Example:
You want to go to a park, eat at a restaurant, and see a
movie. There are 3 parks, 4 restaurants, and 6 movie
choices. How many different possible combinations are
there?
Answer: (3)(4)(6) = 72 different possibilities
Counting Rules
(continued)
Counting Rule 3:
The number of ways that n items can be arranged in
order is
n! = (n)(n – 1)…(1)
Example:
You have five books to put on a bookshelf. How many
different ways can these books be placed on the shelf?
n!
n Px
(n X)!
Example:
You have five books and are going to put three on a
bookshelf. How many different ways can the books be
ordered on the bookshelf?
Answer: different
n! 5! 120
n Px
possibilities 60
(n X)! (5 3)! 2
Counting Rules
(continued)
Counting Rule 5:
Combinations: The number of ways of selecting X
objects from n objects, irrespective of order, is
n!
n Cx
X!(n X)!
Example:
You have five books and are going to randomly select three
to read. How many different combinations of books might
you select?