Questions tagged [importance-sampling]

Importance sampling is a variance reduction technique to approximate integrals/expectations which are not directly computable.

Filter by
Sorted by
Tagged with
0 votes
0 answers
32 views

Single-sample self-normalized importance weighting

Self-normalizing sampling schemes (https://artowen.su.domains/mc/Ch-var-is.pdf) seem to require at least two samples to give non-trivial weightings under an importance sampling distribution. Is there ...
user avatar
  • 874
0 votes
2 answers
45 views

On the optimal distribution for importance sampling

Let's say $X$ is a rv, $p(x)$ is its pmf. I want to importance-sample $\mu := \mathbb E[f(X)]$, for some bounded function $0<f<1$, using another distribution $q(x)$. Then what I should do is ...
user avatar
  • 103
0 votes
0 answers
19 views

Conditional Gaussian Integral

I am looking for an analytic formula (if any) or a nice approximation to the probability of $\text{P}(x: (x-x_0)^\top \Sigma (x - x_0) \ge 1)$, with $\Sigma = \Sigma^\top \succeq 0,\; x \sim {\cal N}(...
user avatar
0 votes
0 answers
10 views

How to allocate the number of samples depending on the variances

I want to compute $p$ number of independent functions with each giving their result as expectation value, $e_{i=1,2..p}$. The final result is the sum of all expectation values, $S = \sum_{i}^{p}e_{i}$....
user avatar
0 votes
0 answers
33 views

Combining importance sampling with enumeration for estimating expected value

I have a Monte Carlo simulation which, given an initial state, does some random stuff and outputs a scalar. Let this output be the random variable $Y$. The simulation takes place on an $K$x$K$ grid, ...
user avatar
  • 1
0 votes
1 answer
38 views

Particle Filter Derivation based on Forward Algorithm

I have been studying the particle filter, sequential monte carlo methods, and sequential importance sampling. I am interested in apply the particle filter equations to the standard forward algorithm: $...
user avatar
  • 177
0 votes
0 answers
36 views

Question about Bayesian Melding?

I am going through Bayesian Melding paper by Poole and Raftery (2000). One of the ideas of the paper is demonstrated by Example 3.5, where there are three uniform distributions considered for $X\sim ...
user avatar
  • 121
1 vote
1 answer
65 views

An alternative sampling without replacement

Consider a set $X := \{x_1, \ldots, x_n\}$ with corresponding weights $p_1, \ldots, p_n$. Suppose we would like to draw $m < n$ distinct (i.e. unique) elements in a way that the probability of ...
user avatar
2 votes
1 answer
83 views

Importance Sampling: using Target Distribution as Proposal Distribution to approximate normalizing constant

Importance Sampling is a method use to approximate expectations of a test function $\phi$ with respect to $p$ by instead sampling from a proposal distribution $q$ $$ \mathbb{E}_{p}[\phi(x)] = \int \...
user avatar
1 vote
1 answer
125 views

Sampling without replacement while avoiding an element

Let $p$ be a distribution over $N$ objects, pick an object $k$ from $N$, and define $p^*(x)$ to be 0 if $x = k$ and $p(x) / (1 - p(k))$ otherwise. Suppose I want to sample $n$ items from $p^*$ without ...
user avatar
  • 141
7 votes
1 answer
165 views

Estimate Ratio of Normalizing Constants from two datasets

Suppose I have a non-negative function $f:\mathbb{R}^N \to [0, +\infty)$ that defines two different (unnormalized) probability densities on two separate subsets $A, B \subset \mathbb{R}^N$ with $A \...
user avatar
0 votes
1 answer
31 views

Efficient sampling to render an expression made up of random variables

Let's say I have a few random variables, like $ x_1 \sim N(0, 1)\\ x_2 \sim N(2, 1)\\ x_3 \sim U(0, 2) $ I would now like to render the following distribution, an algebraic expression made up of these ...
user avatar
  • 103
2 votes
0 answers
46 views

Do Particle Filters actually approximate the posterior distribution?

Im reading a tutorial paper about particle filters (Link) in which it is stated that as the number of samples tends to infinity the approximated posterior density given by $p(x_k|z_{1:k}) \approx \...
user avatar
  • 21
1 vote
0 answers
17 views

Improving samples from a distribution

I have a long-standing problem regarding generating samples from a desired distribution, $p(x)$. I know the analytic form of $p(x)$. I have a mechanism that should draw samples from $p(x)$, and does ...
user avatar
  • 133
1 vote
0 answers
31 views

Evaluation metrics for an RL model. How to select then?

I trained an RL model adapting the RL batch example (Jupyter Notebook) to the problem I was aiming to solve. As for the training, everything went well but, even though the RL batch returned several ...
user avatar
  • 11
2 votes
1 answer
74 views

Importance sampling - computing the mean of unnormalised importance weights

I am completing an assignment for self-study, and am experiencing some confusion over some elementary algebra concerning importance sampling. The context is as follows: Given a random distribution $p(...
user avatar
  • 2,206
1 vote
0 answers
110 views

Multi-walker MCMC

I just have a brief question regarding Markov Chain Monte Carlo with multiple walkers. I'm currently using this technique to calculate integrals and I'm not 100% on how to combine the statistics of ...
user avatar
1 vote
1 answer
77 views

Consistency of likelihood importance sampling estimator

In a lecture recently our lecturer described a method for approximating the expectation of a function over a posterior distribution using likelihood importance sampling. That is: $$ \mathbb{E}_{p(x|D)}...
user avatar
  • 13
1 vote
0 answers
68 views

Using importance sampling for prior sensitivity analysis in Bayesian modeling

I read a section on Bayesian sensitivity analysis in the following book by Carlin and Louis (2009), 'Bayesian Methods for Data Analysis' (3rd ed.), CRC Press. The context is a sensitivity analysis of ...
user avatar
  • 5,934
3 votes
1 answer
185 views

Compute the inverse of a conditional quantile regression output

Brunello et al (2009) show that extended compulsory schooling leads to increased wages respectivly to the individual gender. Their empirical model first uses quantile regression to show the impact of ...
user avatar
  • 218
0 votes
1 answer
1k views

Sample from a distribution and plot in python

I am trying to understand Particle Filter and Importance Sampling Principle from a UniFreiburg Course and this USNA document on particle filters. Simultaneously, I am also trying to write a document ...
user avatar
0 votes
0 answers
37 views

Importance sampling and Metropolis MC

I am evaluating numerically integral $$I(\theta) = \int_{-\infty}^{+\infty} dx_1 dx_2 dx_3 dx_4 \int_0^{+\infty} dy_1 dy_2 dy_3 dy_4 \prod_{k=0}^4\left[w_n(x_k)w_e(y_k)\right]F(x_1, x_2, x_3, x_4, y_1,...
user avatar
  • 1,578
2 votes
0 answers
35 views

Ways to sample from a distribution that are more efficient than random

I am trying to sample from a known distribution (somewhat complicated in that a transformed random variable has random noise from a scale mixture of normals added to it and is then back-transformed - ...
user avatar
  • 22.2k
0 votes
1 answer
1k views

Sampling from a continuous 2 dimensional probability distribution function for importance sampling

I just want to clarify a few points with regarding to sampling from a continuous 2-dimensional probability density function. If I want to sample from this pdf, I could sample from a 1D pdf, $P(x)$, ...
user avatar
2 votes
0 answers
44 views

Particle Filtering: Derivation that mean of weights is the marginal likelihood

I see everywhere the following (for the Bootstrap Filter) $$ p(y_t \mid y_{1:t-1}) \approx \frac{1}{N} \sum_{i=1}^N W(x_{0:t}^i) $$ where $W(x_{0:t}^i)$ are the normalized weights defined as $$W(x_{...
user avatar
  • 1,458
2 votes
3 answers
249 views

Importance sampling - approximation of an integral in R [closed]

So I am given this integral $$\mathrm{I}=\int_{38}^{\infty} \mathrm{f}(\mathrm{x}) \mathrm{d} \mathrm{x}=\int_{38}^{\infty} \mathrm{e}^{-\mathrm{x}} \mathrm{x}^{2} \mathrm{dx}$$ and i am also given ...
user avatar
0 votes
0 answers
36 views

Importance Sampling - By Hand Calculation and Example

To understand Importance sampling, I did a little experiment as described here. Since I'm getting high deviations when proposal distribution is not uniform, I would like to know if my steps are ...
user avatar
  • 183
0 votes
1 answer
37 views

Can sampling be difficult even with access to the normalized version of the distribution?

There is a vast wealth of literature on (approximate) sampling from computationally difficult distributions. Generally, the techniques I have seen assume that we only have queries to a proportional ...
user avatar
1 vote
1 answer
114 views

The connection between the expectation in expectation maximization and the importance sampling?

The log-likelihood of the EM algorithm can be expressed as \begin{align} \ell(\theta, x) &= \log p(x|\theta) \\ &= \log \sum_z p(x, z|\theta) \\ &= \log \sum_z \frac{q(z|x)}{q(z|x)}p(x,z|...
user avatar
  • 5,151
3 votes
1 answer
48 views

Combining importance sampling with optimization - does this yield an unbiased estimate?

I'm wondering if it is OK to combine importance sampling with optimization to choose the parameters for the substitute distribution. I have a non-negative random variable $X$ on $\mathbb{R}^d$ with ...
user avatar
  • 5,953
2 votes
3 answers
722 views

is off-policy Monte Carlo control really off-policy?

I'm reading the "Reinforcement learning: An introduction" by Sutton and Burto (http://incompleteideas.net/book/bookdraft2017nov5.pdf) The off-policy MC control algorithm puzzles me, please if anyone ...
user avatar
0 votes
1 answer
178 views

Weighted importance sampling (WIS) and Importance sampling (IS)

I am currently reading papers about off-policy evaluation (or counterfactual evaluation) of reinforcement learning policies, including ones about the doubly robust estimator. As in this paper https://...
user avatar
  • 155
3 votes
0 answers
401 views

Deriving the bias of the self-normalizing importance sampling estimator

Suppose we are interested in the expectation of a test function $f(X)$ with respect to target distribution $\pi(X) \propto \gamma(X)$ using importance sampling with proposal distribution $q(X)$ with $...
user avatar
  • 2,039
1 vote
0 answers
123 views

Calculating the weights in ABC SMC (2 parameters and more)

Im trying to implement ABC SMC for ODE model which has 2 parameters to estimate. I stopped in the step when calculating the weights as it appear in this answer. My question is should I calculate the ...
user avatar
  • 11
0 votes
0 answers
56 views

Using a single sample sequence for estimates of several integrals whose integrands have disjoint support

Let $(E,\mathcal E,\lambda)$ be a measure space $f:E\to[0,\infty)$ be $\mathcal E$-measurable with $\lambda f<\infty$ $q:E\to[0,\infty)$ be $\mathcal E$-measurable with $\lambda q=1$ and $$\{q=0\}\...
user avatar
  • 539
0 votes
1 answer
29 views

How to get a better importance sampling algorithm

I am trying to code some importance sampling algorithms, but I have a question about how importance sampling works. Say we want to estimate the expected value of some function $h(x)$, with samples ...
user avatar
  • 173
2 votes
1 answer
110 views

Nested Uniform Distributions in Monte Carlo Integration

In terms of importance sampling for numerical Monte Carlo integration we can proceed as follows: \begin{align} \int_{\Omega} p(\mathbf{x}) d\mathbf{x} &= \int_{\Omega} p(\mathbf{x}) \frac{q(\...
user avatar
0 votes
0 answers
36 views

Simplying Bayes Theorem expression: SIS particle filter posteriori

In the book Beyond the Kalman Filter: Particle Filters for Tracking Applications on page 39 the weight update equation for the particle filter is derived. The derivations begins by introducing the ...
user avatar
1 vote
0 answers
38 views

Is there any proof of global convergence for 1D convex numeric optimization using cross entropy method?

Suppose we have the following 1D numeric optimization problem: $min_{x} f(x)$ given $0< x \le x_{MAX}$ where $f(x)$ is a convex function. And I want to apply the cross-entropy method to optimize ...
user avatar
  • 41
3 votes
1 answer
207 views

Particle filter: Evaluating Optimal importance density

NOTE I posted this in the math stack exchange but I realized this may be the more appropriate place, old post here. I'm not sure if I should delete one of them so I just linked them in both? I am ...
user avatar
2 votes
1 answer
111 views

Estimate default by importance sampling (using R)

I want to use Importance sampling to estimate probability of default of an insurance company within the next $t$ years. The company starts with capital $C$ at $t=0$. Each year it gains $p > 0$ ...
user avatar
  • 875
1 vote
0 answers
75 views

Stratified sampling to generate random numbers (eg. for Monte-Carlo applications)

I am using a Monte-Carlo method to compute a value of interest $y$ from some input parameters $x_{i}$, that I use to draw statistical sets from simple distribution laws. In my case, for a single Monte-...
user avatar
  • 121
3 votes
1 answer
288 views

Can importance sampling be used as an actual sampling mechanism?

This question is a duplicate of How can we use importance sampling for drawing posterior distribution samples? , but that question seems to lack additional detail and goes unanswered (for more than 2 ...
user avatar
  • 215
1 vote
2 answers
271 views

Evaluate an integral using importance sampling

Estimate $\int^{1}_{0}e^{x} dx$ using importance sampling. Should I use beta distribution as proposal distribution and uniform distribution as target ?
user avatar
0 votes
0 answers
179 views

Evaluating Likelihood in Bootstrap Particle Filter

I am currently struggling with an attempt to apply a bootstrap particle filter to a linear, Gaussian state-space model $$s_t=A\,s_{t-1}+B\,\nu_t\qquad\text{( transition equation )}$$ $$\qquad z_t=C\,...
user avatar
0 votes
1 answer
328 views

Bootstrap Particle Filter (Gordon, Salmond, Smith, 2003) - Importance Weights

So, my endeavor to apply the is just for my own edificationI am currently struggling with an attempt to apply a bootstrap particle filter (Gordon, Salmond, Smith, 2003) to a linear, Gaussian state-...
user avatar
0 votes
1 answer
120 views

Why does weighted importance sampling work?

I am reading Sutton & Barto. I am trying to understand this passage from chapter 5: An important alternative is weighted importance sampling, which uses a weighted average, defined as $$ V (...
user avatar
  • 101
2 votes
1 answer
59 views

Importance Sampling derivation

I'm learning about importance sampling from p139 of this book which has the following derviation: What I am confused about is the second step in the derivation, though the rest makes sense to me. I ...
user avatar
1 vote
1 answer
231 views

Generating samples from target distribution after importance sampling

So I'm trying to understand importance sampling. So far I have the algorithm implemented like this: ...
user avatar
  • 21
0 votes
0 answers
66 views

Multiple Importance Sampling and Metropolis-Hastings on extended state space

Let $(E,\mathcal E,\lambda),(E',\mathcal E',\lambda')$ be measure spaces $k\in\mathbb N$ $p,q_1,\ldots,q_k:E\to(0,\infty)$ be probability densities on $(E,\mathcal E,\lambda)$ $w_1,\ldots,w_k:E\to[0,...
user avatar
  • 539