Chapter 2-3

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 41

EEE-251: Probability Methods in Engineering

Chapter 2

Dr. Muhammad Altaf

1
Course Outline

Text Book:
Probability & Statistics for Engineers & Scientists, 9/E:
Ronald E. Walpole: Raymond H. Myers

Slides Material is from Textbook and Internet


Curtsey: https://zitompul.wordpress.com/2-core-lectures/3-
basic-probability-and-statistics/
2
Conditional Probability
• One very important concept in probability theory is
conditional probability. In some applications, the
practitioner is interested in the probability structure under
certain restrictions.
• The probability of an event B occurring when it is known
that some event A has occurred is called a conditional
probability
– It is denoted by P(B|A). The
• symbol P(B|A) is usually read “the probability that B occurs
given that A occurs”
• or simply “the probability of B, given A.”

3
Conditional Probability
 The probability of an event B occurring when it is known that some event A
has occurred is called a conditional probability.
 It is denoted by symbol P(B|A), usually read “the probability that B occurs given
that A occurs” or simply “the probability of B, given A.”
 The probability P(B|A) can be seen as an “updating” of P(B) based on the
knowledge that even A has occurred.

 The conditional probability of B, given A, denoted by P(B|A), is defined by

P( A  B)
P ( B A)  if P( A)  0
P( A)
Conditional Probability
If a fair dice is tossed once, what is the probability of getting a 6, given that
the number you got is an even number?

A  {2, 4, 6}  P( A)  3 6
B  {6}  P( B)  1 6

A  B  {6}  P( A  B)  1 6
P( A  B) 1 6 1
P ( B A)   
P( A) 36 3
Exp (x)
Exp (y)
As an additional illustration, suppose that
our sample space S is the population of
adults in a small town who have completed
the requirements for a college degree. We
shall categorize them according to gender
and employment status.
One of these individuals is to be selected at random for a tour throughout the
country to publicize the advantages of establishing new industries in the town.

7
Exp: 2.35

8
Conditional Probability
The probability that a regularly scheduled flight departs on time is P(D) =
0.83; the probability that it arrives on time is P(A) = 0.82; and the probability
that it departs and arrives on time is P(D Ç A) = 0.78. Find the probability that
a plane
(a) arrives on time given that it departed on time,
(b) departed on time given that it has arrived on time, and
(c) arrives on time given that it did not depart on time

P( D  A) 0.78 𝑃 ( 𝐷 ′ )=1 − 𝑃 ( 𝐷)
(a) P( A D)    0.94
P ( D) 0.83 A S
D
AÇD
P( A  D) 0.78
(b) P ( D A)    0.95 D’
P ( A) 0.82 A Ç D’

P( D  A) 0.82  0.78
(c) P ( A D)    0.24
P( D) 1  0.83
𝑃 ( 𝐷 ′ ∩ 𝐴 ) = 𝑃 ( 𝐴 ) − 𝑃 ( 𝐴 ∩ 𝐷)
Conditional Probability
Yes No Total
The question “Do you smoke?” was asked Male 19 41 60
to 100 people. The results are shown in
the table. Female 12 28 40
What is the probability that: Total 31 69 100
(a) a randomly selected individual being a male who smokes?
(b) a randomly selected individual being a male?
(c) a randomly selected individual is smoking?
(d) a randomly selected male is smoking?
(e) a randomly selected smoker is male?

(a) P(MÇS) = 19/100


MÇN
(b) P(M) = P(MÇS) È P(MÇS’) = 60/100 Y S
(c) P(S) = P(SÇM) È P(SÇM’) = 31/100
MÇY
(d) P(S|M) = 19/60
(e) P(M|S) = 19/31 FÇY
FÇN
Conditional Probability
A dice is loaded in such a way that an even number is twice as likely to occur
as an odd number. It is tossed once.
(a) What is the probability that event B of getting a perfect square will turn
out?
(b) What is the probability that even B will happen when it is known that the
toss of the die resulted in a number greater than 3?

(a) B  {1, 4}  P( B)  1 9  2 9  3 9

