- 72 Views
- Uploaded on
- Presentation posted in: General

STAT3600

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

STAT3600

Lecture 4

Conditional Probability, Bayes’ Theorem, Independence

- Partial information about or relevant to the outcome of an experiment may become available.
- We refer to the probability of occurrence of event A, P(A), as the unconditional probability of A.
- We will determine how the occurrence of an event B affects the probability of the occurrence of event A.

- Example 2.24 (page 76)
- 2 assembly lines: A (with older equipment) and A’ (with newer equipment)
- The daily production rates are tabulated as follows:

Shaded cells are totals, and the total production rate is 18 units/day.

- One item is picked randomly from the batch at the end of the day.
- P(the item was produced in line A) = P(A) = 8 / 18
- P(the item is defective) = P(B) = 3 / 18
- Given defective, P(the item was produced in line A) = P(A|B) = 2 / 3

B

A

A

A

B

2

2

6

6

1

1

9

B

2

A

A

- Using a Venn diagram:

OR

9

Given B:

B

2

OR

1

A

A

1

- Definition of conditional probability:
- For any two events A and B, the conditional probability of A given that B has occurred is defined by:

- Example 2.25 (page 77)
- Buyers of a certain digital camera;
- 60% include an optional memory card.
- 40% include extra battery.
- 30% both memory card and memory.

- A={memory card purchased}
- B={battery purchased}
- P(A) = 0.60, P(B) = 0.40, P(Both Purchased) = P(AB) = 0.30
- P(battery | memory card) = P(B|A) = P(AB) / P(A) = 0.30/0.60 = 0.50
- P(memory card | battery) = P(A|B) = P(AB) / P(B) = 0.30/0.40 = 0.75
- Note that P(A|B) P(B|A)

- Buyers of a certain digital camera;

B

A

0.02

0.03

0.07

0.05

0.04

0.08

0.20

C

- Example 2.26 (page 77)
- Three columns published in a magazine:
- A (Art), B (Books), C (Cinema)
- ABCABACBCABC
- .14.23.37.08.09.13.05

- Three columns published in a magazine:

P(A|B) = P(AB)/P(B) = 0.08 / 0.23 = 0.348

(Read: Given that one reads the books column regularly, what is the probability that (s)he also reads the art column?)

From the Venn Diagram:

P(A|B) = (0.03+0.05) / (0.03+0.05+0.07+0.08) = 0.08/0.23 = 0.348

P(A|BC) = P(A(BC)) / P(BC) = (0.03+0.05+0.04) / 0.47 = 0.255

P(A|At least one) = P(A|ABC) = P(A(ABC)) / P(ABC)

= P(A) / P(ABC) = 0.14 / 0.49 = 0.286

P(AB|C) = P((AB)C) / P(C) = (0.04+0.05+0.08) / 0.37 = 0.459

0.51

- The multiplication rule for P(AB)
- P(AB) = P(A|B) P(B)

- Example 2.27 (page 78)
- 1 out of 4 has the required blood type.
- P(At least 3 are typed)=?
- Define B={first not O+}, A={second not O+}
- P(B) = 3/4, P(A|B) = 2/3 (2 among the 3 left after the first test are not O+)
- P(At least 3 are typed) = P(AB) = P(A|B) P(B) = 2/3 3/4 = 0.50
- Define C={third O+}, P(C|(AB)) = 1/2 (1 among the 2 left is O+)
- P(third type is O+) = P(CAB) = P(C|(AB)) P(AB)
= P(C|(AB)) P(A|B) P(B)

= 1/2 2/3 3/4 = 1/4 = 0.25

- P(A1A2A3) = P(A3|A2A1) P(A2|A1) P(A1)

A1

0.20

A3

B

0.05

0.12

0.27

0.12

0.09

0.03

A2

A4

0.12

- The law of total probability:
- Let A1,…, Ak be mutually exclusive and exhaustive events. For any other event B;
- P(B) = P(B|A1)P(A1)+…+P(B|Ak)P(Ak)

