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
1 vote
0 answers
119 views

How to compute the density of this alternate proposal?

Introduction In my particle filtering application, I have an alternative proposal (an importance function) that seems to improve performance, measured by posterior probability of the estimated states. ...
Graham's user avatar
  • 136
0 votes
0 answers
13 views

Title: Handling Skewed Importance Sampling Weights for High-Dimensional Log-Likelihoods

Question: I am performing importance sampling (IS) for a Bayesian inference problem with the following setup: 1. Data and Model My data has ( D = 1300 ) dimensions. The log-likelihood, $ \log p(x \...
malavika v vasist's user avatar
0 votes
0 answers
13 views

Importance sampling with relative weight from two histograms

I have two datasets of real values, $X = (x_1, \dots, x_N)$ and $Y = (y_1, \dots, y_M)$. Here $Y$ is a subset of $X$. These data points can be regarded as samples from some unknown densities, $x\sim p(...
a06e's user avatar
  • 4,552
1 vote
0 answers
37 views

Inverse probability weighting vs importance sampling

What is the difference between inverse probability weighting and importance sampling? From their Wikipedia pages: Inverse probability weighting is a statistical technique for estimating quantities ...
友人A's user avatar
  • 111
0 votes
0 answers
22 views

Learning a probability distribution from samples drawn from unknown function

I am wanting to learn some probability distribution $p$ from data (using e.g., Kernel Density Estimation, a Normalizing Flow, whatever your favourite machine learning model is). If I had a dataset $D =...
Craig Innes's user avatar
1 vote
1 answer
30 views

How to inverse transform 4(1 + x2)−1/π, 0<x<1 for importance sampling [duplicate]

Example 5.10 Statistical Computing with R (Rizzo) Estimate the following using importance sampling $$\int_{0}^{1}\frac{e^{-x}}{1+x^2}$$ ...
Duy Đặng's user avatar
1 vote
1 answer
35 views

How to inverse transform e^-x / (1-e^-1), 0<x<1 for importance sampling

Example 5.10 Statistical Computing with R (Rizzo) Estimate the following using importance sampling $$\int_{0}^{1}\frac{e^{-x}}{1+x^2}$$ $f_3(x)=\frac{e^{-x}}{1-e^{-1}}, 0<x<1$ ...
Duy Đặng's user avatar
1 vote
0 answers
33 views

Importance sampling weights when sampling without replacement

Suppose we have a function $f(x_i)$ for a discrete variable $x_i$ (indexed 1 to N). We would like to calculate $\sum_{i=1}^N(f(x_i))$. Instead of the full sum, we sample some subset of size M from $...
user1834069's user avatar
0 votes
0 answers
29 views

Monte Carlo simulation with Importance Sampling - variance of estimator vs weighted variance

I am using Monte Carlo simulations associated with Importance Sampling and I have some difficulties interpretating the variance estimator: Using a dummy example extracted from here, I use Monte Carlo ...
la_turz's user avatar
1 vote
0 answers
29 views

sampling importance resampling -- what is the formula of variance?

I'm recently looking into SIR, I'm not very familiar with probability. Here it mentioned that if the variance of the sum approaches 0, then the output PDF approaches the target PDF, I wonder what is ...
Wenjian Zhou's user avatar
1 vote
0 answers
37 views

Monte Carlo integration methods utilizing a set of representative points given by a black box [closed]

Consider the task of integrating a function with respect to a multimodal distribution. Suppose I am given a set of "black box samples" from the modes of the target distribution and no other ...
fool's user avatar
  • 2,540
2 votes
1 answer
37 views

Use importance sampling to post processing the posterior result of the MCMC chains

In one of the studies, I once found the following heuristics to perform the calibration, Step 1: Running MCMC to get model parameters, with K chains Step 2: Compute weight for these K chains, the ...
user3125's user avatar
  • 3,089
0 votes
1 answer
36 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
89 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
28 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
  • 43
7 votes
1 answer
599 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
263 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
43 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
67 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
15 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
74 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
69 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
113 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
104 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
44 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
101 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
1k 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
597 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
  • 777
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
  • 369
2 votes
0 answers
223 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
74 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
771 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
105 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
177 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,286
0 votes
0 answers
51 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
206 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
282 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
176 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
8 votes
1 answer
198 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
42 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
134 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
126 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
254 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,630
1 vote
0 answers
624 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
185 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
124 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,724