Baye's THM - Lecture 12 Notes

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

Bayes’ Theorem Lecture Notes

Conditional Probability (Review):

Conditional probability is the probability of one event occurring based on the occurrence of a
previous event.

From the diagram above we get two equations:


𝑃(𝐴⋂𝐵)
• 𝑃(𝐴|𝐵) = (1.1)
𝑃(𝐵)

𝑃(𝐵⋂𝐴)
• 𝑃(𝐵|𝐴) = 𝑃(𝐴)
(1.2)

Rearranging equation 1.1 we get:

𝑃(𝐴⋂𝐵) = 𝑃(𝐴|𝐵) ∗ 𝑃(𝐵) (1.3)

Rearranging equation 1.2 we get:

𝑃(𝐵⋂𝐴) = 𝑃(𝐵|𝐴) ∗ 𝑃(𝐴) (1.4)

The LHS of both equations 1.3 and 1.4 are equal. Equating them gives:

𝑃(𝐴|𝐵) ∗ 𝑃(𝐵) = 𝑃(𝐵|𝐴) ∗ 𝑃(𝐴) (1.5)


𝑃(𝐵|𝐴)∗𝑃(𝐴)
𝑃(𝐴|𝐵) = 𝑃(𝐵)
(1.6)

Equation 1.6 represents the equation of Bayes’ Theorem.

• Bayes’ Theorem provides a mathematical rule for revising an estimate or forecast in


light of experiences and observations.
• Suppose we have estimated prior probabilities for events, and then we obtain new
information/evidence. Bayes’ Theorem gives us a way to determine the updated or
posterior probability based on the new evidence.
Bayes’ Theorem is a method of revising a probability given that additional information is
obtained. For two events A and B, the Bayes’ Theorem is as follows:

• Posterior Probability: A revised probability based on additional information


• Prior Probability: Initial probability based on the present level of information
• Likelihood Term
• Evidence

Total Probability (Review):

• Let the rectangle be a sample space


• A1, A2, A3 and A4 are mutually exclusive and collectively exhaustive events
• Let B be another event in the sample space

𝑃(𝐵) = 𝑃(𝐵 ⋂𝐴1 ) + 𝑃(𝐵⋂𝐴2 ) + 𝑃(𝐵⋂𝐴3 ) + 𝑃(𝐵⋂𝐴4 )

= 𝑃(𝐵|𝐴1 ) ∗ 𝑃(𝐴1 ) + 𝑃(𝐵|𝐴2 ) ∗ 𝑃(𝐴2 ) + 𝑃(𝐵|𝐴3 ) ∗ 𝑃(𝐴3 ) + 𝑃(𝐵|𝐴4 ) ∗ 𝑃(𝐴4 )


4

= ∑ 𝑃(𝐵|𝐴𝑖 ) ∗ 𝑃(𝐴𝑖 )
𝑖=1

In general: 𝑷(𝑩) = ∑𝒌𝒊 𝑷(𝑩|𝑨𝒊 ) ∗ 𝑷(𝑨𝒊 )

If there are three events A1, A2 & B where A1 & A2 are mutually exclusive and collectively
exhaustive events then the workable form of Bayes’ theorem is,
𝑷(𝑩|𝑨𝟏 ) ∗ 𝑷(𝑨𝟏 ) 𝑷(𝑩|𝑨𝟏 ) ∗ 𝑷(𝑨𝟏 )
𝑷(𝑨𝟏 |𝑩) = =
𝑷(𝑩) 𝑷(𝑩|𝑨𝟏 ) ∗ 𝑷(𝑨𝟏 ) + 𝑷(𝑩|𝑨𝟐 ) ∗ 𝑷(𝑨𝟐 )

Thus, for n events A1, A2, ...., Ai, ..., An, the form of Bayes’ theorem is,
𝑷(𝑩|𝑨𝒊 ) ∗ 𝑷(𝑨𝒊 ) 𝑷(𝑩|𝑨𝒊 ) ∗ 𝑷(𝑨𝒊 )
𝑷(𝑨𝒊 |𝑩) = =
𝑷(𝑩) 𝑷(𝑩|𝑨𝟏 ) ∗ 𝑷(𝑨𝟏 ) + 𝑷(𝑩|𝑨𝟐 ) ∗ 𝑷(𝑨𝟐 ) + ⋯ 𝑷(𝑩|𝑨𝒏)𝑷(𝑨𝒏 )

---------------------------------------------------------------------------------------------------------------------------
Examples

1. A consulting firm submitted a bid for a large consulting contract. The firm's management
felt it had a 50-50 chance of landing the project. However, the agency to which the bid was
submitted subsequently asked for additional information. Past experiences indicate that
for 75% of successful bids and 40% of unsuccessful bids the agency asked for additional
information.
a) What is the prior probability of the bid being successful (that is, prior to the request
for additional information)?
b) What is the conditional probability of a request for additional information given that the bid
will be ultimately successful?
c) Compute the posterior probability that the bid will be successful given a request
for additional information.
Answer
Let A1 = the bid is successful
Let A2 = the bid is unsuccessful
Let B = additional information requested

