1 / 54

Lectures prepared by: Elchanan Mossel Yelena Shvets

Explore the concept of conditional probability and independence using the scenario of drawing objects from a magical hat.

hlombard
Download Presentation

Lectures prepared by: Elchanan Mossel Yelena Shvets

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. Lectures prepared by:Elchanan MosselYelena Shvets

  2. Three draws from a magic hat.

  3. Three draws from a magic hat. • Note: Draws are without replacement • Space of possible ‘3 draws’ from the hat:

  4. Three draws from a magic hat. • What is the chance that • we get an on the 2nd draw, • if we got a on the 1st draw?

  5. Three draws from a magic hat. p p p p p P(*I*|R**)=1/2 p

  6. Three draws from a magic hat. • What is the chance that • we get an on the 1st draw, • if we got a on the 2nd draw?

  7. Three draws from a magic hat. p p p p p P(I**|*R*)=1/2 p

  8. Counting formula.Under the uniform distribution: P(A|B)= #(AB)/#(B)

  9. Frequency interpretation • In a long sequence of trials, among those which belong to B, the proportion of those that also belong to A should be about P(A|B).

  10. Three draws from a magic hat. Let’s make 3 draws from the magic hat many times: #(AB)/#B = 4/7¼ 1/2

  11. For a uniform measure we have:

  12. Conditional probability in general: Let A and B be two events in a general probability space. The conditional probability ofAgivenB is denoted by P(A | B). It is given by: P(A | B) = P(AÅB) / P(B)

  13. Example: Rich & Famous Example: Rich & Famous In a certain town 10% of the inhabitants are rich, 5% are famous and 3% are rich and famous. Neither If a town’s person is chosen at random and she is rich what is the probability she is famous? Famous Rich

  14. Example: Rich & Famous Example: Rich & Famous In a certain town 10% of the inhabitants are rich, 5% are famous and 3% are rich and famous. Neither • P(R) = 0.1 • P(R & F) = 0.03 • P(F | R) = =0.03/0.1 • = 0.3 Famous Rich

  15. Example: Relative areas • A point is picked uniformly at random from the big rectangle whose area is 1. • Suppose that we are told that the point is in B, what is the chance that it is in A? A B

  16. Example: Relative areas AB B • In other words: Given that the point is in B, what is the conditional probability that it is in A? ) ( Area A B = 1/2 ( ) Area

  17. Multiplication Rule • For all events A and B such that P(B)  0: • P(AB)=P(B)P(A|B)

  18. Box then ball 1 5 2 4 3 • Consider the following experiment: • we first pick one of the two boxes; • , • and next we pick a ball from the boxed that we picked. • What’s the chance of getting a 2?

  19. Tree diagrams 1 5 2 4 3 1 5 2 4 3 P(Box 1) = 1/2 P(Box 2) = 1/2 P(4 | Box 2) =1/2 P(2 | Box 2) = 1/2 1/3 1/3 1/3 1/4 1/4 1/6 1/6 1/6 P(2) = P(2 Å Box2) = P(Box2) P(2|Box2) = ½*1/2 = 1/4

  20. Consider the Partition B1 B4 Bn B3 B2 Bn-1 B1t B2t … t Bn = W A AB1t AB2t … t ABn = A P(AB1)+P(AB2)+…+P(ABn) = P(A)

  21. Rule of Average Conditional Probabilities If B1,…,Bn is a disjoint Partition of  then • P(A)= P(AB1) + P(AB2) +…+ P(ABn) • = P(A|B1)P(B1) + P(A|B2)P(B2)+…+P(A|Bn)P(Bn)

  22. Box then ball 1 5 2 4 3 • We make the following experiment: • we first pick one of the two boxes; • , • and next we pick a ball from the boxed that we picked. • What’s the probability getting a number smaller • than 3.5?

  23. Independence • When the probability for A is unaffected by the occurrence of B we say that A and B are independent. • In other words, A and B are independent if • P(A|B)=P(A|Bc) = p Note that if A and B are independent then: P(A) = P(A|B)P(B) + P(A|Bc)P(Bc) = p P(B) + p P(Bc) = p

  24. Independence • Obvious: If A is independent of B then A is also independent of Bc • Question: If A is independent of B, is B independent of A?

  25. Independence Consider a ball picked uniformly: 1 1 2 1 1 2 Then Color=Red/Green and Number=1 or 2 are Independent: P(Red|#=1)=1/2=P(Red|#=2); P(Green|#=1)=1/2=P(Green|#=2);

  26. Independence 1 1 2 1 1 2 Also: P(#=2|Green)=1/3=P(#=2|Red); P(#=1|Green)=2/3=P(#=1|Red).

  27. Independence Consider a ball picked uniformly: 1 2 2 1 1 2 Then Color and Number are not independent: P(#=2|Green)=1/3 ¹ P(#=2|Red)=2/3;

  28. Independence • Points from a figure have coordinates X and Y. • If a point is picked at uniformly from a rectangle then • the events {X > a} and {Y > b} are • independent! X Y

  29. Independence • P(X>a & Y>b) = P(X>a) P(Y>b) = (1-a)(1-b) Y 1 ¾ ½ X 0 0 ½ ¾ 1

  30. Independence • Points from a figure have coordinates X and Y. • If a point is picked uniformly from a cat shape then • {X > a} and {Y > b} are • not independent! (at least for some a & b) Y X

  31. Independence • Points from a figure have coordinates X and Y. • Are the events {X > a} and {Y>b} independent if a point is picked uniformly at random from a disc? X Y

  32. Dependence 2 2 P(X> )= B/p =P(X> ) Y 2 B 2 B 1 Area = p X 0 2 0 1 2

  33. Dependence 2 2 P(X > & Y> ) = 0 ¹ B2/p2 Y 2 So the events Are not independent for a = b = B 2 B 1 X 0 2 0 1 2

  34. Independence • Follow up question: Are there values of a and b for which the event {X > a} and {X > b} are independent? X Y

  35. Recall: Multiplication Rule P(AB)=P(A|B)P(B) =P(A) P(B) This holds even if A and B are independent !

  36. Picking a Box then a Ball • If a ball is drawn from a randomly picked box comes out to be red, which box would you guess it came from and what is the chance that you are right?

  37. Box then Ball 1/3 1/3 1/3 2/3 1/3 1/2 1/2 3/4 1/4

  38. By the Rule of Average Conditional Probability P(R Ball) = P(R Ball | W Box) P(W Box) + P(R Ball| Y Box) P(Y Box) + P(R Ball | B Box) P(B Box) = ½ * 1/3 + 2/3*1/3 + ¾*1/3 = 23/36

  39. P( , ) ) P( | = 1/3*1/2 = 23/36 P( ) P( , ) ) P( | = 1/3*2/3 = 23/36 P( ) P( , ) ) P( | = 1/3*3/4 = 23/36 P( )

  40. Picking a Box then a Ball • If a ball is drawn from a randomly picked box comes out to be red, which box would you guess it came from and what is the chance that you are right? • A: Guess -> last box. Chances you are right: 9/23.

  41. Bayes’ Rule • For a partition B1, …, Bn of all possible outcomes,

  42. Sequence of Events • Multiplication rule for 3 Events • P(ABC) = P(AB)P(C|AB) = P(A) P(B|A) P(C|AB) Ac Bc Cc P(A) P(B|A) P(C|AB) C B A

  43. Multiplication rule for n Events • P(A1 A2 … An) = P(A1 … An-1)P(An|A1 … An-1) • = P(A1) P(A2|A1) P(A3|A1 A2)… P(An| A1 … An-1) A1c A2c Anc P(A1) P(A2|A1) P(An| A1 … An-1) A1 A2… An

  44. SheshBesh Backgammon • We roll two dice. What is the chance that we will roll out Shesh Besh: for the first time on the n’th roll?

  45. SheshBesh Backgammon • This is a Geometric Distribution • with parameter p=1/36.

  46. The Geometric distribution • In Geom(p) distribution the probability of outcome n is given by • p (1-p)n-1

  47. The Birthday Problem • n students in the class, what is the chance that at least two of them have the same birthday? • P(at least 2 have same birthday) = • 1 – P(No coinciding birthdays). • We arrange the students’ birthdays in some order: • B1, B2,…, Bn. • We need: • P(B2Ï {B1} & B3Ï {B1,B2} & … & BnÏ {B1,…,Bn-1}).

  48. Use multiplication rule to find • P(B2Ï {B1} & B3Ï {B1,B2} & … & BnÏ {B1,…,Bn-1}). B2=B1 B32 {B1,B2} Bn2{B1, … Bn-1} … B2Ï{B1} B3Ï{B1,B2} BnÏ{B1, … Bn-1}

  49. The Birthday Problem • P(at least 2 have same birthday) = • 1 – P(No coinciding birthdays) = This is hard to compute for large n. So we can use an approximation.

  50. The Birthday Problem • log(P(No coinciding birthdays))=

More Related