1 / 29

A Summary of Random Variable Simulation

A Summary of Random Variable Simulation. Ideas for Today and Tomorrow. Uniform. X is uniformly distributed on the interval [a,b]. We write X~unif(a,b). Uses. the basis for generating all random variables.

mdaggett
Download Presentation

A Summary of Random Variable Simulation

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. A Summary of Random Variable Simulation Ideas for Today and Tomorrow

  2. Uniform • X is uniformly distributed on the interval [a,b] • We write X~unif(a,b) • Uses • the basis for generating all random variables • can be used as a model for a quantity that is known to vary between a and b for which little else is known

  3. Uniform • method of generation • use a random number generator included in software or write your own generator to generate Y~unif(0,1) • set X=(b-a)Y+a

  4. We write X~N( , ) Normal • X is normally distributed with mean and variance • Uses • model errors in various processes • quantities that are sums of lots of other quantities

  5. set Normal • method of generation • generate Y~N(0,1) • Box-Muller method • Polar-Marsaglia method

  6. If , let The Polar-Marsaglia Method Let U1 and U2 be independent unif(0,1) rv’s. Let V1=2U1-1 and V2=2U2-1. Then X1=CV1 and X2=CV2 are independent and normally distributed with mean 0 and variance 1.

  7. X is exponentially distributed with rate • We write X~exp(rate= ) Exponential • Uses • lifetimes • waiting times • service times • interarrival times

  8. invert the cdf Exponential • method of generation The inverse cdf method: • set X=F-1(U) where U~unif(0,1)

  9. we write X~DE( , ) Double Exponential • X has a bilateral (double) exponential distribution with location parameter and shape parameter • as a “jump process” in finance

  10. the pdf is • consider the case • this is a “back-to-back” exponential with rate • simulate Y~exp(rate= ) • flip a fair coin to add • shift X=Y+ Double Exponential • method of generation

  11. We write Gamma • X has the gamma distribution with shape parameter and scale parameter • Uses • sum of exponential event times • time to complete a task consisting of consecutive exponential events

  12. the pdf is • use accept-reject sampling to generate • set Gamma • method of generation

  13. We write Weibull • X has the Weibull distribution with shape parameter and scale parameter • Uses • time to complete a task • time to equipment failure • differs from exponential in that failure probability can vary over time • used in reliability testing

  14. the pdf is • the cdf is • invert Weibull • method of generation • set X=F-1(U)

  15. We write Beta • X has the beta distribution with parameters and • Uses • well represents bounded rv’s with various kinds of skew (many shapes!) • distribution of random proportions • rough model in the absence of data

  16. the pdf is • generate independently • set Beta • method of generation

  17. we write Pareto • X has the Pareto distribution with parameter • Uses • modeling incomes • modeling stock price returns • monitoring production processes

  18. the pdf is • the cdf is • invert Pareto • method of generation • set X=F-1(U)

  19. we write Cauchy • X has the Cauchy distribution with location parameter and scale parameter • Uses • mostly interesting for theoretical reasons

  20. let Cauchy • method of generation • the pdf is • simulate Y~Cauchy(0,1) by inverse cdf method

  21. we write logistic • X has the logistic distribution with location parameter and scale parameter • Uses • growth models • logistic regression

  22. the pdf is • the cdf is • invert: logistic • method of generation • set X=F-1(U)

  23. we write • is the natural log of a Weibull with Gumbel • X has the Gumbel distribution with location parameter and scale parameter • Uses • modeling extreme events

  24. invert the cdf • or, take the natural log of a Weibull generated with Gumbel • method of generation

  25. Note: and are not the mean and variance! • ln(X) ~ N( , ) • time to perform a task, especially a very quick task (pdf spikes near 0 for small ) Log-Normal • We write X~LN( , ) • Uses • model quantities that are products of a large number of random quantities

  26. generate Y~N( , ) • let Log-Normal • method of generation

  27. so, we can count events occurring before 1 unit of time by where Yi are iid exponentials. Poisson • counts the number of events that occur in a unit of time when events are occurring at a constant rate • counts the number of events that occur in a unit of time when events are occuring with exponential inter-occurrence times

  28. Note that if U~unif(0,1), • So, we also know that Poisson • Specifically, to generate a Poisson rv with rate ,we will generate exponential rate inter- arrival times.

  29. Poisson • Let a=e-1, b=1, counter=0 • Algorithm: • Generate U~unif(0,1) and let b=bU • If b<a, done: return counter • otherwise, counter = counter+1

More Related