(b) G  {4,5, 6}  P (G )  2 9  1 9  2 9  5 9
B  G  {4}  P( B  G )  2 9

P (G  B ) 2 9
P( B G )    25
P(G ) 59
Exercise: Conditional Probability
Dependent Events
2 blue and 3 red marbles are in a bag. 2 marbles are taken out at random and
without replacement.
(a) If the first marble taken out is blue, what is the probability to get the red
marble next?
(b) What is the probability of taking two red balls in a row?
Example: Marbles in a Bag
2 blue and 3 red marbles are in a bag.
What are the chances of getting a blue marble?
The chance is 2 in 5

 But after taking one out you change the chances!


 So the next time:
 if you got a red marble before, then the chance of a blue marble next is 2 in 4
 if you got a blue marble before, then the chance of a blue marble next is 1 in 4
 "Replacement"
 Note: if you had replaced the marbles in the bag each time, then the chances would
not have changed and the events would be independent:
 With Replacement: the events are Independent (the chances don't change)
 Without Replacement: the events are Dependent (the chances change)
Exercise: Conditional Probability
2 blue and 3 red marbles are in a bag. 2 marbles are taken out at random and
without replacement.
(a) If the first marble taken out is blue, what is the probability to get the red
marble next?
(b) What is the probability of taking two red balls in a row?

Ans ● (3/4)
● (3/5)(2/4)=(3/10)
14
Independent Events
 Two events A and B are independent if and only if
P( B A)  P( B) or P ( A B )  P( A)
Otherwise, A and B are dependent.
Multiplicative Rules
 If in an experiment the events A and B can both occur, then
P ( A  B )  P ( A)  P ( B A)
Since A Ç B and B Ç A are equivalent, it follows that
P ( B  A)  P ( B )  P ( A B )

 Two events A and B are independent if and only if


P ( A  B)  P ( A)  P ( B )

Suppose that we have a fuse box containing 20 fuses, of which 5 are


defective. If 2 fuses are selected at random and removed from the box in
succession without replacement, what is the probability that both fuses are
defective?
EXP:2.36
Let A be the event that the first fuse is defective and B the event that the
second fuse is defective, then
5 4 1
P ( A  B )  P ( A)  P ( B A)   
20 19 19
Exercise: Multiplicative Rules
Two defective resistors are mixed with five good ones. An operator tests the
resistors one-by-one to find out the defective resistors. He takes two resistors
at random and without replacement.
What is the probability that the operator finds the two resistors directly in the
first two tests?

Ans ● (2/7)(1/6)
Exp: 2.37

18
19
Exp: 2.40

20
Prob: 2.76

21
A die is tossed twice and the number of dots facing up is counted and noted in the order of
occurrence. Let A be the event “number of dots in first toss is not less than number of dots in
second toss,” and let B be the event “number of dots in first toss is 6.” Find P[A|B] and P[B|A].
A  (1,1)
(2,1), (2, 2)
(3,1), (3, 2), (3,3)
(4,1), (4, 2), (4,3), (4, 4)
(5,1), (5, 2), (5,3), (5, 4), (5,5)
(6,1), (6, 2), (6,3), (6, 4), (6,5), (6, 6)

B  (6,1), (6, 2), (6,3), (6, 4), (6,5), (6, 6)

22
Find the probabilities of the following events in terms of P[A],P[B], and P[A intersection B]
(a) A occurs and B does not occur ;B occurs and A does not occur.
(b) Exactly one of A or B occurs.
(c) Neither A nor B occur
A  (1,1)
(2,1), (2, 2)
(3,1), (3, 2), (3,3)
(4,1), (4, 2), (4,3), (4, 4)
(5,1), (5, 2), (5,3), (5, 4), (5,5)
(6,1), (6, 2), (6,3), (6, 4), (6,5), (6, 6)

B  (6,1), (6, 2), (6,3), (6, 4), (6,5), (6, 6)

P(A)  21/ 36  a   P(A)  21/ 36


P (B)  6 / 36 P (B)  6 / 36
P(A B)  P(B) P(A B)  P(B)
P(A B)  P(B) P(A | B)  P( A) P( B | A)

23
A die is tossed twice and the number of dots facing up is counted and noted in the order of
occurrence. Let Abe the event “number of dots in first toss is not less than number of dots in
second toss,” and let B be the event “number of dots in first toss is 6.” Find P[A|B] and P[B|A].
A  (1,1)
(2,1), (2, 2)
(3,1), (3, 2), (3,3)
(4,1), (4, 2), (4,3), (4, 4)
(5,1), (5, 2), (5,3), (5, 4), (5,5)
(6,1), (6, 2), (6,3), (6, 4), (6,5), (6, 6)

B  (6,1), (6, 2), (6,3), (6, 4), (6,5), (6, 6)

P(A)  21/ 36
P (B)  6 / 36
P(A B)  P(B)
P(A B)  P(B) P(A | B)  P( A) P( B | A)

24
The Law of Total Probability

P( A  B )  P ( A)  P( B A)
P( B  A)  P ( B)  P( A B)

25
Multiplicative Rules
One bag contains 4 white balls and 3 black balls, and a second bag contains 3
white balls and 5 black balls. One ball is drawn from the first bag and placed
unseen in the second bag. What is the probability that a ball now drawn from
the second bag is black?

B1 : the drawing of a black ball from bag 1


B2 : the drawing of a black ball from bag 2
W1 : the drawing of a white ball from bag 1

P ( B2 )  P( B1  B2 )  P (W1  B2 )
3 6 4 5 38
P ( B2 )  P ( B1 )  P ( B2 B1 )  P (W1 )  P( B2 W1 )     
7 9 7 9 63
Multiplicative Rules
An electrical system consists of four components as illustrated below. The
system works if components A and B work and either of the components C or
D work. The reliability (probability of working) of each component is also
indicated. Find the probability that
(a) the entire system works
(b) the component C does not work, given
that the entire system works
(c) the entire system works given that the
component C does not work.
Assume that four components work
independently.
a)
(a) P  S   P  A  B  C  D 
 P  A  P  B  P C  D  Due to independence
 P  A  P  B   P C   P  D   P C  D 
 P  A  P  B   P C   P  D   P C  P  D 
 0.7776
