from II - Necessary Probability Background
Published online by Cambridge University Press: 05 February 2013
In Chapter 3 we reviewed the most common discrete and continuous random variables. This chapter shows how we can use the density function or cumulative distribution function for a distribution to generate instances of that distribution. For example, we might have a system in which the interarrival times of jobs are well modeled by an Exponential distribution and the job sizes (service requirements) are well modeled by a Normal distribution. To simulate the system, we need to be able to generate instances of Exponential and Normal random variables. This chapter reviews the two basic methods used in generating random variables. Both these methods assume that we already have a generator of Uniform(0,1) random variables, as is provided by most operating systems.
Inverse-Transform Method
This method assumes that (i) we know the c.d.f. (cumulative distribution function), Fx (x) = P{X ± x}, of the random variable X that we are trying to generate, and (ii) that this distribution is easily invertible, namely that we can get x from FX (x).
The Continuous Case
Idea: We would like to map each instance of a uniform r.v. generated by our operating system – that is, u ∈ U (0, 1) – to some x, which is an instance of the random variable X, where X has c.d.f. FX. We assume WLOG that X ranges from 0 to ∞. Let's suppose there is some mapping that takes each u and assigns it a unique x. Such a mapping is illustrated by g-1(·) in Figure 4.1.
To save this book to your Kindle, first ensure [email protected] is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Find out more about the Kindle Personal Document Service.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.