Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
Unit 3
Probability
Random Experiment
Random Experiment – a process leading to an
uncertain outcome
Example
roll a die
pick a card
toss a coin
Basic Outcome
Basic Outcome – a possible outcome of a
random experiment
Example
roll a die
pick a card
toss a coin
Sample Space
Sample Space (S) – the collection of all
possible outcomes of a random experiment
Example – Roll one die
S = [1, 2, 3, 4, 5, 6]
Event
Event (E) – any subset of basic outcomes from
the sample space
Example – roll a die
Let A be the event “Number rolled is even”
Let B be the event “Number rolled is at least 4”
Then
A = [2, 4, 6] and B = [4, 5, 6]
Intersection of Events
Intersection of Events – If A and B are two
events in a sample space S, then the
intersection, A ∩ B, is the set of all outcomes in
S that belong to both A and B
A B
AB
Intersection Example
Example – Roll one die
S = [1, 2, 3, 4, 5, 6] A = [2, 4, 6] B = [4, 5, 6]
Find
A B
Mutually Exclusive Events
A and B are Mutually Exclusive Events if they
have no basic outcomes in common
i.e., the set A ∩ B is empty
A B
Mutually Exclusive Example
Example – Roll one die
S = [1, 2, 3, 4, 5, 6] A = [2, 4, 6] B = [4, 5, 6]
Are A and B mutually exclusive?
Create a new event that is mutually exclusive
with A.
Union of Events
Union of Events – If A and B are two events in a
sample space S, then the union, A U B, is the
set of all outcomes in S that belong to either
A or B
A B The entire shaded
area represents
A U B
Union Example
Example – Roll one die
S = [1, 2, 3, 4, 5, 6] A = [2, 4, 6] B = [4, 5, 6]
Find
A B
Complement
The Complement of an event A is the set of all
basic outcomes in the sample space that do not
belong to A. The complement is denoted
A A
Complement Example
Example – Roll one die
S = [1, 2, 3, 4, 5, 6] A = [2, 4, 6] B = [4, 5, 6]
Find
Find
A
A B
Assessing Probability
There are three approaches to assessing the
probability of an uncertain event:
1. classical probability
2. relative frequency probability
3. subjective probability
Classical Probability
Assumes all outcomes in the sample space are
equally likely to occur
Requires a count of the outcomes in the sample
space (combinations, permutations)
number of outcomes that satisfy the event AP(A)
total number of outcomes in the sample space
Card Example
Consider a standard deck of 52 cards, with four
suits: ♥ ♣ ♦ ♠
Let event A = card is an Ace
Let event B = card is from a red suit
Card Example
Find P(A) = P(choose an Ace)
Find P(B) = P(choose a red card)
Relative Frequency Probability
Assumes random experiment can be repeated
number of A outcomesP(A)
total number of trials or outcomes
Subjective Probability
An individual opinion or belief about the probability
of occurrence
What’s the chance that Trump will win?
What’s the chance that the Patriots will win the Superbowl?
What’s the chance that I am going to get an A in this class?
Counting the Possible Outcomes
The number of possible orderings
The total number of possible ways of arranging x
objects in order is
x! is read as “x factorial”
0! = 1 by definition
...(2)(1) 2)-1)(x - x(x x!
Pool Ball Example
What order could 16 pool balls be in?
Permutations and Combinations
Permutations: the number of possible
arrangements when x objects are to be
selected from a total of n objects and arranged
in order [with (n – x) objects left over]
x)!(n
n!
1)x ...(n 2)1)(nn(n Pn
x
Pool Ball Example
What if we want to choose 3 out of 16 balls?
Permutations and Combinations
Combinations: The number of combinations
of x objects chosen from n is the number of
possible selections that can be made
x)!(nx!
n!
x!
P C
n
xn
k
Pool Ball Example
Let's say we just want to know which 3 pool
balls are chosen, not the order.
So, the permutations will have 3! = 6 times as
many possibilites.
Order does matter Order doesn’t matter
1 3 2 3 1 2
1 2 3 2 1 3 3 2 1
2 3 1 1 2 3
Permutations and Combinations Example
Suppose that two letters are to be selected
from A, B, C, D and arranged in order. How
many permutations are possible?
Solution The number of permutations, with
n = 4 and x = 2 , is
The permutations are
AB AC AD BA BC BD
CA CB CD DA DB DC
122)!(4
4! P4
2
Permutations and Combinations Example
Suppose that two letters are to be selected
from A, B, C, D. How many combinations are
possible (i.e., order is not important)?
Solution The number of combinations is
The combinations are AB (same as BA) BC (same as CB)
AC (same as CA) BD (same as DB)
AD (same as DA) CD (same as DC)
62)!(42!
4! C4
2
Probability Postulates
1. If A is any event in the sample space S, then
2. Let A be an event in S, and let Oi denote the basic
outcomes. Then
(the notation means that the summation is over all the basic outcomes in A)
3. P(S) = 1
1P(A)0
)P(OP(A)A
i
Card Example
Find P( ) = P(not choose an Ace) A
Probability Rules
The Complement rule:
Derived from
P(S) = P(A) P(A) 1
P(A)1)AP(
Card Example
Find = P(Ace or Red) P(A B)
Probability Rules
The Addition rule:
The probability of the union of two events is
B)P(AP(B)P(A)B)P(A
A Probability Table
B
A
A
B
)BP(A
)BAP( B)AP(
P(A)B)P(A
)AP(
)BP(P(B) 1.0P(S)
Probabilities and joint probabilities for two
events A and B are summarized in this table:
Addition Rule Example
P(Red U Ace) = P(Red) + P(Ace) - P(Red ∩ Ace)
= 26/52 + 4/52 - 2/52 = 28/52 Don’t count
the two red
aces twice! Black
Color Type Red Total
Ace 2 2 4
Non-Ace 24 24 48
Total 26 26 52
Conditional Probability
A conditional probability is the probability of one
event, given that another event has occurred:
P(B)
B)P(AB)|P(A
P(A)
B)P(AA)|P(B
The conditional
probability of A
given that B has
occurred
The conditional
probability of B
given that A has
occurred
Conditional Probability
EX: Roll a die.
P(roll a 1 or 2 or 3)
P(roll a 1 or 2 or 3|roll an even)
We’ve reduced the sample space from
{1,2,3,4,5,6} to {2,4,6}
36 STT213
Conditional Probability Example
What is the probability that a car has a CD player, given that it has AC ?
i.e., we want to find P(CD | AC)
Of the cars on a used car lot, 70% have air conditioning (AC) and 40% have a CD player (CD). 20% of the cars have both.
Conditional Probability Example
No CD CD Total
AC .2 .5 .7
No AC .2 .1 .3
Total .4 .6 1.0
Of the cars on a used car lot, 70% have air conditioning (AC) and 40% have a CD player (CD).
20% of the cars have both.
.2857.7
.2
P(AC)
AC)P(CDAC)|P(CD
Conditional Probability Example
No CD CD Total
AC .2 .5 .7
No AC .2 .1 .3
Total .4 .6 1.0
Given AC, we only consider the top row (70% of the cars). Of these, 20% have a CD player. 20% of 70% is 28.57%.
.2857.7
.2
P(AC)
AC)P(CDAC)|P(CD
Using a Tree Diagram
P(AC ∩ CD) = .2
P(AC ∩ CD) = .5
P(AC ∩ CD) = .1
P(AC ∩ CD) = .2
7.
5.
3.
2.
3.
1.
All
Cars
7.
2.
Given AC or
no AC:
Multiplication Rule
Multiplication rule for two events A and B:
also
P(B)B)|P(AB)P(A
P(A)A)|P(BB)P(A
Multiplication Rule Example
P(Red ∩ Ace) = P(Red| Ace)P(Ace)
Black
Color Type Red Total
Ace 2 2 4
Non-Ace 24 24 48
Total 26 26 52
52
2
52
4
4
2
52
2
cards of number total
ace and red are that cards of number
Conditional Probability Example
The probability that it will rain tomorrow is .6. If
it rains tomorrow, the probability that it will rain
on the following day is .7. If it does not rain
tomorrow, the probability that it will rain on the
following day is .2.
What is the probability that it rains tomorrow
and the next day?
Statistical Independence
Two events are statistically independent
if and only if:
Events A and B are independent when the probability of one
event is not affected by the other event
If A and B are independent, then
P(A)B)|P(A
P(B)P(A)B)P(A
P(B)A)|P(B
if P(B)>0
if P(A)>0
Statistical Independence
For multiple events:
E1, E2, . . . , Ek are statistically independent if
and only if:
))...P(EP(E)P(E)EE P(E k21111 ...
Statistical Independence Example
No CD CD Total
AC .2 .5 .7
No AC .2 .1 .3
Total .4 .6 1.0
Of the cars on a used car lot, 70% have air conditioning (AC) and 40% have a CD player (CD).
20% of the cars have both.
Are the events AC and CD statistically independent?
Statistical Independence Example
No CD CD Total
AC .2 .5 .7
No AC .2 .1 .3
Total .4 .6 1.0
P(AC ∩ CD) = 0.2
P(AC) = 0.7
P(CD) = 0.4 P(AC)P(CD) = (0.7)(0.4) = 0.28
P(AC ∩ CD) = 0.2 ≠ P(AC)P(CD) = 0.28
So the two events are not statistically independent
Independent Events Example
Suppose a basketball player is an excellent free
throw shooter and makes 92% of his free
throws (i.e. he has a 92% chance of making a
single free throw). Assume that free throw shots
are independent of one another. Suppose this
player gets to shoot three free throws.
Find the probability that he makes none of the
three shots.
Independent Events Example
Suppose a basketball player is an excellent free
throw shooter and makes 92% of his free
throws (i.e. he has a 92% chance of making a
single free throw). Assume that free throw shots
are independent of one another. Suppose this
player gets to shoot three free throws.
Find the probability that he makes at least one
of the three shots.
Bayes’ Theorem
Let A1 and B1 be two events. Bayes’ theorem states that
)P(B
))P(AA|P(B)B|P(A
and
)P(A
))P(BB|P(A)A|P(B
1
111
11
1
111
11
Bayes’ Theorem
where:
Ei = ith event of k mutually exclusive and collectively
exhaustive events
A = new event that might impact P(Ei)
))P(EE|P(A))P(EE|P(A))P(EE|P(A
))P(EE|P(A
P(A)
))P(EE|P(AA)|P(E
kk2211
ii
ii
i
3.5
Bayes’ theorem (extended statement)
Bayes’ Theorem Example
A drilling company has estimated a 40%
chance of striking oil for their new well.
A detailed test has been scheduled for more
information. Historically, 60% of successful
wells have had detailed tests, and 20% of
unsuccessful wells have had detailed tests.
Given that this well has been scheduled for a
detailed test, what is the probability that the well will be successful?
Let S = successful well
U = unsuccessful well
P(S) = .4 , P(U) = .6 (prior probabilities)
Define the detailed test event as D
Conditional probabilities:
P(D|S) = .6 P(D|U) = .2
Goal is to find P(S|D)
Bayes’ Theorem Example
So the revised probability of success (from the original estimate of .4), given that this well has been scheduled for a detailed test, is .667
667.12.24.
24.
)6)(.2(.)4)(.6(.
)4)(.6(.
U)P(U)|P(DS)P(S)|P(D
S)P(S)|P(DD)|P(S
Bayes’ Theorem Example
Apply Bayes’ Theorem:
Bayes’ Theorem Example
A company’s records indicate that on any given
day about 1% of their day-shift employees and
2% of the night-shift employees will miss work.
Sixty percent of the employees work the day
shift.
Given that a randomly selected employee
misses work, what’s the probability he works the
night shift?
Bayes’ Theorem Example
.60
D
.40
Dc
.01
M
.99
Mc
.02
.98
Mc
(.6)(.01) = .006 = P(D and M)
(.6)(.99) = .594 = P(D and Mc)
(.4)(.02) = .008 = P(Dc and M)
(.4)(.98) = .392 = P(Dc and Mc)