Skip to main content

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
1 answer
24 views

What is proposal distribution in Importance sampling

I want to learn importance sampling using a simple example. Consider the following example code which implement importance sampling using python for a simple Bayesian network. I've read that we fix ...
Ahmad's user avatar
  • 499
0 votes
0 answers
40 views

How to compute the bias of the auto-normalized importance sampling estimator

A preceding post has compared auto-normalized importance sampling with ordinal importance sampling. Beginner readers shall be directed there, but I will remind the readers of just enough elements for ...
Fernando Zhu's user avatar
1 vote
0 answers
26 views

Proposal parameterization accuracy for Importance Sampling

Suppose I am fitting a Bayesian mixture model that's structured as follows: $$ Y_i | (z_i = k) \sim \mathcal{N}(\mu_k, \sigma_k^2), \quad k = 1, \cdots, K $$ $$ z_i \sim \text{Mult}(1; w_{i1}, \cdots, ...
BasMts's user avatar
  • 23
7 votes
1 answer
537 views

Understanding importance sampling in Monte Carlo integration

Introduction I'm studying importance sampling and I'm trying to figure out by myself, with a couple of examples, what are the main benefits with respect to standard Monte Carlo integration. I'm not ...
matteogost's user avatar
0 votes
0 answers
26 views

Metropolis sampling with stochastic estimation of component of probability density

