Next: Differential cross-section for
Up: Method
Previous: Method
We give a very short summary of the random number technique used here
[,].
The method is a combination of the composition and
rejection Monte Carlo methods. Suppose we wish to sample x from
the distribution
and the
(normalised) probability density function can be written as
where
are normalised density functions,
and
.
According to this method, x can sampled in the following way:
-
select a random integer i such that
with probability proportional to
-
select a value
from the distribution
-
calculate
and accept
with probability
;
- if
is rejected restart from step 1.
It can be shown that this scheme is correct and the mean
number of tries to accept a value is
.
In practice we have a good method of sampling from the distribution
, if
- all the subdistributions
can be sampled easily;
- the rejection functions
can be evaluated easily/quickly;
- the mean number of tries is not too large.
Thus the different possible decompositions of the distribution
are not equivalent from the practical point of view (e.g. they
can be very different in computational speed) and it can be very useful
to optimise the decomposition.
A remark of practical importance is that if our distribution is not
normalised (
), the method can be used in the same
manner, the only difference is that the mean number of tries in this
case is given by
.
Janne Saarela
Mon Apr 3 12:46:29 METDST 1995