CONTENTS

Solution: Verifying a Radon-Nikodym Derivative — Normal Shift

Part 1

EP[Z]=eθ2/2EP[eθX]=eθ2/2eθ2/2=1\mathbb{E}^{\mathbb{P}}[Z] = e^{-\theta^2/2}\cdot \mathbb{E}^{\mathbb{P}}[e^{\theta X}] = e^{-\theta^2/2}\cdot e^{\theta^2/2} = 1. ✓

Part 2

Q(Xx)=EP[Z1Xx]=xeθtθ2/212πet2/2dt.\mathbb{Q}(X \le x) = \mathbb{E}^{\mathbb{P}}[Z\cdot \mathbf{1}_{X \le x}] = \int_{-\infty}^x e^{\theta t - \theta^2/2}\cdot \frac{1}{\sqrt{2\pi}}e^{-t^2/2}\,dt.

The integrand simplifies:

12πexp ⁣(θtθ22t22)=12πexp ⁣((tθ)22).\frac{1}{\sqrt{2\pi}}\exp\!\left(\theta t - \tfrac{\theta^2}{2} - \tfrac{t^2}{2}\right) = \frac{1}{\sqrt{2\pi}}\exp\!\left(-\tfrac{(t - \theta)^2}{2}\right).

This is the density of N(θ,1)\mathcal{N}(\theta, 1). Hence under Q\mathbb{Q}, XN(θ,1)X \sim \mathcal{N}(\theta, 1).

Part 3

EQ[X]=EP[ZX]=eθ2/2EP[XeθX]\mathbb{E}^{\mathbb{Q}}[X] = \mathbb{E}^{\mathbb{P}}[Z X] = e^{-\theta^2/2}\mathbb{E}^{\mathbb{P}}[X e^{\theta X}]. By differentiating the MGF: EP[XeθX]=d/dθ(eθ2/2)=θeθ2/2\mathbb{E}^{\mathbb{P}}[Xe^{\theta X}] = d/d\theta(e^{\theta^2/2}) = \theta e^{\theta^2/2}. So:

EQ[X]=eθ2/2θeθ2/2=θ.\mathbb{E}^{\mathbb{Q}}[X] = e^{-\theta^2/2}\cdot \theta e^{\theta^2/2} = \theta. \quad \checkmark

EQ[X2]\mathbb{E}^{\mathbb{Q}}[X^2]: second derivative of MGF at θ\theta: d2/dθ2(eθ2/2)=(1+θ2)eθ2/2d^2/d\theta^2(e^{\theta^2/2}) = (1 + \theta^2)e^{\theta^2/2}. So EP[X2eθX]=(1+θ2)eθ2/2\mathbb{E}^{\mathbb{P}}[X^2 e^{\theta X}] = (1 + \theta^2)e^{\theta^2/2}, and EQ[X2]=(1+θ2)\mathbb{E}^{\mathbb{Q}}[X^2] = (1 + \theta^2).

Match to N(θ,1)\mathcal{N}(\theta, 1): E[X]=θ\mathbb{E}[X] = \theta, E[X2]=θ2+1\mathbb{E}[X^2] = \theta^2 + 1. ✓ ✓

Part 4

Importance-sampling simulation.
import numpy as np rng = np.random.default_rng(0) N = 100_000 theta = 4 # Under Q, X ~ N(theta, 1). Generate samples: X_Q = theta + rng.standard_normal(N) # Importance-sampling weight: w = np.exp(-theta * X_Q + 0.5 * theta**2) # Estimate of P(X > 4) under P: estimate = (w * (X_Q > 4)).mean() print(estimate) # 3.17e-05 — matches Phi(-4) exactly
Compare to naive Monte Carlo: for N=105N = 10^5 draws of N(0,1)\mathcal{N}(0, 1), the expected number of exceedances above 44 is 1053.17105310^5\cdot 3.17\cdot 10^{-5} \approx 3 — highly variable, likely 00 or 11. IS's variance is orders of magnitude smaller for this rare-event problem.

Takeaways

  • "Normal shift" is the discrete-time Girsanov. Multiplying the P\mathbb{P}-density by eθXθ2/2e^{\theta X - \theta^2/2} shifts the mean from 00 to θ\theta.
  • EP[Z]=1\mathbb{E}^{\mathbb{P}}[Z] = 1 is the mandatory check. Every Radon-Nikodym derivative must integrate to 11 — else Q\mathbb{Q} is not a probability measure.
  • Importance sampling is Radon-Nikodym made practical. Sample under the "easy" measure Q\mathbb{Q} that puts mass where the event occurs, then re-weight by 1/Z1/Z to get an unbiased estimator for the rare event under P\mathbb{P}.
  • The variance reduction is exponential in θ2\theta^2. For tail probabilities of order eθ2/2e^{-\theta^2/2}, IS drops the Monte Carlo variance by the same exponential factor.