NLA-lib Explorer

NLAlib.integral_mul_eq_integral_deriv_gaussianReal_one

Library · theorem

Stein's identity for the standard Gaussian, under integrability hypotheses: for h differentiable with h, \mathbf{x} h(\mathbf{x}) and h' integrable against \mathcal{N}(0, 1), \mathbb{E}[g\, h(g)] = \mathbb{E}[h'(g)] for g \sim \mathcal{N}(0, 1).

NLAlib.integral_mul_eq_integral_deriv_gaussianReal_one {h : ℝ → ℝ} (hh : Differentiable ℝ h)
  (hhi : Integrable h (gaussianReal 0 1)) (hxh : Integrable (fun x ↦ x * h x) (gaussianReal 0 1))
  (hdi : Integrable (deriv h) (gaussianReal 0 1)) :
  ∫ (x : ℝ), x * h x ∂gaussianReal 0 1 = ∫ (x : ℝ), deriv h x ∂gaussianReal 0 1

Full source on GitHub

Import NLAlib.Probability.Distributions.GaussianIntegrationByParts.