system modeling and simulation
play

System Modeling and Simulation Carey Williamson Department of - PowerPoint PPT Presentation

CPSC 531: System Modeling and Simulation Carey Williamson Department of Computer Science University of Calgary Fall 2017 Outline Probability and random variables Random experiment and random variable Probability mass/density


  1. CPSC 531: System Modeling and Simulation Carey Williamson Department of Computer Science University of Calgary Fall 2017

  2. Outline  Probability and random variables — Random experiment and random variable — Probability mass/density functions — Expectation, variance, covariance, correlation  Probability distributions — Discrete probability distributions — Continuous probability distributions — Empirical probability distributions 2

  3. Random Experiment  3

  4. Probability of Events  4

  5. Joint Probability  5

  6. Independent Events  6

  7. Mutually Exclusive Events  7

  8. Union Probability  8

  9. Conditional Probability  9

  10. Types of Random Variables  Discrete — Random variables whose set of possible values can be written as a finite or infinite sequence — Example: number of requests sent to a web server  Continuous — Random variables that take a continuum of possible values — Example: time between requests sent to a web server 10

  11. Probability Density Function (PDF)  d  f ( x ) F ( x ) dx 11

  12. Cumulative Distribution Function (CDF)  12

  13. Expectation of a Random Variable   n  x p ( x ) discrete X   i i     i 1  E [ X ]    xf ( x ) dx continuous X     13

  14. Properties of Expectation  14

  15. Misuses of Expectations  Multiplying means to get the mean of a product  E [ XY ] E [ X ] E [ Y ]  Example: tossing three coins — X : number of heads — Y : number of tails — E[X] = E[Y] = 3/2  E[X]E[Y] = 9/4 — E[XY] = 3/2  E[XY] ≠ E[X]E[Y]  Dividing means to get the mean of a ratio   X E [ X ]  E     Y E [ Y ] 15

  16. Variance of a Random Variable  16

  17. Variance of a Random Variable  Variance : The expected value of the square of distance between a random variable and its mean   2 V [ X ]  n    2  ( x ) p ( x ) discrete X  i i      i 1 2  E [( X ) ]      2 ( x ) f ( x ) dx continuous X   where, μ = E[X]    Equivalently: σ 2 = E[X 2 ] – (E[X]) 2 17

  18. Properties of Variance  18

  19. Coefficient of Variation  3 / 4 1   CV 3 / 2 3 19

  20. Covariance  20

  21. Covariance  x y xy p(x) 0 3 0 1/8 1 2 2 3/8 2 1 2 3/8 3 0 0 1/8 xy p(xy) 0 2/8 2 6/8 21

  22. Correlation  Negative linear Positive linear correlation correlation No correlation -1 0 +1 22

  23. Autocorrelation  Negative linear Positive linear correlation correlation No correlation -1 0 +1 23

  24. Demo: Correlation and Autocorrelation  Correlation (if desired) can be induced by sharing or re-using random numbers between two (or more) random variables  Example: height and weight of medical patients  Example: a coin that remembers some of its recent history Negative linear Positive linear correlation correlation No correlation -1 0 +1 24

  25. Geometric Distribution  25

  26. Example: Geometric Distribution Geometric distribution PMF Geometric distribution CDF

  27. Uniform Distribution  PDF CDF 27

  28. Uniform Distribution Properties  28

  29. Exponential Distribution  29

  30. Example: Exponential Distribution Exponential distribution PDF Exponential distribution CDF

  31. Light Bulb Testing (1 of 5)  Scenario: Walmart has a giant bin of lightbulbs on sale. You buy one and bring it home for testing and observation.  Assume: All light bulbs last exactly 100 hours.  Observation: Your light bulb has worked for 70 hours.  Question: How much longer is it expected to last?  Answer: 30 hours 31

  32. Light Bulb Testing (2 of 5)  Scenario: Walmart has a giant bin of lightbulbs on sale. You buy one and bring it home for testing and observation.  Assume: Half of the light bulbs last exactly 50 hours, while the other half last exactly 150 hours. The mean is 100 hours.  Observation: Your light bulb has worked for 70 hours.  Question: How much longer is it expected to last?  Answer: 80 hours 32

  33. Light Bulb Testing (3 of 5)  Scenario: Walmart has a giant bin of lightbulbs on sale. You buy one and bring it home for testing and observation.  Assume: Half of the light bulbs last exactly 50 hours, while the other half last exactly 150 hours. The mean is 100 hours.  Observation: Your light bulb has worked for 40 hours.  Question: How much longer is it expected to last?  Answer: 60 hours 33

  34. Light Bulb Testing (4 of 5)  Scenario: Walmart has a giant bin of lightbulbs on sale. You buy one and bring it home for testing and observation.  Assume: Light bulbs have a working duration that is uniformly distributed (continuous) between 50 hours and 150 hours. The mean is 100 hours.  Observation: Your light bulb has worked for 70 hours.  Question: How much longer is it expected to last?  Answer: 40 hours 34

  35. Light Bulb Testing (5 of 5)  Scenario: Walmart has a giant bin of lightbulbs on sale. You buy one and bring it home for testing and observation.  Assume: Light bulbs have a working duration that is exponentially distributed with a mean of 100 hours.  Observation: Your light bulb has worked for 70 hours.  Question: How much longer is it expected to last?  Answer: 100 hours 35

  36. Memoryless Property  36

  37. Example: Exponential Distribution  37

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