(b) Find the probability that the component C
does not work, given that the entire system
works
P (system works while C not working)
P (C  system works) 
P (system works)
P( A  B  C   D) (0.9)(0.9)(1  0.8)(0.8)
   0.1667
P (system works) 0.7776
b)
P C   S  P C    A  B  C  D  
P C  | S   
P S  P S 
Apply distributive law on A  B  C  D 
A  B  C  D    A  B  C    A  B  D 
 C    A  B  C  D   C    A  B  C    A  B  D 
  C   A  B  C   C   A  B  D 
 C   A  B  D 

P  C   S  P  C   A  B  D  P C   P  A  P  B  P  D 
P C  | S    
P S  P S  P S 
(c) Find the probability that the entire system works given that the component
C does not work
P (C not working but system works )
P (system works C ) 
P (C )
P( A  B  C   D) (0.9)(0.9)(1  0.8)(0.8)
   0.648
P (C ) (1  0.8)

Food for thoughts


Find the probability that
(a) the component C does not work given that entire system works
(b) The system works given that component A does not work
(c) The system does not work given that component A does not work
Bayes’ Rule
 Refer to the following figure.
A  ( E  A)  ( E   A)
P ( A)  P ( E  A)  ( E   A) 
 P ( E  A)  P ( E   A)

 P ( E ) P ( A E )  P ( E ) P ( A E )

 If the events B1, B2, ..., Bk constitute a


partition of the sample space S such that
P(Bi) != 0 for i = 1, 2, ..., k, then for any
event A of S
k k
P ( A)   P ( Bi  A)   P ( Bi )  P ( A Bi )
i 1 i 1
Bayes’ Rule
A travel agent offers 4-day and 8-day round trips. Based on long-range sales,
the probability that a customer will book a 4-day trip is 0.75. Of those that
book that trip, 60% also order the bus pass. But only 30% of 8-day trip
customers order the bus pass. A randomly selected buyer purchases a bus
pass and a round trip. What is the probability that the trip she orders is a 4-
day trip?

