dominique mwita

4
Lecture 5 Conditional Probability, Bayes Theorem, and Independence 1 Conditional Probability (Def ) Probability of event A given that the event B occurred = Conditional probability of A given B = P ( A B ) = P ( A B ) P ( B ) Graphical Representation: Example 1: Suppose that of all individuals buying a certain camera, 60% include an optional memory card in their purchase, 40% include an extra battery, and 30% include both a card and battery. Consider randomly selecting a buyer and let A=memory card purchased and B=battery purchased. Then, P (A)= P ( Optional Memory ) =0.6; P (B)= P ( Extra Bat. ) = 0.4; P (A B)= P ( Both optional memory card and extra Battery ) =0.3. Then, what is the probability that if one choose an extra bat., he also choose optional memory? What is the probability that if one choose an optional mem., he also choose extra bat.? 2 Bayes Theorem Multiplicative rule for P ( A B ) P ( A B ) = P ( A ) · P ( B A ) = P ( B ) · P ( A B ) Example 2 A chain of video stores sells three different brands of VCRs. Of its VCR sales, 50% are brand 1(the least expensive), 30% are brand 2, and 1

Upload: dom

Post on 10-Apr-2015

57 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: dominique mwita

Lecture 5Conditional Probability, Bayes Theorem, and Independence

1 Conditional Probability

• (Def) Probability of event A given that the event B occurred

= Conditional probability of A given B

= P(

A∣

∣B)

=P

(

A ∩ B)

P(

B)

• Graphical Representation:

• Example 1:Suppose that of all individuals buying a certain camera, 60% include an

optional memory card in their purchase, 40% include an extra battery,and 30% include both a card and battery. Consider randomly selecting

a buyer and let A=memory card purchased and B=battery purchased.Then, P (A) = P

(

Optional Memory)

= 0.6; P (B) = P(

Extra Bat.)

=

0.4; P (A∩B) = P(

Both optional memory card and extra Battery)

= 0.3.Then, what is the probability that if one choose an extra bat., he alsochoose optional memory? What is the probability that if one choose an

optional mem., he also choose extra bat.?

2 Bayes Theorem

• Multiplicative rule for P(

A ∩ B)

P(

A ∩ B)

= P(

A)

· P(

B∣

∣A)

= P(

B)

· P(

A∣

∣B)

Example 2 A chain of video stores sells three different brands of VCRs. Ofits VCR sales, 50% are brand 1(the least expensive), 30% are brand 2, and

1

Page 2: dominique mwita

20% are brand 3. Each manufacturer offers a 1-year warranty on parts andlabor. It is known that 25% of brand 1’s VCRs require warranty repairwork, whereas the corresponding percentages for brands 2 and 3 are 20%

and 10%, respectively. What is the probability that a randomly selectedpurchaser has bought a brand 1 VCR that will need repair while under

warranty?

• Law of total probability

Let A1, A2, · · · , Ak are mutually exclusive and exhaustive events= a partition of the sample space. Then,

P(

B)

= P(

B ∩ A1

)

+ P(

B ∩ A2

)

+ · · · + P(

B ∩ Ak

)

= P(

A1

)

P(

B∣

∣A1

)

+ P(

A2

)

P(

B∣

∣A2

)

+ · · · + P(

Ak

)

P(

B∣

∣Ak

)

=k

i=1

P(

Ai

)

P(

B∣

∣Ai

)

Example 2 continued.In example 2, what is the probability that a randomly selected purchaser

has a VCR that will need repair while under warranty?

• Bayes Theorem

Let A1, A2, · · · , Ak are a partition of the sample space with P(

Ai

)

> 0.Then,

P(

Aj

∣B)

=P

(

Aj ∩ B)

P(

B)

=P

(

B∣

∣Aj

)

P(

Aj

)

∑ki=1

P(

Ai

)

· P(

B∣

∣Ai

)

– Example 2 continued. In example 2, if a customer returns to the storewith a VCR that needs warranty repair work, what is the probability

that it is a brand 1 VCR? A brand 2 VCR? A brand 3 VCR?

2

Page 3: dominique mwita

– Example 3 Only 1 in 1000 adults is afflicted with a rare disease forwhich a diagnostic test has been developed. The test is such thatwhen an individual actually has the disease, a positive result will oc-

cur 99% of the time, whereas an individual without the disease willshow a positive test result only 2% of the time. If a randomly selected

individual is tested and the result is positive, what is the probabilitythat the individual has the disease?

– Problem 1 At a certain gas station, 40% of the customers use regularunleaded gas(A1), 35% use extra unleaded gas(A2), and 25% use pre-

mium unleaded gas(A3). Of those customers using regular gas, only30% fill their tanks (event B). Of those customers using extra gas,60% fill their tanks, whereas of those using prenimum, 50% fill their

tanks.1. What is the probability that the next customer will request extra

unleaded gas and fill the tank (that is, A2 ∩ B)?2. What is the probability that the next customer fills the tank?

3. If the next customer fills the tank, what is the probability thatregular gas is required? Extra gas? premium gas?

3 Independence

• (Def) A and B are independent:

P(

A∣

∣B)

= P(

A)

or P(

A ∩ B)

= P(

A)

P(

B)

• Example 4 Five independent components are connected in series. Theprobability that each component works is 0.9. What is the probability

that the system does not work?

3

Page 4: dominique mwita

(sol) Denote a component that fails by F and one that doesn’t fail by S (forsuccess). For A to occur, at least one of the individual components mustfail. So, A=SSSSF, SSSFS,. . . which are 31 different outcomes in A. But,

consider Ac(or A’), the event that the system works. The event Ac hasonly one outcome(SSSSS).

P (Ac) = P (SSSSS) = P (S)×P (S)×P (S)×P (S)×P (S) = 0.95 = 0.59.

So, P (Ac) = 1 − P (A) = 1 − 0.59 = 0.41.

4