Probability Integral Transformation
Probability Integral Transformation
kundan [email protected]
FY (y) = P (Y ≤ y)
= P (FX (X) ≤ y)
−1
= P (X ≤ FX (y)) ∵ FX (x) is a monotone increasing.
−1
= F (FX (y))
=y
u = F (x) = 1 − e−x
or
1 − u = e−x
or, taking logarithms
x = − log(1 − u)
Hence, we can generate an exponential with parameter 1 by generating a random
number U and then setting
X = F −1 (U ) = − log(1 − U )
1
If an exponential random variable with rate λ (mean 1/λ) can be generated
by generating a random number U and setting
1
X = − log U.
λ
Example: Consider X is a continuous random variable with PDF and CDF is
defined as follows:
α
fX (x, α, λ) = αλxα−1 e−λx , x > 0, α, λ > 0,
α
FX (x, α, λ) = 1 − e−λx .
2
0.2 The Rejection Method
Suppose we have a method for generating a random variable having density
function g(x). We can use this as the basis for generating from the continuous
distribution having density function f (x) by generating Y from g and then
accepting this generated value with a probability proportional to fg(Y
(Y )
).
Specifically, let c be a constant such that
f (y)
≤ c for all y.
g(y)
We then have the following technique (illustrated in Figure 5.1) for generating
a random variable having density f .
Algorithm
Step 1: Generate Y having density g.
Step 2: Generate a random number U .
f (Y )
Step 3: If U ≤ cg(Y ) , set X = Y . Otherwise, return to Step 1.
Example: Let us use the rejection method to generate a random variable having
density function
f (x) = 20x(1 − x)3 , 0 < x < 1.
Since this random variable (which is Beta with parameters 2, 4) is concentrated
in the interval (0, 1), let us consider the rejection method with
3
Differentiation of this quantity yields
d f (x)
= 20 (1 − x)3 − 3x(1 − x)2 .
dx g(x)
Setting this equal to 0 shows that the maximal value is attained when x = 41 ,
and thus 3
f (x) 1 3 135
≤ 20 = ≡ c.
g(x) 4 4 64
Hence,
f (x) 256
= x(1 − x)3 .
cg(x) 27
and thus the rejection procedure is as follows:
4
Since 1/2
f (x) 2e
= x1/2 e−x/3 ,
cg(x) 3
we see that a gamma 23 , 1 random variable can be generated as follows: