Lecture Note L2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

Ch 01: 1

Probability and Statistic


EEN 305

Chapter 2: Probability

Fall 2023
Conditional Probability Ch 01: 2

Conditional probability, written P(B|A), is the


probability of “B, given A”, the probability that B
occurs, given that we know that A has occurred.
• Look at a Venn diagram of A and B.
• Suppose all sample points are equally likely.

Fall 2023
Conditional Probability Ch 01: 3

Conditional probability, written P(B|A), is the


probability of “B, given A”, the probability that B
occurs, given that we know that A has occurred.
• Look at a Venn diagram of A and B.
• Suppose all sample points are equally likely.
• P(B) = (# of outcomes in B)/(total # of outcomes in S)
• P(B|A) = ?
• P(B|A) = (# of outcomes in A  B)/(total # of outcomes in A)
• or, P(B|A) = P(A  B) / P(A) (as long as P(A) > 0).

Fall 2023
Ch 01: 4

Example of Conditional Probability in Engineering


a) Given voltage fluctuations beyond specified limits,
the probability of a circuit failure guides decisions on
preventive maintenance.
b) Given voltage spikes occur, knowing the probability
of a grid component failure assists in predicting and
preventing disruptions in a smart grid system.
c) Given imperfection in raw material properties are
detected, the conditional probability of defects in the
final product guides decisions on adjusting material
specifications or sourcing.

Fall 2023
Conditional Probability Ch 01: 5

Example:
Consider event B getting even number in die toss.
What probability of B?
P(B)= 3/6
Suppose its know that toss result in a number greater than
3. in this case, what is the probability of getting even
number?
Lets call A event of number greater than 3,
Sample space become S= {4,5,6}
Event B become {4,6}
2
𝑃(𝐴∩𝐵) 2
P(B/A)=2/3 or 𝑃 𝐵|𝐴 = == 6
3 =
𝑃(𝐴) 3
6
Fall 2023
Conditional Probability Example Ch 01: 6

Example. For the following population of 900 people:


• Employed Unemployed Total
• Male 360 140 500
• Female 240 160 400
• Total 600 300 900
If a person is selected at random from this group,
• P(E) =?
• P(M) = ?
• P(E  M) = ?
• P(E|M) = ?
• P(M|E) = ?
• Answers: P(E)=600/900=2/3, P(M)=500/900=5/9,
P(E  M)=360/900=2/5, P(E|M)=360/500=18/25,
P(M|E)=360/600=3/5.

Fall 2023
Ch 01: 7

Example:
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.
(c) arrives on time given that it didn’t depart on time.

Solution:
a)The probability that a plane arrives on time, given that it
departed on time, is
P(A|D) = P(D ∩ A)/P(D)=0.78/0.83 = 0.94
b) The probability that a plane departed on time, given that it has
arrived on time, is
P(D|A) = P(D ∩ A)/P(A)=0.78/0.82 = 0.95
Fall 2023
Ch 01: 8

Example:
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.
(c) arrives on time given that it didn’t depart on time.

Solution:
c)The probability that a plane arrives on time, given that it didn’t
depart on time, is

𝑃(𝐴 ∩ 𝐷′) 𝑃(𝐴 ∩ (𝑆 − 𝐷)) 𝑃(𝐴 ∩ 𝑆 − 𝐴 ∩ 𝐷))
𝑃 𝐴𝐷 = = =
𝑃(𝐷′) 1 − 𝑃(𝐷) 1 − 𝑃(𝐷)
0.82 − 0.78 0.04
= = = 0.235
1 − 0.83 0.17
Fall 2023
Independence Ch 01: 9

Conditional probability helps us update the


probability of an event given additional information.
Suppose P(B|A) = P(B). What does this tell us?
• Whether A occurs or not, the probability of B occurring
doesn’t change.
If P(B|A) = P(B), then A and B are independent.
• Can show that if P(B|A) = P(B) is true, then P(A|B) = P(A) is
always also true.
From the above, and the definition of conditional
probability, if A and B are independent,
•P (A  B ) = P(A) P(B)

Fall 2023
Multiplicative Rules Ch 01: 10

Rearranging the conditional probability formula, if


both A and B can occur, then
P(A  B) = P(B|A) P(A)
Or, the probability of both A and B occurring equals
the probability of B given A times the probability of A.
Note that it is also true that
P(A  B) = P(A|B) P(B)
If (and only if) events A and B are independent, then
from the above formula, we have
P(A  B) = P(A) P(B)
For more than two independent events, multiply all of
the probabilities together.

Fall 2023
Ch 01: 11

Example:
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 replacing the first, what is the probability
that both fuses are defective?
let A be the event that the first fuse is defective and B the
event that the second fuse is defective
A ∩ B is the event that A occurs and then B occurs after A has
occurred.
The probability of first removing a defective
fuse is 5/20; then the probability of removing a second
defective fuse from the remaining 4 is 4/19. Hence,
P(A  B) = P(A) P(B|A).
5 4 1
P 𝐴∩𝐵 = ∙ =
20 19 19
.
Fall 2023
Ch 01: 12

Example:
A small town has one fire engine and one ambulance available for
emergencies. The probability that the fire engine is available when
needed is 0.98, and the probability that the ambulance is available
when called is 0.92. In the event of an injury resulting from a
burning building, find the probability that both the ambulance and
the fire engine will be available.

P(A ∩ B) = P(A)P(B) = (0.98)(0.92) = 0.9016.

Fall 2023
Ch 01: 13

Example:
An electrical system consists of four components as illustrated in
the given figure. 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 shown in the figure. Find the
probability that
(a) the entire system works
(b) the component C does not work, given that the entire system
works. Assume that four components work independently.

