uq stat2201 2017 lecture 2 unit 2 probability and monte
play

UQ, STAT2201, 2017, Lecture 2, Unit 2, Probability and Monte Carlo. - PowerPoint PPT Presentation

UQ, STAT2201, 2017, Lecture 2, Unit 2, Probability and Monte Carlo. 1 Im willing to bet that there are two people in the room with the same birthday! Well revisit this birthday problem a few times during the lecture. 2 Sample


  1. UQ, STAT2201, 2017, Lecture 2, Unit 2, Probability and Monte Carlo. 1

  2. I’m willing to bet that there are two people in the room with the same birthday! We’ll revisit this “birthday problem” a few times during the lecture. 2

  3. Sample Space, Outcomes and Events 3

  4. An experiment that can result in different outcomes, even though it is repeated in the same manner every time, is called a random experiment . 4

  5. The set of all possible outcomes of a random experiment is called the sample space of the experiment, and is denoted as Ω. (In [MonRun2014] denoted as S ). 5

  6. A sample space is discrete if it consists of a finite or countable infinite set of outcomes. A sample space is continuous if it contains an interval (either finite or infinite) of real numbers, vectors or similar objects. 6

  7. 7

  8. An event is a subset of the sample space of a random experiment. 8

  9. The union of two events is the event that consists of all outcomes that are contained in either of the two events or both. We denote the union as E 1 ∪ E 2 . 9

  10. The intersection of two events is the event that consists of all outcomes that are contained in both of the two events. We denote the intersection as E 1 ∩ E 2 . 10

  11. The complement of an event in a sample space is the set of outcomes in the sample space that are not in the event. We denote the complement of the event E as E . The notation E C is also used in other literature to denote the complement. Note that E ∪ E = Ω. 11

  12. Union and intersection are commutative operations: A ∩ B = B ∩ A A ∪ B = B ∪ A . and 12

  13. Two events, denoted E 1 and E 2 are mutually exclusive if: E 1 ∩ E 2 = ∅ where ∅ is called the empty set or null event . A collection of events, E 1 , E 2 , . . . , E k is said to be mutually exclusive if for all pairs, E i ∩ E j = ∅ . 13

  14. The distributive law for set operations: ( A ∪ B ) ∩ C = ( A ∩ C ) ∪ ( B ∩ C ) , ( A ∩ B ) ∪ C = ( A ∪ C ) ∩ ( B ∪ C ) . 14

  15. DeMorgan’s laws: ( A ∪ B ) c = A c ∩ B c ( A ∩ B ) c = A c ∪ B c . and See in Julia, that !( A || B ) == ! A && ! B . 15

  16. 16

  17. Probability 17

  18. Probability is used to quantify the likelihood, or chance, that an outcome of a random experiment will occur. 18

  19. Whenever a sample space consists of a finite number N of possible outcomes, each equally likely , the probability of each outcome is 1 / N . 19

  20. For a discrete sample space, the probability of an event E , denoted as P ( E ), equals the sum of the probabilities of the outcomes in E. 20

  21. If Ω is the sample space and E is any event in a random experiment, (1) P (Ω) = 1. (2) 0 ≤ P ( E ) ≤ 1. (3) For two events E 1 and E 2 with E 1 ∩ E 2 = ∅ (disjoint), P ( E 1 ∪ E 2 ) = P ( E 1 ) + P ( E 2 ) . (4) P ( E c ) = 1 − P ( E ). (5) P ( ∅ ) = 0. 21

  22. Back to the birthday problem: n = Number of students in class . E = { Two or more shared birthdays } . P ( E ) =? P ( E ) = 1 − P ( E c ) . E c = { No one has the same birthday } . 22

  23. Take n = 3: P ( E c ) = P (No same birthday) = number outcomes without same birthday number of possible birthday outcomes = 365 · 364 · 363 . 365 3 23

  24. Take general n ≤ 365: P ( E c ) = P (No same birthday) = number outcomes without same birthday number of possible birthday outcomes = 365 · 364 · . . . · (365 − n + 1) 365 n = 365! / (365 − n )! 365 n Try it in Julia. 24

  25. Probabilities of Unions 25

  26. The probability of event A or event B occurring is, P ( A ∪ B ) = P ( A ) + P ( B ) − P ( A ∩ B ) . If A and B are mutually exclusive events, P ( A ∪ B ) = P ( A ) + P ( B ) . 26

  27. For a collection of mutually exclusive events , P ( E 1 ∪ E 2 ∪ · · · ∪ E k ) = P ( E 1 ) + P ( E 2 ) + . . . P ( E k ) . 27

  28. Conditional Probability and Independence 28

  29. The probability of an event B under the knowledge that the outcome will be in event A is denoted P ( B | A ) and is called the conditional probability of B given A . The conditional probability of an event B given an event A , denoted as P ( B | A ), is P ( B | A ) = P ( A ∩ B ) for P ( A ) > 0 . P ( A ) 29

  30. The multiplication rule for probabilities is: P ( A ∩ B ) = P ( B | A ) P ( A ) = P ( A | B ) P ( B ). 30

  31. For an event B and a collection of mutual exclusive events, E 1 , E 2 , . . . , E k where their union is Ω. The law of total probability yields, P ( B ) = P ( B ∩ E 1 ) + P ( B ∩ E 2 ) + · · · + P ( B ∩ E k ) = P ( B | E 1 ) P ( E 1 ) + P ( B | E 2 ) P ( E 2 ) + · · · + P ( B | E k ) P ( E k ) . 31

  32. Two events are independent if any one of the following equivalent statements is true: (1) P ( A | B ) = P ( A ) . (2) P ( B | A ) = P ( B ) . (3) P ( A ∩ B ) = P ( A ) P ( B ) . 32

  33. Observe that independent events and mutually exclusive events, are completely different concepts. Don’t confuse these concepts. 33

  34. For multiple events E 1 , E 2 , . . . , E n are independent if and only if for any subset of these events P ( E i 1 ∩ E i 2 ∩ · · · ∩ E i k ) = P ( E i 1 ) P ( E i 2 ) . . . P ( E i k ) . 34

  35. 35

  36. Monte Carlo 36

  37. Computer simulation of random experiments is called Monte Carlo and is typically carried out by setting the seed to either a reproducible value or an arbitrary value such as system time. Random experiments may be replicated on a computer using Monte Carlo simulation. 37

  38. A pseudorandom sequence is a sequence of numbers U 1 , U 2 , . . . with each number, U k depending on the previous numbers U k − 1 , U k − 2 , . . . , U 1 through a well defined functional relationship and similarly U 1 depending on the seed ˜ U 0 . Hence for any seed, ˜ U 0 , the resulting sequence U 1 , U 2 , . . . is fully defined and repeatable. A pseudorandom often lives within a discrete domain as { 0 , 1 , . . . , 2 64 − 1 } . 38

  39. It can then be normalised to floating point numbers with, U k R k = 2 64 − 1 . 39

  40. A good pseudorandom sequence has the following attributes among others: It is quick and easy to compute the next element in the sequence. The sequence of numbers R 1 , R 2 , . . . resembles properties as an i.i.d. sequence of uniform(0,1) random variables (i.i.d. is defined in Unit 4). 40

  41. Exploring The Birthday Problem 41

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend