160b_ch2 - Spring 2010 Pstat160b H-O #5 Simulation of...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Spring 2010 Pstat160b H-O #5 Simulation of Continuous Random Variables The starting point of all simulations methods is uniform U (0 , 1) random variable. Those are obtained from (pseudo) random number generator, which we assume are available to us. Note that any uniform random variables U ( a,b ) can be generated from those by setting X = a + ( b - a ) * U . Also Bernoulli random variables (value 1 with probability p , 0 with probability 1 - p ) can be generated by setting X = 1 if U < p , and X = 0 if U > p . Inverse transform method Suppose we want to simulate a continuous random variable with C.d.f F X ( x ) (here to simplify notation we just write F ( x ). Since a C.d.f is increasing and here assumed to be continuous, its inverse function F - 1 is well defined as (see also graphs below). If F is strictly increasing, there is no ambiguity and F - 1 is given by F - 1 ( y ) = x such that F ( x ) = y If there are intervals on which F is “flat”, then all the x in that interval return the same y . To be well defined, we chose the smallest such x as the value of the inverse. The inverse transform algorithm just consists of selecting U , a uniform U (0 , 1) random variable, and set X = F - 1 ( U ). Note that if F is constant on some interval, this definition give a correct answer, regardless of the particular choice of the inverse since the probability of a single point for the uniform U (0 , 1) is 0 anyway. -
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/10/2011 for the course STAT PStat 160b taught by Professor Bonnet during the Spring '10 term at UCSB.

Page1 / 2

160b_ch2 - Spring 2010 Pstat160b H-O #5 Simulation of...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online