Fall 2023
` Ch 01: 14

Solution:
P[A ∩ B ∩ (C ∪ D)] = P(A)P(B)P(C ∪ D) (A  B)’ = A’  B’

= P(A)P(B)[1 − P(C’ ∩ D’)]


= P(A)P(B)[1 − P(C ‘)P(D’)]
= (0.9)(0.9)[1-(1-0.9)(1-0.9)] =(0.9)(0.9)[1-0.01]= 0.8019
(b) To calculate the conditional probability in this case, notice that

(0.9)(0.9)(1 − 0.9)(0.9)
= = 0.0909
0.8019

Fall 2023
Ch 01: 15

Example:
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?
Solution:
Let B1, B2, and W1 represent, respectively, the drawing of a black
ball from bag 1, a black ball from bag 2, and a white ball from bag 1.
We are interested in the union of the mutually exclusive events
B1 ∩ B2 and W1 ∩ B2.

Fall 2023
` Ch 01: 16

Example:
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?

Fall 2023
Theorem of Total Probability Ch 01: 17

Suppose the sample space S can be partitioned into events A1, A2,
and A3. What does this mean?
• A1, A2, and A3 are disjoint and between them cover all of S.
Then the probability of an event B occurring can be calculated
using conditional probabilities given that either A1 or A2 or A3
occurred.
P(B) = P(B|A1)P(A1) + P(B|A2)P(A2) + P(B|A3)P(A3). In words,
this means?
• The probability that B and A1 occur + the probability that B and
A2 occur + the probability that B and A3 occur.
This rule, called the theorem of total probability, or the rule of
elimination, holds for any partitioning of S.

Fall 2023
Theorem of Total Probability Ch 01: 18

To explain this rule:


We have a sample space partitioned to E and E’ mutually
exclusive events and there is an event A in this sample
space as shown. The probability of occurring event A is
given by.

P(A) = P[(E ∩ A) ∪ (E’ ∩ A)] = P(E ∩ A) + P(E’ ∩ A)


= P(E)P(A|E) + P(E’)P(A|E’).

Fall 2023
Theorem of Total Probability Ch 01: 19

Here we can calculate reverse conditional probabilities.


Using an example from an earlier slide:
• Employed Unemployed Total
• Male 360 140 500
• Female 240 160 400
• Total 600 300 900
First we show how to use the theorem of total
probability to calculate P(M).
• S can be partitioned into mutually exclusive events E and U.
• Then P(M) = P(M|E)P(E) + P(M|U)P(U)
• Here P(M) = (360/600)(600/900) + (140/300)(300/900) =
2/5 + 7/45 = 5/9 (as expected).
• Interpret 2/5 and 7/45 above.
• Works with S partitioned into more than 2 events.

Fall 2023
Theorem of Total Probability Ch 01: 20

Example:
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?
Solution:
Consider the following events:
A: the product 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.

Fall 2023
Theorem of Total Probability Ch 01: 21

Applying the rule of elimination, we can write


P(A) = P(B1)P(A|B1) + P(B2)P(A|B2) + P(B3)P(A|B3).
P(B1)P(A|B1) = (0.3)(0.02) = 0.006,
P(B2)P(A|B2) = (0.45)(0.03) = 0.0135,
P(B3)P(A|B3) = (0.25)(0.02) = 0.005,
and hence
P(A) = 0.006 + 0.0135 + 0.005 = 0.0245.

Tree diagram for Example


Fall 2023
Ch 01: 22

Instead of asking for P(A) in previous Example 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 randomly
selected and it is defective. 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:

Fall 2023
Theorem of Total Probability Ch 01: 23

Example:
With reference to the previous example, if a product was chosen
randomly and found to be defective, what is the probability that it
was made by machine B3?
Solution:
Using Bayes’ rule to write,

Fall 2023
Bayes Theorem Ch 01: 24

Bayes Theorem can be used to adjust the probability of


a partition subset of S given additional information.
• In the example suppose we know that the person selected is a
male (M). Then what is the probability that the person selected
is employed?
• As before, P(E|M) = P(E  M)/P(M), by the definition of
conditional probability.
• By Bayes Theorem,
P(E|M) = _ P(M|E)P(E) _
P(M|E)P(E) + P(M|U)P(U)
• In the example,
P(E|M) = (360/600)(600/900) / (2/5 + 7/45) = 18/25
• P(E) was 2/3. If we know M occurred, P(E|M) becomes 18/25.
P(E) is called the prior (or "a priori"), and P(E|M) is
called the posterior (or "a posteriori") probabilities.

Fall 2023
Theorem of Total Probability Ch 01: 25

Example:
A manufacturing firm employs three analytical plans for the design
and development of a particular product. For cost reasons, all three are
used at varying times. In fact, plans 1, 2, and 3 are used for 30%, 20%,
and 50% of the products, respectively. The defect rate is different for
the three procedures as follows:
P(D|P1) = 0.01, P(D|P2) = 0.03, P(D|P3) = 0.02,
where P(D|Pj) is the probability of a defective product, given plan j. If
a random product was observed and found to be defective, which plan
was most likely used and thus responsible?
Solution :
From the statement of the problem
P(P1) = 0.30, P(P2) = 0.20, and P(P3) = 0.50,
we must find P(Pj |D) for j = 1, 2, 3.

Fall 2023
Theorem of Total Probability Ch 01: 26

Bayes’ rule shows

Similarly,

The conditional probability of a defect given plan 3 is the largest of the


three; thus a defective for a random product is most likely the result of
the use of plan 3.

Fall 2023

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