Probability: 6.3 Rules of Probabilities 6.4 Probability Trees 6.5 Bayes' Law

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

Lecture 5.

Chapter 6
Probability
6.3 Rules of probabilities
6.4 Probability trees
6.5 Bayes’ law

1
6.3 Rules of Probability
• Complement rule: S
A A
P(A) = 1 – P(A)
• Example 6.6, page 226: Flip a fair coin until head
comes up for the first time. Determine the probability that
at least two flips will be required to obtain a head.
Solution: S = {1, 2, 3, 4, …} where each number 1, 2, 3, 4,
… denotes the outcome that this number of flips is required to
obtain a head.
Denote A – event that only one flip is required: A = {1}
Then A - event that at least two flips are required:
= {2, 3, 4, …}. Since P(A) = ½ we have P( ) = 1 – P(A) = ½.

2
Rules of Probability (Contd.)
• Addition rule: For any two events A and B

P(A È B) = P(A) + P(B) – P(A Ç B) A B


• Multiplication rule:

P(A Ç B) = P(A) P(B/A) = P(B) P(A/B)


P(A Ç B) = P(A)P(B) if A and B independent A B

• Example: Given 50% of (equally likely) outcomes in A,


60% of outcomes in B, 15% of outcomes in intersection of A
and B. Then there are 50% + 60% - 15% = 95% of
outcomes in A È B. Hence P(A È B) = 95% = 0.95.
• P(AÇB) = 15%. Note: P(B/A)= P(AÇB)/P(A)= 0.15/0.5=0.3,
and also P(AÇB) = P(A)*P(B/A) = 0.5*0.3 = 0.15 = 15%.

3
Example 6.8, page 229
§ A computer software supplier develops a new record –
keeping package for use by hospitals.
– The probability that the new package will show profit is
60% if the competitor does not introduce a product of
comparable quality.
– The probability that the new package will show profit is
30% if the competitor introduces a comparable
product.
– The probability of introducing a comparable product is
50%.
§ All the above probabilities are subjective ones based on a
subjective analysis.
§ Denote: Event A: The competitor introduces a comparable
product, Event B: The new package is profitable

4
§ Denote:
-The probability that both A and B will occur: P(AÇB)
-The probability that either A or B will occur: P(AÈB)
-The probability that neither A nor B will occur: P(AÇB)
§ Solution
- P(A) = 0.5; P(B) = 0.6; P(B|A) = 0.3
- P(A Ç B) = P(A)P(B|A) = (0.5)(0.3) = 0.15
- P(A È B) = P(A) + P(B) – P(A and B) = 0.5 + 0.6 – 0.15
=0.95
- P(A Ç B) = P(A È B) = 1 - P(A È B) = 1 – 0.95 = 0.05
§ Note: A Ç B = A È B AÈB

AA È B AÇB=AÈB

5
6.4 Probability Trees
An effective and simple method of applying the probability
rules is the probability tree, wherein the events in an
experiment are represented by lines. The resulting figure
resembles a tree, hence the name.
Example, page 231: Flip a coin twice

H P(HH)=0.25
Stage 1 Stage 2 HH
P(HT)=0.25
H
Second flip P(TH)=0.25
P(TT)=0.25
T
HT Simple
First flip H
Origin TH events
(outcomes
Second flip
T T of the
TT experiment)
6
Probability Trees (Contd.)
Calculate the probability of event A, where
A = {at least one outcome of heads}
= {HH, HT, TH}
Sample space S ={HH, HT, TH, TT}

P(HH)=0.25
HH
P(HT)=0.25
P(TH)=0.25
The HT
P(TT)=0.25
sample
space = P(A) = 0.25+0.25+0.25 = 0.75
TH
Also P(A) = number of
outcomes in A / number of
TT
outcomes in S = ¾ = 0.75
7
Example 6.9, page 232
• The buying behavior of customers over a long period
of time:
– From experience it is known that the probability
that a customer buys a shirt is 40%.
– A customer buys a tie 50% of the time when a
shirt is purchased.
– A customer buys a tie 10% of the time when a
shirt is not purchased.
• Find the probabilities of the following events:
a. A customer buys a shirt and a tie: R Ç T
b. A customer buys a tie: T
c. A customer buys a shirt or a tie: R È T
d. A customer buys a tie but not a shirt: R Ç T
8
Outcomes Joint
Stage 1 Stage 2 probabilities
T
RÇT P(R Ç T) = 0.20

T
RÇT P( R Ç T ) = 0.20
T
RÇT P( R Ç T ) = 0.06

R: A customer buys a shirt T


RÇT P( R Ç T ) = 0.54
T: A customer buys a tie
9
Example, page 236
• Suppose we are interested in the condition of a
machine that produces a particular item.
– From experience it is known that the machine is in
good condition 90% of the time.
– When in good condition, the machine produces a
defective item 1% of the time.
– When in bad condition, the machine produces a
defective 10% of the time.
• An item selected at random from the current
production run was found to be defective.

