You want Ep[X] for p=N(0,1) but you sample from q=N(1,1) and get x=0.5, 1.0, 2.0, −0.5. What are the importance weights, the self-normalised estimate and the effective sample size, and what does a small effective sample size tell you?

Probabilistic models, Sampling methods
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you can compute importance weights, normalise them, and use the effective sample size to judge the estimator.

Key idea

Ep[f]=Eq[f p/q]. With weights wi=p(xi)/q(xi), the self-normalised estimate is ∑wif(xi)/∑wi, and the effective sample size is (∑wi)2/∑wi2.

Steps

  1. Weight: w(x)=p(x)q(x)=exp⁡ ⁣(−x22+(x−1)22)=exp⁡ ⁣(12−x).
  2. Compute: w(0.5)=e0=1, w(1.0)=e−0.5=0.6065, w(2.0)=e−1.5=0.2231, w(−0.5)=e1=2.7183.
  3. Sum of weights is 4.5479. Self-normalised estimate: 1(0.5)+0.6065(1)+0.2231(2)+2.7183(−0.5)4.5479=0.5+0.6065+0.4463−1.35914.5479=0.19374.5479≈0.0426. The true value is 0.
  4. Effective sample size: ∑wi2=1+0.3679+0.0498+7.3891=8.8068. So ESS =4.547928.8068=20.6848.8068≈2.35.
  5. ESS of 2.35 out of 4 means the four weighted samples are worth about 2.35 independent samples from p. The point x=−0.5 carries 60% of the total weight.
  6. Small ESS means a few points dominate, so the estimate has high variance. It happens when q is far from p or has lighter tails. Fix it by choosing q closer to p, with heavier tails, or by using more samples.

Common mistakes

How long your answer should be

Half a page; 4–5 minutes.

Last checked on 4 December 2026.

Read this

Previous in Probabilistic models: In the Bayesian network with edges A→C, B→C, C→D, E→D and D→F, what is the Markov blanket of C? Prove from the factorisation that C is independent of all other variables given its blanket. Why is the co-parent E included?
Next in Probabilistic models: An MCMC chain has n=10,000 post-burn-in draws of a quantity with variance σ2=1 and autocorrelations ρk=0.9k. What is the effective sample size neff, how does the Monte Carlo standard error compare with the naive σ/n, and what happens to the information if you thin the chain by keeping every 20th draw?