0% found this document useful (0 votes)
19 views41 pages

Lec 5

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views41 pages

Lec 5

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 41

Conditional Probability

• P(A|B) = P(A ∩ B)/P(B)


• P(B|A) = P(A ∩ B)/P(A)
• So, we can write
P(A ∩ B) = P(A|B)P(B) = P(B|A)P(A)
• Chain Rule:
P(A|B)P(B) = P(B|A)P(A)
Independent Events
• P(A|B)=P(A)
• OR
• P(A ∩ B) = P(A)P(B)
Example:- Ind. X:- Throw a dice, Y:- Toss of a Coin
Not Ind:- X: Height, Y:- Age
Example
Proof of Baye’s Theorem
• Theorem: If the events B1, B2, . . . , Bk are
pairwise independent and mutually exclusive
and exhaustive events in a sample space S,
then for any event A, then
Proof
• From chain rule, we know
P(Br|A)P(A) = P(A|Br)P(B)
P(Br|A) = P(A|Br)P(B)/ P(A)
• From law of total probability

So, we can write


Problem 1

Two of six computers in a lab have


problems with hard drives. If three
computers are selected at random for
inspection, what is the probability that
none of them has hard drive problems?
Ans: 1/5
Problem 2
• In this figure each component fails with
probability 0.3 independently of other
components. Compute the system’s reliability.
• Ans: 0.8854
Problem 3
• A computer maker receives parts from three suppliers S 1,
S2, S3. Fifty percent come from S1, twenty percent come
from S2, and thirty percent come from S3. Among all the
parts supplied by S1, 5% are defective. For S2 and S2, the
portion of defective parts is 3% and 6%, respectively.
• What portion of all the parts is defective?
• A customer complains that a certain part in her recently
purchased computer is defective. What is the probability
that it was supplied by S1?
Ans: 0.049, 0.51
Problem 4
• An important module is tested by three
independent teams of inspectors. Each team
detects a problem in a defective module with
probability 0.8. What is the probability that at
least one team of inspectors detects a
problem in a defective module?
Ans: 0.992
Problem 5
• A system may become infected by some
spyware through the internet or e-mail. 70%
of the time the spyware arrives via internet,
30% of the time via e-mail. If it enters via
internet , the system detects it with
probability 0.6. If via e-mail, it is detected with
probability 0.8. What percentage of times is
this spyware detected?
Ans: 0.6
What is the probability of two girls given at least one
girl?


What is the probability of two girls given at
least one girl?
Solution

Sample Space = : {GG, GB, BG, BB}

(2G | at least 1G) =


=
Alice and Bob toss two fair coins separately. Denote the event that Alice gets a H by EA and the event
that Bob gets a H by EB . What is the probability that at least one will get H ?


•We know that P(EA) = P(EB ) = 1/2.
The sample space you are considering is:
HT, TH, TT, HH. So EA = {HT, HH} and EB
= {TH, HH} .
So,

3/4.
Example-4: Given that,
B1: 3 Golds
B2: 2 Golds, 1 Silver
B3: 1 Golds, 2 Silver

A person chosen a box at random and takes out a coin. If the


coin is Gold. What is the probability that it was drawn from
box 3?
Example-4: Solution
Given that,
B1: 3 Golds
B2: 2 Golds, 1 Silver
B3: 1 Golds, 2 Silver

A =: event of getting Gold coin


E1 =: event of getting B1
E2 =: event of getting B2
E3 =: event of getting B3
Example-4: Solution

A =: event of getting Gold coin


E1 =: event of getting B1
E2 =: event of getting B2
E3 =: event of getting B3
Example-5 The number of balls in three Jars
is as follows:

#Jars Red White Black


1 3 2 1
2 2 1 2
3 4 2 3

One Jar is chosen at random and two balls are


drawn. The balls drawn are red and white.
What is the probability that they come from
Jar 1
Example-5: Solution
#Jars Red White Black
1 3 2 1
2 2 1 2
3 4 2 3

P(J1) = P(J2) = P (J3) = 1/3