Consider the probability distribution \begin{align} p(x) = \frac{1}{Z} x^2 e^{-x^2 / 2} \end{align} where $x \in \mathbb{R}$ and $Z$ is a normalization factor so that $\int_{-\infty}^{\infty} dx \, p(...
David Albandea's user avatar
2 votes
1 answer
246 views

Monte-Carlo integration with importance-sampling

I came across a paper, where (section 3.2) importance sampling is used to estimate an integral. I think I understand what importance sampling is but I don't understand how they got the solution. The ...
harsanyidani's user avatar
0 votes
0 answers
42 views

How to obtain moment bound from importance sampling identity?

Let $m(t) =E[X^t].$ The moment bound states that for a > 0, $$P\{ X \geq a \}\leq m(t)a^{-t} \forall t > 0 .$$ How would you prove this result using importance sampling identity? My answer: ...
Win_odd Dhamnekar's user avatar
0 votes
0 answers
13 views

How calculate importance ratio for continuous states?

I am trying to understand importance sampling estimators, in particular for off-policy evaluation in reinforcement learning. I am working with the definition: The IS estimator provides an unbiased ...
sandboxj's user avatar
  • 111
0 votes
0 answers
57 views

Minimizing cross entropy over a restricted domain?

Suppose $f(x;q)$ is the true distribution. The support of the random variable $X$ is $\Omega$. Suppose, I am interested in a particular subset of $\Xi \subset \Omega$. I would like to minimize the ...
entropy's user avatar
  • 19
1 vote
0 answers
44 views

How to solve for an unkown probability distribution within a hierarchical model?

The Problem Given probability distributions $P(\theta)$ and $P(X)$, and given an inverse function $Y=f^{-1}(X,\theta)$ that returns a unique $Y$. How can one estimate the unkown distribution $P(Y)$ in ...
ellabella's user avatar
1 vote
0 answers
14 views

Importance sampling for a parameterized family of distributions using a wide distribution from the same family

I'm motivated here by a problem for robust Bayesian analysis. Let $l(Y|X)$ be the likelihood and let $\{p_\xi(X)\}$ be a parameterized family of prior distributions where $\xi$ denotes the ...
JDNC's user avatar
  • 11
0 votes
1 answer
56 views

Why do we want to minimise the variance of our importance weights in SIS with respect to the proposal distribution

Is there a clear and precise explanation of why minimising the variance of the weights in SIS with respect to a proposal ensures that the samples generated from the empirical distribution induced by ...
Outstretched Pupil's user avatar
1 vote
0 answers
60 views

Why is inverse - sampling inefficient?

One metric used to measure the efficiency of sampling in monte carlo sampling (given a dataset of size $n$) is the effective sample size $N_{eff}$. *The efficiency of a sampling procedure depends ...
Physkid's user avatar
  • 251
1 vote
0 answers
97 views

In the β-TCVAE paper, can someone help with the derivation (S3) in Appendix C.1?

Paper: Isolating Sources of Disentanglement in VAEs I follow as far as, $$\mathbb{E}_{q(z)}[log[q(z)] = \mathbb{E}_{q(z, n)}[\ log\ \mathbb{E}_{n'\sim\ p(n)}[q(z|n')]\ ]$$ Subsequently, I don't ...
S R's user avatar
  • 33
1 vote
0 answers
97 views

How to calculate the variance of importance sampling estimate

I am given the following Hidden Markov Model: $X_{k+1} = \alpha X_{k} + b W_{k+1}$ $Y_{k} = cX_{k} + dV_{k}$ Also, $V_{k}$ and $W_{k}$ are independent and iid following $N(0, 1)$ I am required to ...
makala's user avatar
  • 11
1 vote
0 answers
41 views

Estimating complicated conditional probabilities with less calculation/computation [closed]

How can we estimate P(A | B & C & D & E) with reasonable accuracy by only calculating something like P(A | B), P(A | C), P(A | D), P(A | E), P(A | B & C), P(A | B & E), P(A | C &...
CubicInfinity's user avatar
1 vote
0 answers
85 views

Difference in Normalizing constants for Annealed Importance Sampling and Sequential Monte Carlo

I have been looking into Annealed Importance Sampling (AIS, Neal, 2001) and Sequential Monte Carlo (SMC, Del Moral et al., 2006) methods lately. I was wondering where the difference in estimating the ...
johannes's user avatar
3 votes
1 answer
856 views

Importance Sampling Variance vs Importance sampling Size

Does the increase in importance sampling size guarantee the decrease in importance sampling variance? Some context here: I'm trying to use importance sampling instead of equal probability sampling to ...
photon's user avatar
  • 31
2 votes
2 answers
557 views

Using normal distribution to approximate t distribution in importance sampling

The question is Exercises 6 and 7 regarding importance sampling on page 273 of Bayesian Data Analysis 3 http://www.stat.columbia.edu/~gelman/book/BDA3.pdf. Exercise 6 approximate a normal distribution ...
Statisfun's user avatar
  • 737
8 votes
4 answers
3k views

Why do we need importance sampling?

Let's say we want to calculate the following expectation: $$ \mathbb{E}_{z\sim p_z(z)}[f(z)] $$ One issue, is that the samples from $p_z(z)$ could be not very informative: We see here that $f(z)$ ...
Foobar's user avatar
  • 359
2 votes
0 answers
214 views

Train a model subject to max error

I would like to train a neural network by minimizing a loss over samples (as usual), but doing so in a way that the maximum error is bounded. What options do I have? Some that come to mind are: ...
Franco Marchesoni's user avatar
1 vote
0 answers
68 views

Sampling according to a product of a known density and a probability function

Given a known density $p(x)$, I'd like to generate samples according to $q(x) \propto p(x) f(x)$, where $f(x)$ is some probability function, $\forall x f(x) \in [0, 1]$, e.g., a sigmoid function. One ...
kykim's user avatar
  • 11
1 vote
2 answers
599 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 ...
Symbol 1's user avatar
  • 113
0 votes
0 answers
53 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, ...
Space's user avatar
  • 1
0 votes
1 answer
98 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: $...
DarkLink's user avatar
  • 217
4 votes
0 answers
162 views

Measure-Theoretic Importance Sampling: Do we need equivalence of measures?

Let $\pi$ and $\mu$ be the target and proposal measures on $(X, \mathcal{X})$ respectively, with $\pi \ll \mu$. Suppose $\lambda$ is the reference measure on $(X, \mathcal{X})$ and that $\pi\ll \...
Euler_Salter's user avatar
  • 2,236
0 votes
0 answers
49 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 ...
titanium's user avatar
  • 121
1 vote
1 answer
200 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 ...
Nikolaj Theodor Thams's user avatar
2 votes
1 answer
259 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 \...
Physics_Student's user avatar
1 vote
1 answer
170 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 ...
Kris's user avatar
  • 161
7 votes
1 answer
189 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 \...
Physics_Student's user avatar
0 votes
1 answer
41 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 ...
sk29910's user avatar
  • 103
2 votes
0 answers
124 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 \...
Tomas R's user avatar
  • 21
2 votes
0 answers
24 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 ...
lux's user avatar
  • 153
1 vote
0 answers
119 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 ...
Adriano's user avatar
  • 11
2 votes
1 answer
224 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(...
microhaus's user avatar
  • 2,550
1 vote
0 answers
551 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 ...
AlphaBetaGamma96's user avatar
1 vote
1 answer
176 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)}...
clundin's user avatar
  • 13
1 vote
0 answers
122 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 ...
tomka's user avatar
  • 6,624
3 votes
1 answer
308 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 ...
mugdi's user avatar
  • 90
1 vote
1 answer
3k 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 ...
Shrinivas Iyengar's user avatar
0 votes
0 answers
55 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,...
Roger V.'s user avatar
  • 4,439
2 votes
0 answers
59 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 - ...
Björn's user avatar
  • 33.5k
0 votes
1 answer
3k 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)$, ...
AlphaBetaGamma96's user avatar
2 votes
1 answer
106 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_{0:...
Euler_Salter's user avatar
  • 2,236
2 votes
3 answers
396 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 ...
Thanos Pantos's user avatar
0 votes
0 answers
122 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 ...
KGhatak's user avatar
  • 205
0 votes
1 answer
135 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 ...
Ziddletwix's user avatar
2 votes
1 answer
381 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|...
Lerner Zhang's user avatar
  • 6,810
3 votes
1 answer
124 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 ...
D.W.'s user avatar
  • 6,688