With this additional information, what is the probability that the


machine is in good condition?

10
Solution Outcomes Joint
Prior probabilities Conditional probabilities probabilities
B AÇB
P(A Ç B) = 0.009
A

B AÇB

B P(A Ç B) = 0.01
AÇB

A P(B) = 0.019
P(A/B)
= P(AÇB)/P(B)
A: Machine is in good condition = 0.009/0.019
B
AÇB = 0.47
B: Item is defective
11
6.5 Bayes’ Law
• Bayes’ law is named for Thomas Bayes, an
eighteenth century mathematician. In its most basic
form, if we know P(A), P(B|A) and P(B|A), we can
apply Bayes’ theorem to determine P(A|B).
• Example, page 236 (contd.)
𝐏 𝐀∩𝐁 𝐏 𝐀 𝐏 𝐁𝐀
𝐏 𝐀𝐁 = = *
𝐏(𝐁) 𝐏 𝐀 𝐏 𝐁 𝐀 )𝐏(𝐀* )𝐏 𝐁 𝐀
+.-∗+.+/ +.++- +.++-
= = = = 0.47
+.-∗+.+/)+./∗+./ +.++-)+.+/ +.+/-
• P(A) is called the prior probability, P(A/B) is called
the posterior probability. In light of the new
information that event B B
has occurred, it is necessary t
to revise P(A) as P(A/B). P(A) P(A/B)12
Bayes’ Law (Contd.)
• If Ai is one of the n mutually exclusive events A1, A2,
…., An at the first stage, and B is an event at the
second stage, then
• 𝐏 𝐀𝐢 𝐁 =
𝐏 𝐀𝐢 ∩𝐁 𝐏 𝐀𝐢 𝐏 𝐁 𝐀 𝐢
=
𝐏(𝐁) 𝐏 𝐀𝟏 𝐏 𝐁 𝐀𝟏 )𝐏 𝐀𝟐 𝐏 𝐁 𝐀𝟐 )⋯)𝐏 𝐀𝐧 𝐏 𝐁 𝐀𝐧
• Example, page 236 (contd.): Denote
A1 – event “machine is in good condition”
A2 – event “machine is not in good condition”
B – event “machine produces an defective item”
Table
Events 6.7, page
Prior P(Ai)237:
Conditional Joint P(AiÇB) Posterior
P(B/Ai) P(Ai/B)
A1 0.9 0.01 0.009 0.47
A2 0.1 0.10 0.01 0.53
P(B) = 0.019 13
Real-life application: example 6.12, page 240
– Medical tests can produce false-positive or false-
negative results which have serious and costly
consequences.
– A particular test (PSA screening for men between 40
and 50 years old to determine evidence of prostate
cancer) is found to perform as follows:
• correctly diagnoses ‘positive’ 70% of the time
• correctly diagnoses ‘negative’ 86.5% of the time.
– It is known that 1% of men in the general population
suffer from the illness.
– What is the probability that a man is suffering from the
illness, if the test result were positive?
– What is the probability that a man is not suffering from
the illness, if the test result were positive?

14
Example 6.12 (contd.)
Solution
§ Define the following events
– C = has the disease (prostate cancer)
– C = does not have the disease
– PT = positive test results
– NT = negative test results
§ The probabilities provided are:
– P(C) = 0.01 P(C) = 0.99
– P(PT|C) = 0.70 P(NT|C)= 0.30
– P(PT|C) = 0.135 P(NT|C) = 0.865
§ The probabilities to be determined are:
P(C|PT) and P(C|PT).
15
Example 6.12 (contd.): Bayes’ Law

Prior Conditional
Posterior probabilities
probabilities probabilities
P(C Ç PT)
=.007
P(C | PT ) = P(C Ç PT)
P(PT)

+ =
.007
= .0498
P(C Ç PT) .1407
=.1337

P(PT) =.1407

16
Example 5.11 (contd.): Bayes’ Law

Prior Conditional
Posterior probabilities
probabilities probabilities
P(C Ç PT)
=.007
P(C | PT ) = P( C Ç PT)
P(PT)

+ =
.1337
= .9502
P(C Ç PT) .1407
=.1337

P(PT) =.1407
By a short cut:

P(C | PT ) = 1 - P(C PT ) = 1 - 0.0498 = 0.9502


17
Summary: page 244

Home assignment:

- Section 6.3 Exercises pages 230 - 231: 6.45,


6.47, 6.50, 6.51

- Section 6.4 Exercises pages 234 - 235: 6.59,


6.63, 6.68

- Section 6.5 Exercises pages 242 - 243: 6.72, 6.77

18

You might also like