<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4134.100" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>One method to generate a value x taken by a
random variable X with a strictly increasing distribution function
F(x) is the following:</FONT></DIV>
<DIV><FONT face=Arial size=2> - Generate a value y taken by a
random variable Y distributed as uniform on [0,1] (every programming language
has routines to do this)</FONT></DIV>
<DIV><FONT face=Arial size=2> - Evaluate the inverse of
the distribution function F at the point y you just generated</FONT></DIV>
<DIV><FONT face=Arial size=2> - The number you get x=F^(-1)(y)
is the value x you wanted to generate (drawn from the distribution you
chose)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>This method is nice, but it can be computationally
very expensive, since, in most cases (as in the case of a gamma), to
compute the inverse of F you have to solve numerically the
equation F(x)-y=0 and every iteration of the method you use to solve the
equation requires the numerical computation of a definite integral to find
F(x).</FONT></DIV>
<DIV><FONT face=Arial size=2>The reward you get for this great amount of
computation is that your random generator for X is as good as the random
generator for Y (the uniform random variable).</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Sincerely,</FONT></DIV>
<DIV><FONT face=Arial size=2>Marco.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV> </DIV></BODY></HTML>