Documente Academic
Documente Profesional
Documente Cultură
Conditional Probability
Conditional Probability
Probability of occurrence of an event given
an occurrence of another known event
P(AB
P(A|B) =
)
P(B)
Conditional Probability
You throw three coins consecutively. What is the
probability that at least two heads come up?
What is your sample space?
HH
H
HTT
HHT
HTH
THH
THT
TTH
TTT
1
2
Conditional Probability
You throw three coins consecutively. What is the
probability that at least two heads come up given that the
second coin comes up heads??
What is your new sample space?
HH
H
HTT
HHT
HTH
THH
THT
TTH
TTT
3
4
Conditional Probability
A machine produces parts that are either good (90%), slightly
defective (2%) or obviously defective (8%). Obviously defective
parts are immediately placed in a box. If I randomly pick a part
from the non-obviously defective box, what is the probability
that it is a good part?
P(G0.90
OD)
P(G|OD) =
0.92
P(OD)
0.97826
P(OD) = 1 P(OD)
= 1 0.08
= 0.92
Conditional Probability
In a certain university, when selecting a student there is a 63%
chance that he is studying ergonomics or operations research.
Statistics show that 44% study ergonomics and 52% study
operations research. When I randomly select an operations
research student what is the probability that he also studies
ergonomics?
P(E|OR) =
P(E OR)
0.52
P(OR)
P(OR) = 0.52
P(E OR)= ???
Conditional Probability
In a certain university, when selecting a student there is a 63%
63%
chance
chance
that
that
he he
is studying
is studying
ergonomics
ergonomics
or operations
or operations
research.
research.
Statistics
Statisticsshow
Statistics
show
showthat
that
that
show
44%
44%that
study
study
44%
ergonomics
ergonomics
study ergonomics
and
and
52%
52%
and
study
study
52%
Statistics
44%
study
ergonomics
and
52%
study
operations
study operations
research.
research.
WhenI randomly
I When
randomly
I randomly
selectan
an
select
operations
an
operations
research.
When
select
operations
operations
research student
researchwhat
student
is the
what
probability
is the probability
that he also
that
studies
he also
studies
ergonomics?
ergonomics?
P(E U OR) =
0.63
What do we know?
P(E) = 0.44
P(OR) = 0.52
Conditional Probability
In a certain university, when selecting a student there is a 63%
chance that he is studying ergonomics or operations research.
Statistics show that 44% study ergonomics and 52% study
operations research. When I randomly select an operations
research student what is the probability that he also studies
ergonomics?
What do we know?
P(E) = 0.44
P(OR) = 0.52
P(E U OR) =
0.63
Can we derive P(E OR) from what we know?
P(A U B) =P(A) + P(B) - P(AB)
P(E U OR) =P(E) + P(OR) - P(E OR)
P(E OR) = P(E) + P(OR) - P(E U OR)
Conditional Probability
In a certain university, when selecting a student there is a 63%
chance that he is studying ergonomics or operations research.
Statistics show that 44% study ergonomics and 52% study
operations research. When I randomly select an operations
research student what is the probability that he also studies
ergonomics?
What do we know?
P(E) = 0.44
P(OR) = 0.52
P(E U OR) =
0.63
P(E OR) = P(E) + P(OR) - P(E U OR)
P(E OR) = 0.44 + 0.52 0.63
P(E OR) = 0.33
Conditional Probability
In a certain university, when selecting a student there is a 63%
chance that he is studying ergonomics or operations research.
Statistics show that 44% study ergonomics and 52% study
operations research. When I randomly select an operations
research student what is the probability that he also studies
ergonomics?
P(E|OR) =
P(E
OR)
0.33
0.52
P(OR) = 0.52
???
P(E OR)=
= 0.33
0.63462
Multiplication Rule
Multiplication Rule
Multiplication Rule of Probability
P(AB) = P(B)*P(A|B)
-Probability of two events happening
(eg Probability of drawing an ace and a heart
consecutively; Probability of rolling a 1 and a 6 after
rolling two dice)
The word AND means intersetcion
Multiplying probabilities is important in the future
Multiplication Rule
A box contains 3 green balls, 2 red balls and 3 blue balls.
What is the probability that I draw a red ball first then a
green ball without replacement?
P(red green) = P(red)*P(green|red)
1
P(red) = 16/52
4
3
P(green | red) = 16/52
7
P(5 royalty) =
1
4
3
7
3
28
0.10714
Multiplication Rule
Given a standard deck of cards what is the probability of
drawing a royalty (King, Queen, Jack, Ace) on your first
draw and without replacement drawing a 5 on your
second draw?
P(AB) = P(B)*P(A|B)
P(5 royalty) = P(royalty)*P(5|royalty)
16
P(royalty) = 16/52
52
4
P(5 | royalty) = 16/52
51
P(5 royalty) =
16
52
4
51
16
663
0.02413
Independence
Independence
Events A & B are said to be independent if
the occurrence of B does not affect A and
vice versa
P(A | B) = P(A)
P(B | A) = P(B)
Independence
If I roll a dice and toss a coin, will the result of the toss
coin be affected if the dice was rolled a 2?
NO!!!!!
Whatever the result is in the dice roll, it will NEVER affect
the coin toss
I am asked to draw two cards, but before drawing a
second card, I should return the first card I drew and the
deck is shuffled. Will my first drawn card affect my second
NO!!!!!
drawn card?
Independence
Let us analyze
Given two independent events A & B
Using the multiplication rule
P(AB) = P(B)*P(A|B)
But since A & B are independent P(A|B) = P(A)
Therefore,
P(AB) = P(B)*P(A)
P(BA) = P(B)*P(A)
Independence
Given two independent events, the
probability of both events occurring is just
the product of their individual probabilities
P(A | B) = P(A)
P(B | A) = P(B)
P(A B)= P(A)*P(B)
*when one of the above statements is true then the
two events are automatically independent
*when one of the above statements is true it also
implies that the other statements are true
Proportion of
the
population
with disease
X
M
P(X M)
P(X M)
E2
E3
E4
E5
3
.
0
B
(
P
P(G) = 0.2
P(
R
)
=
0.
5
P(S|B) =
0.8
P(S|G) =
0.25
P(S|G) =
0.75
P(S|R) = 0.8
P(S|R) =
0.2
3
.
0
B
(
P
P(G) = 0.2
P(
R
)
=
0.
5
P(S|B) =
0.8
P(S|G) =
0.25
P(S|G) =
0.75
P(S|R) = 0.8
P(S|R) =
0.2
P(S) = P(S B) + P(S G) + P(S R)
Bayes Theorem
It is known that 20% of blue balls are soft, 25% of green
balls are soft and 80% of red balls are soft. In a box with 6
blue balls, 4 green balls and 10 red balls, I was able to
draw a soft ball, what is the probability that it is red?
P(S|B) = 0.2
)
3
0.
B
(
P
P(G) = 0.2
P(
R
)
=
0.
5
P(S|B) =
0.8
P(R | S) = ???
P(S|G) =
0.25
P(S|G) =
0.75
P(S|R) = 0.8
We use Bayes
Theorem
P(S|R) =
0.2
Bayes Theorem
Bayes Theorem
Let us derive the Bayes Theorem
P(A|B)*P(B) = P(A B)
P(A B) = P(B A)
P(B A) = P(B|A)*P(A)
P(A|B)*P(B) = P(B|A)*P(A)
P(A|B)*P(B)
= P(B|A)
P(A)
Using total Probability Rule
P(A|E1)*P(A)
= P(E1|A)
P(E1)*P(A|E1) + P(E2)*P(A|E2) + + P(Ek)*P(A|Ek)
Bayes Theorem
It is known that 20% of blue balls are soft, 25% of green
balls are soft and 80% of red balls are soft. In a box with 6
blue balls, 4 green balls and 10 red balls, I was able to
draw a soft ball, what is the probability that it is red?
P(S|B) = 0.2
)
3
0.
B
(
P
P(G) = 0.2
P(
R
)
=
0.
5
P(R | S)
P(S|B) =
0.8
P(S|G) =
0.25
P(S|G) =
0.75
P(S|R) = 0.8
P(S|R) =
0.2
P(R | S) =
P(R S)
P(S)
Bayes Theorem
P(S|B) = 0.2
)
3
.
0
P(S|B) =
0.8
B
(
P
P(G) = 0.2
P(
R
)
=
0.
5
P(R | S) =
P(S|G) =
0.25
P(S|G) =
0.75
P(S|R) = 0.8
P(R S)
P(S|R) =
0.2
P(S)
0.51
P(S) = P(S|B)*P(B) + P(S|G)*P(G) + P(S|R)*P(R)
P(S) = 0.51000
Bayes Theorem
P(S|B) = 0.2
)
3
.
0
B
(
P
P(G) = 0.2
P(
R
)
=
0.
5
P(R | S) =
P(S|B) =
0.8
P(S|G) =
0.25
P(S|G) =
0.75
P(S|R) = 0.8
P(R
0.4
S)
P(S|R) =
0.2
0.51
0.78431
P(R S) = P(S R) = 0.8*0.5
P(R S) 0.4
Bayes Theorem
It is known that 20% of blue balls are soft, 25% of green
balls are soft and 80% of red balls are soft. In a box with 6
blue balls, 4 green balls and 10 red balls, I was able to
draw a hard ball what is the probability that it is Blue?
P(S|B) = 0.2
)
3
0.
B
(
P
P(G) = 0.2
P(
R
)
=
0.
5
P(S|B) =
0.8
P(S|G) =
0.25
P(S|G) =
0.75
P(S|R) = 0.8
P(S|R) =
0.2
More Examples
Customers are used to evaluate preliminary product
designs. In the past, 95% of highly successful products
received good reviews, 60% of moderately good products
received good reviews, and 10% of poor products
received good reviews. In addition, 40% of products have
been highly successful, 35% have been moderately
successful, and 25% have been poor products. What is
the probability that a product attains a good review?
More Examples
Customers are used to evaluate preliminary product
designs. In the past, 95% of highly successful products
received good reviews, 60% of moderately good products
received good reviews, and 10% of poor products
received good reviews. In addition, 40% of products have
been highly successful, 35% have been moderately
successful, and 25% have been poor products. I am
currently reading a good review, what is the probability
that it is actually a poor product?
More Examples
Suppose a certain drug test will correctly identify a drug
user as testing positive 99% of the time, and will correctly
identify a non-user as testing negative 98% of the time.
Lets assume a corporation decides to test its employees
for opium use, and 0.5% of the employees use the drug. If
an employee tests positive, what is the probability that he
is in fact a user?
Next Time on IE 27
Reliability
Counting Techniques
Source: Taha
.Fin.