Page 95 - Computational Statistics Handbook with MATLAB
P. 95
82 Computational Statistics Handbook with MATLAB
From this, we get
xt = 0.8752 0.3179 0.2732 0.6765 0.0712
which is the same as before.
orm
TTranran
ran
ormMethoMetho
verseerseT
s
dd
InIn
In
In vverseerse Tran sf ssff formMethoormMethod d
v
The inverse transform method can be used to generate random variables
from a continuous distribution. It uses the fact that the cumulative distribu-
tion function F is uniform 01,( ) [Ross, 1997]:
U = F X() . (4.2)
If U is a uniform 01,( ) random variable, then we can obtain the desired ran-
dom variable X from the following relationship
1
–
U
X = F () . (4.3)
We see an example of how to use the inverse transform method when we dis-
cuss generating random variables from the exponential distribution (see
Example 4.6). The general procedure for the inverse transformation method
is outlined here.
PROCEDURE - INVERSE TRANSFORM METHOD (CONTINUOUS)
1. Derive the expression for the inverse distribution function F () .
1
–
U
2. Generate a uniform random number U.
–
1
U
3. Obtain the desired X from X = F () .
This same technique can be adapted to the discrete case [Banks, 2001]. Say
we would like to generate a discrete random variable X that has a probability
mass function given by
PX =( x i ) = p i ; x 0 < x 1 < x 2 < …; ∑ p i = . 1 (4.4)
i
We get the random variables by generating a random number U and then
deliver the random number X according to the following
()
(
X = x i , if Fx i – ) < U ≤ F x i . (4.5)
1
© 2002 by Chapman & Hall/CRC