Importance sampling is a technique for numerically approximating an integral. It is mentioned here as a basis for the numerical concepts which follow. It is similar to stratified sampling in that the fundamental idea is that the sampling process is distorted, to take into account the weighting of the underlying distribution.
An example of importance sampling in a Monte-Carlo context, is
detailed in Section , but the basic principle is as
follows:
In wanting to estimate
where f(x) is a density function, one could sample n values of x from f(x) and then approximate with
Alternatively, m values of x could be sampled from another density h(x) and then I could be estimated using
Consideration can then be made as to how h(x) may be chosen so that the estimator is most efficient. It turns out that the most efficient form for h(x) samples from areas where g(x) is large, provided that f(x) is not small, [25]. Such ideas are important in any method when simulating from the posterior.