F : the customer books a 4-day round trip


E : the customer books an 8-day round trip
B : the customer orders a bus pass
P( B  F )
P( B)  P( B  F )  P( B  E ) P( F B) 
P( B)
 P( F )  P( B F )  P( E )  P( B E ) P( F )  P( B F )

 (0.75)(0.6)  (1  0.75)(0.3) P( B)
(0.75)(0.6)
 0.525 
0.525
 0.857
Chapter 2.8

Exp: 2.41

In a certain assembly plant, three machines, B1, B2, and B3, make 30%, 45%, and 25%,
respectively, of the products. It is known from past experience that 2%, 3%, and 2% of
the products made by each machine, respectively, are defective. Now, suppose that a
finished product is randomly selected. What is the probability that it is defective?

B1 : the product is made by machine B1


B2 : the product is made by machine B2
B3 : the product is made by machine B3
D : the product is defective

P( D)  P( B1  D)  P( B2  D)  P ( B3  D)
 P ( B1 )  P( D B1 )  P( B2 )  P( D B2 )  P( B3 )  P( D B3 )
 (0.3)(0.02)  (0.45)(0.03)  (0.25)(0.02)
 0.0245
Instead of asking for P(A) in Example 2.41, by
the rule of elimination, suppose that we now
consider the problem of finding the
conditional probability P(Bi|A).

In other words, suppose that a product was

Bayes randomly selected, and it is defective.

Rule What is the probability that this product was


made by machine Bi?

Questions of this type can be answered by


using the following theorem, called Bayes’ rule

33
Bayes Rule

34
Bayes’ Rule
With reference to the last example, if a product were chosen randomly and
found to be defective, what is the probability that it was made by machine B3?
Exp: 2.42
P( D  B3 )
P( B3 D) 
P( D)
P ( B3 )  P ( D B3 )

P( D)
(0.25)(0.02)

0.0245
 0.204
Problem: A simple binary communication channel carries messages by using only two
signals, say 0 and 1. We assume that, for a given binary channel, 40% of the time a 1 is
transmitted; the probability that a transmitted 0 is correctly received is 0.90, and the
probability that a transmitted 1 is correctly received is 0.95. Determine
(a) the probability of a 1 being received,
(b) given a 1 is received, the probability that 1 was transmitted.

36
Problem: A simple binary communication channel carries messages by using only two
signals, say 0 and 1. We assume that, for a given binary channel, 40% of the time a 1 is
transmitted; the probability that a transmitted 0 is correctly received is 0.90, and the
probability that a transmitted 1 is correctly received is 0.95. Determine
(a) the probability of a 1 being received,
(b) given a 1 is received, the probability that 1 was transmitted.

37
Problem: a simple binary communication channel carries messages by using only two
signals, say 0 and 1. We assume that, for a given binary channel, 40% of the time a 1 is
transmitted; the probability that a transmitted 0 is correctly received is 0.90, and the
probability that a transmitted 1 is correctly received is 0.95. Determine
(a) the probability of a 1 being received,
(b) given a 1 is received, the probability that 1 was transmitted.

38
Food for thoughts
Problem: a simple cascaded binary communication channel carries messages by using
only two signals, say 0 and 1. Determine
(a) the probability of a 1 being received,
(b) given a 1 is received, the probability that 1 was transmitted.

39
Quiz 4B
A random sample of 200 adults are classified below by sex and
their level of education attained.

If a person is picked at random from this group, find


the probability that
(a) the person is a male, given that the person has a
secondary education;
(b) the person does not have a college degree, given
that the person is a female 40
Quiz 4C
The probability that an automobile being filled with gasoline
also needs an oil change is 0.25; the prob-ability that it
needs a new oil filter is 0.40; and the probability that both
the oil and the filter need chang-ingis0.14.
(a) If the oil has to be changed, what is the probability that
a new oil filter is needed?
(b) If a new oil filter is needed, what is the probability that
the oil has to be changed?

41

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy