Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Summary of Random Variable Simulation Ideas for Today and Tomorrow.

Similar presentations


Presentation on theme: "A Summary of Random Variable Simulation Ideas for Today and Tomorrow."— 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 Normal X is normally distributed with mean and variance  Uses  model errors in various processes  quantities that are sums of lots of other quantities  We write X~N(, )

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

6 Let U 1 and U 2 be independent unif(0,1) rv’s. The Polar-Marsaglia Method Let V 1 =2U 1 -1 and V 2 =2U 2 -1. If, let Then X 1 =CV 1 and X 2 =CV 2 are independent and normally distributed with mean 0 and variance 1.

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

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

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

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

11 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  We write

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

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

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

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

16 Beta method of generation  the pdf is  generate independently  set

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

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

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

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

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

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

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

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

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

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

27 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 so, we can count events occurring before 1 unit of time by where Y i are iid exponentials.

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

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


Download ppt "A Summary of Random Variable Simulation Ideas for Today and Tomorrow."

Similar presentations


Ads by Google