Member-only story

CS(8) Importance Function and Optimized Selection

How to choose the importance function

Carla Martins
5 min readNov 25, 2024

In a previous article, we learned what an importance function is and why it can be useful. In this article, we will continue with the study of importance functions and learn how to choose one.

Recall what an Importance Function is

In importance sampling, the importance function g(x) is a probability distribution from which we sample points to approximate an integral. The choice of g(x) significantly impacts the accuracy and efficiency of the Monte Carlo estimate.

The integral we want to estimate is given by:

Using importance sampling we rewrite it as:

Here, g(x) is the importance function, and the Monte Carlo estimate becomes:

Where Xi is sampled from g(x).

Criteria for Choosing an Optimal Importance Function

1. Match the Shape of h(x):

Ideally, g(x) should resemble the shape of h(x) to focus sampling on regions where h(x) is large. A poor choice of g(x) can lead to high variance in h(x)/g(x), making the estimate less reliable.

2. Minimize Variance of h(x)/g(x):

--

--

Carla Martins
Carla Martins

Written by Carla Martins

Compulsive learner. Passionate about technology. Speaks C, R, Python, SQL, Haskell, Java and LaTeX. Interested in creating solutions.

No responses yet