1 / 58

Bayes Rule for probability

Bayes Rule for probability. An generalization of Bayes Rule. Let A 1 , A 2 , … , A k denote a set of events such that. for all i and j . Then. Example:.

ketan
Download Presentation

Bayes Rule for probability

An Image/Link below is provided (as is) to download presentation 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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Bayes Rule for probability

  2. An generalization of Bayes Rule Let A1, A2 , …, Ak denote a set of events such that for all i and j. Then

  3. Example: We have three urns. Urn 1 contains 14red balls and 12black balls. Urn 2 contains 6red balls and 20black balls. Urn 3 contains 3red balls and 23black balls. An Urn is selected at random and a ball is selected from that urn. Urn 1 Urn 3 Urn 2 If the ball turns out to be red what is the probability that it came from the first urn? second urn? third Urn?

  4. Solution: Let Ai= the event that we select urn i Let B = the event that we select a red ball Note: the desired conditional probability is in the reverse direction of the given conditional probabilities. This is the case when Bayes rule should be used

  5. Bayes rule states

  6. Example: Suppose that an electronic device is manufactured by a company. During a period of a week • 15% of this product is manufactured on Monday, • 23% on Tuesday, • 26% on Wednesday , • 24% on Thursday and • 12% on Friday.

  7. Also during a period of a week • 5% of the product is manufactured on Monday is defective • 3 % of the product is manufactured on Tuesday is defective, • 1 % of the product is manufactured on Wednesday is defective , • 2 % of the product is manufactured on Thursday is defective and • 6 % of the product is manufactured on Friday is defective. If the electronic device manufactured by this plant turns out to be defective, what is the probability that is as manufactured on Monday, Tuesday, Wednesday, Thursday or Friday?

  8. A1 = the event that the product is manufactured on Monday A2 = the event that the product is manufactured on Tuesday A3 = the event that the product is manufactured on Wednesday A4 = the event that the product is manufactured on Thursday A5 = the event that the product is manufactured on Friday Solution: Let Let B = the event that the product is defective

  9. Now P[A1]= 0.15, P[A2]= 0.23, P[A3]= 0.26, P[A4]= 0.24 and P[A5]= 0.12 Also P[B|A1]= 0.05, P[B|A2]= 0.03, P[B|A3]= 0.01, P[B|A4]= 0.02 and P[B|A5]= 0.06 We want to find P[A1|B], P[A2|B], P[A3|B], P[A4|B]and P[A5|B]. We will apply Bayes Rule

  10. The sure thing principle and Simpson’s paradox

  11. The sure thing principle Suppose Example – to illustrate Let A = the event that horse A wins the race. B = the event that horse B wins the race. C = the event that the track is dry = the event that the track is muddy

  12. Proof:

  13. Simpson’s Paradox Does Example to illustrate D = death due to lung cancer S = smoker C = lives in city, = lives in country

  14. Then the statement would be true using the Sure Thing Principle If we let This logic is incorrect The events are not defined and do not make sense. The conditional probabilities are defined.

  15. Solution similarly

  16. whether is greater than depends also on the values of

  17. whether than and

  18. The Monty Hall Problem 1 2 3 Behind one of the three doors there is a valuable prize. Behind the other two doors is a worthless prize. You are asked to pick one of the doors. After you have selected, Monty Hall opens one of the doors and reveals a worthless prize. He then asks you do you want to switch your choice.

  19. Should you change your choice? • Should you keep your first choice? or • It does not matter. Solution Suppose you choice is door #1, and Monty reveals that door #3 has a worthless prize behind it. We can always renumber the doors so that this is the case. Let Ai= the event that the valuable prize is behind door number i. i = 1, 2, 3. P [A1]= P [A2] = P [A3] =1/3 S = A1  A2 A3and Ai Aj = f

  20. Another Solution (the correct solution) The probability that you pick the correct door is 1/3 . If you pick the correct door Monty will pick randomly between the two worthless doors. If you did not pick the correct door Monty will choose the worthless door to open with with probability 1. Again P [A1]= P [A2] = P [A3] =1/3 and S = A1  A2 A3and Ai Aj = f Let Bi= the event that Monty opens door i. i = 1, 2, 3.

  21. Also and We want to compute P [A1|B3]andP [A2|B3].

  22. and

  23. Another Problem 1 2 3 We have three chests each having 2 drawers In chest 1 there is a gold coin in each drawer. In chest 2 there is a silver coin in each drawer. In chest 3 there is a gold coin in the top drawer and a silver coin in the bottom drawer..

  24. 1 2 3 One of the chests is selected at random. Then the drawer is selected at random. The coin in that drawer turns out to be gold. What is the probability that the coin in the other drawer is also gold? Is it ½? Solution Let Ci= the event that we select Chest i. i = 1, 2, 3. P [C1]= P [C2] = P [C3] =1/3 S = C1  C2 C3and Ci Cj = f

  25. Let D1 = the event that we select top drawer in the chest. D2 = the event that we select bottom drawer in the chest. Let G = the event the coin in the drawer is gold = (C1  D1) (C1  D2) (C3  D1) We want to compute P[C1|G].

  26. Thus Comment: There are 6 drawers and three of those drawers contain gold coins. Of those three drawers two are in a chest that has a gold coin in the other drawer.

  27. Random Variables an important concept in probability

  28. A random variable , X, is a numerical quantity whose value is determined be a random experiment Examples • Two dice are rolled and X is the sum of the two upward faces. • A coin is tossed n = 3 times and X is the number of times that a head occurs. • We count the number of earthquakes, X, that occur in the San Francisco region from 2000 A. D, to 2050A. D. • Today the TSX composite index is 11,050.00, X is the value of the index in thirty days

  29. Examples – R.V.’s - continued • A point is selected at random from a square whose sides are of length 1. X is the distance of the point from the lower left hand corner. point X • A chord is selected at random from a circle. X is the length of the chord. chord X

  30. Definition – The probability function, p(x), of a random variable, X. For any random variable, X, and any real number, x, we define where {X = x} = the set of all outcomes (event) with X = x.

  31. Definition – The cumulative distribution function, F(x), of a random variable, X. For any random variable, X, and any real number, x, we define where {X≤x} = the set of all outcomes (event) with X ≤x.

  32. Examples • Two dice are rolled and X is the sum of the two upward faces. S , sample space is shown below with the value of X for each outcome

  33. Graph p(x) x

  34. The cumulative distribution function, F(x) For any random variable, X, and any real number, x, we define where {X≤x} = the set of all outcomes (event) with X ≤x. Note {X≤x} =f if x < 2. Thus F(x) = 0. {X≤x} ={(1,1)} if 2 ≤ x < 3. Thus F(x) = 1/36 {X≤x} ={(1,1) ,(1,2),(1,2)} if 3 ≤ x < 4. Thus F(x) = 3/36

  35. Continuing we find F(x) is a step function

  36. A coin is tossed n = 3 times and X is the number of times that a head occurs. The sample Space S = {HHH (3), HHT (2), HTH (2), THH (2), HTT (1), THT (1), TTH (1), TTT (0)} for each outcome X is shown in brackets

  37. Graphprobability function p(x) x

  38. GraphCumulative distribution function F(x) x

  39. Examples – R.V.’s - continued • A point is selected at random from a square whose sides are of length 1. X is the distance of the point from the lower left hand corner. point X • A chord is selected at random from a circle. X is the length of the chord. chord X

  40. E Examples – R.V.’s - continued • A point is selected at random from a square whose sides are of length 1. X is the distance of the point from the lower left hand corner. point X S An event, E, is any subset of the square, S. P[E] = (area of E)/(Area of S) = area of E

  41. S The probability function Thus p(x) = 0 for all values of x. The probability function for this example is not very informative

  42. S The Cumulative distribution function

  43. S

  44. The probability density function, f(x), of a continuous random variable Suppose that X is a random variable. Let f(x) denote a function define for - < x <  with the following properties: • f(x) ≥ 0 Then f(x) is called the probability density function of X. The random, X, is called continuous.

  45. Probability density function, f(x)

More Related