P(A1) = 0.5
P(A2) = 0.5
P(B|A1) = 0.75
P(B|A2) = 0.4

We can represent this information using a tree diagram:

P(B⋂A1)=P(B|A1)*P(A1)=0.5*0.75=0.375

P(B’⋂A1)=P(B’|A1)*P(A1)=0.5*0.25=0.125
5

P(B⋂A2)=P(B|A2)*P(A2)=0.5*0.4=0.2

P(B’⋂A2)=P(B’|A2)*P(A2)=0.5*0.6=0.3

a) P(A1) = 0.5
b) P(B|A1) = 0.75
𝑃(𝐵|𝐴1 )𝑃(𝐴1 ) 𝑃(𝐵|𝐴1 )𝑃(𝐴1 ) 𝑃(𝐵|𝐴1 )𝑃(𝐴1 )
c) P(A1|B) = = ∑ 𝑃(𝐵|𝐴𝑖)∗𝑃(𝐴𝑖) = 𝑃(𝐵|𝐴
𝑃(𝐵) 1 )∗𝑃(𝐴1 )+𝑃(𝐵|𝐴2 )∗𝑃(𝐴2 )
0.75∗0.5
= (0.75∗0.5)+(0.4∗0.5)
= 0.652
---------------------------------------------------------------------------------------------------------------------------
2. A particular study showed that 12% of men will likely develop prostate cancer at some
point in their lives. A man with prostate cancer has 95% chance of a positive test result from
a medical screening exam. A man without prostate cancer has a 6% chance of getting a
false positive test result. What is the probability that a man has cancer given he has a
positive test result?

Answer
Let A1 = has prostate cancer
Let A2 = does not have prostate cancer
Let B = positive test result

P(A1) = 0.12
P(A2) = 0.88
P(B|A1) = 0.95
P(B|A2) = 0.06

P(A1|B) =?

𝑃(𝐵|𝐴1 ) ∗ 𝑃(𝐴1 ) 𝑃(𝐵|𝐴1 ) ∗ 𝑃(𝐴1 ) 0.95 ∗ 0.12


𝑃(𝐴1 |𝐵) = = = = 0.683
𝑃(𝐵) ∑ 𝑃(𝐵|𝐴𝑖) ∗ 𝑃(𝐴𝑖) (0.95 ∗ 0.12) + (0.06 ∗ 0.88)

The probability that a man has cancer given he has a positive test result is 68.3%.
---------------------------------------------------------------------------------------------------------------------------

3. Suppose that an insurance company classifies people into one of the three classes –
good risks, average risks and bad risks. Their records indicate that the probabilities
that good, average, and bad risk persons will be involved in an accident over a 1-year span
are 0.05, 0.15 and 0.3 respectively. 20% of the population are "good risks", 50% are
"average risks", and 30% are "bad risks”.
a) What proportion of people have accidents in a fixed year?
b) If policy holder A had no accidents in 1987, what is the probability that he or she is a good
risk person?
Answer
Let A1 = good risk
Let A2 = average risk
Let A3 = bad risk
Let B = accident occurs

P(A1) = 0.2
P(A2) = 0.5
P(A3) = 0.3
P(B|A1) = 0.05
P(B|A2) = 0.15
P(B|A3) = 0.3

a) 𝑃(𝐵) = ∑ 𝑃(𝐵|𝐴𝑖)𝑃(𝐴𝑖) = 𝑃(𝐵|𝐴1 ) ∗ 𝑃(𝐴1 ) + 𝑃(𝐵|𝐴2 ) ∗ 𝑃(𝐴2 ) + 𝑃(𝐵|𝐴3 ) ∗ 𝑃(𝐴3 )


= (0.05 ∗ 0.2) + (0.15 ∗ 0.5) + (0.3 ∗ 0.3) = 0.175
b) Let B’ = accident does not occur
P(B’) = 1 – P(B)
∴ P(B’) = 1 - 0.175 = 0.825
and P(B’|A1) = 1 - P(B|A1)
= 1 - 0.05 = 0.95
𝑃(𝐵′|𝐴1 ) ∗ 𝑃(𝐴1 ) 0.95 ∗ 0.20
P(A1 |B′) = = = 0.23
𝑃(𝐵′) 0.825
If policy holder A had no accidents in 1987, the probability that he or she is a good risk is
23%.

---------------------------------------------------------------------------------------------------------------------------

Practice Problems

Textbook: Probability & Statistics for Engineering and the Sciences (Devore)

Conditional Probability and Bayes' Theorem

Page 80-83: 45, 49, 51, 53, 55, 59, 61, 65, 67

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