- Example
- 4 different assembly plants for Honda CRX
- A1 = 25%, A2 = 36%, A3 = 24%, A4 = 15% of the total production.
- 1/5 (20%) of A1, 1/4 (25%) of A2, 1/2 (50%) of A3, and 1/5 (20%) of A4 plants’ products are imported into the US.
- Define event B = {a Honda CRX is imported into the US}

P(B)= P(B|A1)P(A1)+P(B|A2)P(A2)+P(B|A3)P(A3)+P(B|A4)P(A4)

= (1/5)(0.25) + (1/4)(0.36) + (1/2)(0.24) + (1/5)(0.15)

= 0.05 + 0.09 + 0.12 + 0.03 = 0.29

The probability that a Honda CRX being manufactured will be imported into the US is 0.29

- Bayes’ Theorem:
- Let A1,…, Ak be mutually exclusive and exhaustive events with P(Ai)>0 for i=1,..,k. Then for any event B with P(B)>0,

- Example (from previous slide)
- Given that a Honda CRX was imported to the US, what is the probability that it was assembled in A2?
- P(A2|B)=?
- P(A2|B) = P(B|A2) P(A2) / P(B) = 1/4 0.36 / 0.29 = 0.3103 ~ 31%
- From the Venn diagram P(A2|B) = 0.09 / (0.09 + 0.03 + 0.12 + 0.05) = 0.3103

- A statistics major was completely hung over the day of his final exam. It was a true/false test, so he decided to flip a coin for the answers. The statistics professor watched the student the entire two hours as he was flipping the coin... writing the answer... flipping the coin... writing the answer. At the end of the two hours, everyone else had left the final except for the one student. The professor walks up to his desk and interrupts the student, saying, "Listen, I have seen that you did not study for this statistics test, you didn't even open the exam. If you are just flipping a coin for your answer, what is taking you so long?" The student replies bitterly (as he is still flipping the coin), "Shhh! I am checking my answers!"

- Independence
- Definition: Two events are independent if
- P(A|B) = P(A)
and are dependent otherwise.

- P(A|B) = P(A)
- If A and B are independent, then the following are also correct:
- P(B|A) = P(B)
- Pair of events
- (1) A’ and B, (2) A and B’, (3) A’ and B’ are also independent.

- Definition: Two events are independent if

- Example 1:
- Roll two 6 sided dice.
- A={1st dice = 1 or 2 }, B={2nd dice = 3 or 5 or 6}

- P(A) = 2/6 = 1/3, P(B) = 3/6 = 1/2
- P(B|A) = P(B) = 1/2
- A and B are independent.

- Roll two 6 sided dice.
- Example 2:
- A and B are mutually exclusive events, and P(A)>0.
- P(A|B) = the probability that event A occurs given event B has occurred.
- By definition, mutually exclusive events cannot occur simultaneously. If B has occurred, A cannot occur. Therefore, P(A|B) = 0 P(A)
- When events A and B are mutually exclusive, they cannot be independent.

- P(AB) when A and B are independent:
- P(AB) = P(A) P(B)
- Paraphrased:
- P(AB) = P(A|B) P(B)
- If A and B are independent, P(A|B)=P(A)
- Therefore; P(AB) = P(A) P(B)

- Example:
- 30% of a company’s washing machines require service during the warranty period, whereas only 10% of its driers need service.
- If you buy both a washer and a dryer, what is the probability that both of them will need service?
- A={washer needs service}, B={drier needs service}
- P(A) = 0.30, P(B) = 0.10
- Assume the two machines function independently.
- P(AB) = P(A) P(B) = 0.30 0.10 = 0.03 or 3%
- The probability that neither of them will require service is:
- P(A’B’) = P(A’) P(B’) = 0.70 0.90 = 0.63

1

2

3

4

5

6

- Independence of more than one events:
- P(A1A2A3…Ak) = P(A1)P(A2)… P(Ak)

- Example 2.35 (page 89)
Case (a)

