Simulation of an exponential variable

Suppose an exponential variable —the typical example in textbooks— with pdf

pdf   with   x ≥ 0

By integration, it is:

cdf

which is an easily invertible function. Thus, it is, successively,

step1step2

and finally

x_of_Y1  (or even x_of_Y2)
 
 
Valid HTML 4.01! IST http://web.tecnico.ulisboa.pt/~mcasquilho/acad/theo/simul/exponential.php
Created: 2006-03-16 — Last modified: 2007-01-03