P (E| J1) =
P (E| J2) =
P (E| J3) =
P(J1 | E) =
Solution: Here in the solution, P(B) is probability of being blue taxy,
P(G) is probability of being green taxy, WB means witness as blue
car, WG means witness as green car.
Question. Compute the reliability of the following system if each
of its component works with the probability 0.92 independently.
Solution
Question
• Ninety percent of flights depart on time. Eighty
percent of flights arrive on time. Seventy-five
percent of flights depart on time and arrive on time.
a) You are meeting a flight that departed on time.
What is the probability that it will arrive on time?
b) You have met a flight, and it arrived on time. What
is the probability that it departed on time?
c) Are the events, departing on time and arriving on
time, independent?
Solution
• Que. Suppose that a shuttle’s launch depends on three key
devices that operate independently of each other and
malfunction with probabilities 0.01, 0.02, and 0.02,
respectively. If any of the key devices malfunctions, the launch
will be postponed. Compute the probability for the shuttle to
be launched on time, according to its schedule.
• Que. Suppose that a shuttle’s launch depends on three key
devices that operate independently of each other and
malfunction with probabilities 0.01, 0.02, and 0.02,
respectively. If any of the key devices malfunctions, the launch
will be postponed. Compute the probability for the shuttle to
be launched on time, according to its schedule.
The Monty Hall Problem
About Let’s Make a Deal

• Let’s Make a Deal was a game show hosted by


Monty Hall and Carol Merril. It originally ran from
1963 to 1977 on network TV.
• The highlight of the show was the “Big Deal,”
where contestants would trade previous winnings
for the chance to choose one of three doors and
take whatever was behind it--maybe a car, maybe
livestock.
• Let’s Make a Deal inspired a probability problem
that can confuse and anger the best
mathematicians, even Paul Erdös.
Suppose you’re a contestant on Let’s Make a
Deal.
You are asked to choose one of three doors.
The grand prize is behind one of the doors;
The other doors hide silly consolation gifts
which Monty called “zonks”.
You choose a door.

Monty, who knows what’s behind each of the doors,


reveals a zonk behind one of the other doors.
He then gives you the option of switching doors or
sticking with your original choice.
You choose a door.

Monty, who knows what’s behind each of the doors,


reveals a zonk behind one of the other doors.
He then gives you the option of switching doors or
sticking with your original choice.

The question is: should you switch?


The answer is yes, you should switch!

Assuming that Monty always gives you


a chance to switch, you double your odds
of winning by switching doors.

We will see why, first by enumerating the


possible cases, then by directly computing
the probability of winning with each
strategy.
Each door has a 1 in 3 chance of hiding the grand prize.
Suppose we begin by choosing door #1.
Each door has a 1 in 3 chance of hiding the grand prize.
Suppose we begin by choosing door #1.

In this case Monty may


open either door #2 or
#3

In both of these cases,


Monty is forced to reveal
the only other zonk.
So what happens when you switch?

In this case you were


right the first time.
You lose!

In both of these cases,


you switch to the correct
door.
You win!
To prove this result without listing all the cases,
we need the notion of conditional probability.

Conditional probability gives us a way to


determine how the occurrence of one event
affects the probability of another.

Here, if we’ve chosen door #1 and Monty has


opened door #2, we’d like to know the
probability that the prize is behind door #1 and
the probability that the prize is behind door #3
given this additional information.
In the following argument:

• Assume that:
– we originally chose door #1.
– Monty opened door #2.
• Notation
– Let “#1” denote the event that the prize is behind
door #1, and similarly for doors #2 and #3.
– Let “opened #2” denote the event that Monty has
opened door #2.
• Our aim is to compute p(#1 | opened #2) and
p(#3 | opened #2).
Rules :
p(#1  opened#2)
p#1 | opened#2  p A  B 
popened#2 1. pA | B  
p B 
p #3  opened #2  2. p A  B   p B p A | B 
p #3 | opened #2  
p opened #2 

p#1  opened #2   popened #2 |#1p#1 (By rule 2.)


1 1 1 (If the prize is behind door #1, Monty
   can open either #2 or #3.)
2 3 6

p#3  opened #2  popened #2 |#3p#3 (By rule 2.)


1 1 (If the prize is behind door #3, Monty
1  must open door #2.)
3 3
p (#1  opened #2) 1/ 6
p#1 | opened #2  
popened #2 popened #2 

p #3  opened #2  1/ 3
p #3 | opened #2   
popened #2  popened #2 

• So, P(#3|opened #2) = 2 P (#1|opened #2)


• It shows that the chances of winning will be twice
if the participant switches the choice.
• This completes Monty Hall Problem.

You might also like