- Case (a)
P(system lifetime exceeds to) = P[(A1A2A3) (A4A5A6)]

= P(A1A2A3) + P(A4A5A6) P(A1A2A3) P(A4A5A6)

= (0.90)(0.90)(0.90) + (0.90)(0.90)(0.90) (0.90)(0.90)(0.90)(0.90)(0.90)(0.90)

= 0.927

Or

P(system lifetime exceeds to) = 1 P(system lifetime < to)

= 1 [P(subsystem lifetime < to)]2 = 1 [1 P(component lifetime exceeds to)3]2

= 1 (1 0.903)2 = 0.927

1

2

3

4

5

6

- Case (b)

P(system lifetime exceeds to) = [P(column lifetime exceeds to)]3

= [1 P(column lifetime < to)]3

= {1 [1 P(component lifetime exceeds to)]2}3

= [1 (1 0.902)]3

= 0.970

Example

Consider 100 individuals in a ballroom. Sixty of the 100 are college graduates, 55 are married and 35 are married college graduates. The name of the 100 individuals is written on 100 different slips and put in a box. One slip is drawn completely at random. Now define the following events.

- Let A = {The slip drawn is an individual who is a college graduate}.
- Let B = {The randomly selected person is married}.
- Clearly, P(A) = 60/100 = 0.60, P(B) = 55/100 = 0.55, and P(AB) = 0.35.
- (a) What is the pr that the selected individual is an unmarried college graduate?
P(AB) = P(A) P(AB) = 0.25

- (b) Similarly, P(BA) = 0.20 gives the pr that the selected person is w/o a college degree but married.
- (c) Suppose you are told that the selected person is a college graduate, i.e., we know that the event A has already occurred. Now what is the pr that the selected person is also married? The pr of the event B given that A has already occurred is given by
P(B|A) = P(BA) / P(A) = 0.35 / 0.60 = 0.58333

- As an example, suppose a 2nd person is selected at random from the ballroom (w/o replacing the 1st slip back in the box). Let the event C = {the 2nd person is a college grad}. Then
P(AC) = P(C|A) P(A) = (59/99) (60/100) = 0.3576

and events C and A would not be independent because the occurrence pr of C depends on A. Note that P(C|A) = 60/99.

- Had the 2nd drawing been performed with replacement then
P(AC) = P(A) P(C) = (60/100) (60/100) = 0.36

so that events A and C would be independent because P(C) would not depend on whether A occurs or not.

- Exercise
- (a) Compute the probability that the 1st person selected at random from the ballroom is neither a college grad nor married.
P(AB) = 1 P(AB) = 1 [P(A) + P(B) P(AB)]

= 1 (0.60 + 0.55 0.35)

= 1 0.80 = 0.20

- (b) Compute the probability that if 2 persons are selected at random (and w/o replacement from the box with 100 slips), one is a college grad and the other is married (or both).
P(“First CG only, Second M” or “First M only, Second CG” or “First MCG, Second CG only” or “First MCG, Second M only” or “Both MCG”)

= P(P(SM|FCGonly)P(FCGonly) + P(P(SCG|FMonly)P(FMonly) + P(P(SCGonly|FMCG)P(FMMCG) + P(P(SMonly|FMCG)P(FMCG) + P(P(SMCG|FMCG)P(FMCG)

= (55/99 25/100) + (60/99 20/100) + (25/99 35/100) + (20/99 35/100) + (34/99 35/100)

= 0.539393

OR

= 1 P(“First neither CG nor M” or “First CG or M, Second neither CG nor M” or “Both CG only” or “Both M only”)

= 1 (20/100 + 20/99 80/100 + 25/100 24/99 + 20/100 19/99)

= 0.539393

- (c) Repeat part (b) if the 2nd random selection is done with replacement.
= 1 (20/100 + 20/100 80/100 + 25/100 25/100 + 20/100 20/100)

= 0.5375

- (a) Compute the probability that the 1st person selected at random from the ballroom is neither a college grad nor married.