Next: About this document ...
Up: monte
Previous: Integration by Sampling the
Sometimes the integrand we are sampling is zero or tiny nearly
everywhere, except for a small region where it is huge. In this case
the Monte Carlo method will have a poor time sampling the function,
since most of the sample points will fall uselessly in places where
the integrand is tiny. To improve the situation, we use biased or
importance sampling. Suppose, instead of uniform sampling with
probability
in the variable
, we sample with a
probability
. The integral in question can be rewritten as
 |
(11) |
The integral we want is then the mean value
 |
(12) |
The division by
compensates for the bias by giving higher
weight to values that fall in regions of small probability, where
sampling is less likely to happen. If
is small when
is small, then we are safe. The error in the estimated
integral is computed as before, but basing the standard deviation on
the compensated values
.
Biased sampling can be accomplished by changing variables and sampling
uniformly in the new variable. Suppose we change to
. Then
we may write
![\begin{displaymath}
I = \int_{s(a)}^{s(b)} \frac{f[x(s)]}{ds/dx} ds.
\end{displaymath}](img41.gif) |
(13) |
In this case the bias probability is
.
To get a small the variance in the mean of any distribution, it is
best to arrange so that the majority of the sampled values lie close
to the mean. The ideal bias would have
so that
all sampled values would be the same constant.
As an example, suppose we are integrating
Because the integrand is very large only close to 1, a Monte Carlo
procedure based on uniform sampling in
would give a poor variance.
Better to sample more frequently close to
. Ideally, we would
sample with a probability proportional to the magnitude of the
integrand itself. That means we want
. So how
do we manufacture such a probability distribution from the standard
uniform distribution? We do it by a change of variable, as described
above. First we take
uniform on the interval
. Then we
change variables to
so that
, where
is a
proportionality constant. That is
.
We adjust the constants so that
and
and solve for
to get
This
will be have the desired bias if
is uniformly distributed
on
.
Notice from the previous example that in deriving
we had to do
the integral analytically and, further, we had to find its inverse
function
. Of course, if we could do that, we wouldn't be doing
it using the Monte Carlo method in the first place! In practice, we
must be content with finding an approximation to the integrand that
can be integrated in closed form, and use it to construct the biased
distribution. The better the approximation where the integrand is
largest, the smaller the variance.
Next: About this document ...
Up: monte
Previous: Integration by Sampling the
Carleton DeTar
2002-04-03