Presentation is loading. Please wait.

Presentation is loading. Please wait.

2.8 Bayes’ Rule Theorem of Total Probability(全概率公式)

Similar presentations


Presentation on theme: "2.8 Bayes’ Rule Theorem of Total Probability(全概率公式)"— Presentation transcript:

1 2.8 Bayes’ Rule Theorem of Total Probability(全概率公式)
Let A and B are two events in a sample space S. Then A = (AB)(AB’) P(A) = P(AB) + P(AB’) = P(A|B)P(B) + P(A|B’)P(B’) B B’ AB AB’

2 In general (Theorem 2.16) If the events B1, B2, …,Bk constitute a partition of the sample space S such that P(Bi)  0 for i = 1, 2, …, k, then for any event A of S,

3 S A B1 B2 … … Bk AB1 AB2 ABi... ABk Proof:

4 General Procedure in Computing the Probability of Events
Write down events and analyze relations between them. Recall some relevant probability formulas. Input data and find the solutions.

5 Example 2.38, page 59 In the 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. Suppose that a finished product is randomly selected. What is the probability that it is defective? Solution: D={the product is defective} Bi={the product is made by machine Bi} P(B1)= 30% , P(B2)= 45% , P(B3)= 25% P(D) = P(DB1) + P(DB2) + P(DB3) = P(D|B1)P(B1) + P(D|B2)P(B2) +P(D|B3)P(B3) = 0.02(0.3) (0.45) (0.25)

6 Example. Which box? Suppose there are three similar boxes. Box i contains i white balls and one black ball, i = 1, 2, 3. Suppose I mix up the boxes, and then pick up one at random and show you the ball. I offer you a price if you can guess correctly what box it comes from. Problem: Which box would you guess if the ball drawn is white and what is the chance of your guessing right?

7 Solution: Find P(Box 3 | white) =
P(Box 3 and white) = P(white| Box 3)P(Box 3)=(3/4)(1/3)=1/4 P(white) = P(white | Box i)P(Box i) (全概率公式) = [ i/(i + 1)](1/3) = (1/3)(1/2+2/3+3/4)=23/36  P(Box 3 | white) = = (1/4)/(23/36)=9/23

8 In general: Suppose that the events represent n mutually exclusive possible results of the first stage of some procedure and P( ) = 1. Rather, the result A of some second stage has been observed, whose chances depends on which of the B’s has occurred. ((P(A| Bi ) is often known) The general problem is to find the probabilities of the event Bj given the occurrence of A. (P(Bj | A) ) In this example, first, pick a box; then pick a ball from the box.

9 Bayes’ Rule (Theorem 2.17) If the events constitute a partition of the sample space S, where  0 for i = 1, 2, …, k, then for any event A of S, such that P(A)  0, for r = 1, 2,…, k. P(Ai) P(Ai/B) B1 B2 … Bk P(A/Bi) B P(Bi)—prior probability P(Bi/A) posterior probability A

10 Example: False positive(阳性)
Suppose that a laboratory test on a blood sample yields one of two results, positive or negative. It is found that 95% of the people with a particular disease will produce a positive result. But 2% of people without disease will also produce a positive result (a false positive). Suppose that 1% of the population actually has the disease. What is the probability that a person chosen at random from the population will have the disease, given that the person’s blood yields a positive result? Test on blood for positive or negative

11 D ND + _ 0.95 0.05 0.98 0.02 Need to find P(D | +) = ? P(D) = 1% , P(D’) = 99%, P(+ | D) = 95%, P(+ | D’) = 2% P(D | +) = [P(D)P(+ | D)] /[P(+ | D)P(D)+ P(+ | D’)P(D’)] = 95/293

12 P(10%) = P(10%|best) P(best) + P(10%|not best) P(not best)
Example: You have decided to invest in the stock market for the first time and considering three investment strategies. You want to earn at least a 10% return on your money. The probability of a 10% return if you pick the best of the three strategies is 1/3. If you do not pick the best of the three strategies, your chances of a 10% return are 1/5. 1. What is the probability that you will earn a return of 10% if you pick randomly among the three strategies? 2. Given that you find at the end of six months that you have earned a 10% return, what is the probability that you picked best of the three strategies?  P(10%) = P(10%|best) P(best) + P(10%|not best) P(not best) = (1/3)1/3 + 1/5 (2/3) =11/45 P(best|10%) = P(best and 10%)/P(10%) = P(10%|best) P(best) / [P(10%|best)P(best) + P(10%|not best)P(not best)] = (1/9)/[(1/9) + (2/15)]=5/11

13 Example 1 A bank classifies customers as either good or bad credit risks. On the basis of extensive historical, the bank has observed that 1% of good credit risks and 10% of bad credit risks overdraw their account in any given month. A new customer opens a checking account at this bank. On the basis of a check with a credit bureau, the bank believes that there is a 70% chance the customer will turn out to be a good credit risk. Suppose that this customer’s account is overdrawn in the first month. How does this alter the bank’s opinion of this customer’s creditworthiness?

14 Solution: Let G: Customer considered a good risk.
O: Customer overdraws checking account. From the bank’s historical data, we have On the other hand, the bank’s initial opinion about the customer’s creditworthiness is given by Using Bayes’theorem


Download ppt "2.8 Bayes’ Rule Theorem of Total Probability(全概率公式)"

Similar presentations


Ads by Google