DEALING WITH DENSITIES 27
(X,Y )
Figure 2.2 To draw X with density f , draw (X,Y ) uniformly from the region under the density,
then throw away the Y value. This pr ocedure works whether or not the density is normalized.
The area of [−1,1] ×[−1, 1] is 4, while the unit circle has area
π
. Therefore the
expected number of uniforms drawn is (2)(4/
π
) ≈2 ·1.273 compared to the just two
uniforms that the exact method uses.
One more note: for (X,Y ) uniform over the unit circle, X/Y has a standard
Cauchy distribution. Therefore this gives a perfect simulation method for Cauchy
random variables that does not utilize trigonometric functions.
2.2 Dealing with densities
The basic AR method presented does not handle densities; however, densities are
easily added to the mix u sing auxiliary random variables. Consider the following
theorem from measure theory, known also as the fundamental theorem of Monte
Carlo simulation (see [115], p. 47).
Theorem 2.2 (Fundamental theorem of Monte Carlo simulation). Suppose that
X has (possibly unnormalized) density f
X
over measure
ν
on Ω.If[Y |X] ∼
Unif([0, f
X
]),then(X,Y ) is a draw from the product measure
ν
×Unif over the set
{(x,y ) : x ∈ Ω,0 ≤ y ≤ f
x
}.
Why is this fundamental to Monte Carlo methods? Because this theorem in
essence says that all densities are illusions, that every problem in probability can
be reduced to sampling over a uniform distribution on an augmented space. Since
pseudorandom sequences are iid uniform, this is an essential tool in building Monte
Carlo methods. Moreover, the density of X can be unnormalized, which is essential
to the applications of Monte Carlo.
A simple example of this theorem is in one dimension, where
ν
is Lebesgue
measure. This theorem says that to draw a continuous random variable X with density
f , choose a point (X ,Y ) uniformly from the area between the x-axis and the density,
andthenthrowawaytheY value. Here it is easy to see that for any a ∈ R, P(X ≤
a)=
a
−∞
f (x) dx as desired. (See Figure 2.2.)
To see how this operates in practice, let
μ
be a measure over Ω, and suppose for
density g it is possible to draw from the product density
μ
×Unif over Ω
g
= {(x, y) :
x ∈ Ω, 0 ≤ y ≤ g}.
Once this draw is made, and the Y component is thrown away, then the remaining
X component has density g. But suppose instead that the goal is to draw X with
density f instead.
Well, if (X,Y) has measure
μ
×Unif over Ω
g
,then(X ,2Y) has m easure
μ
×Unif