Gaussian integration by parts #
Stein's lemma: for a real Gaussian x ∼ N(μ, v) and a differentiable f with f,
(x - μ) f and f' integrable, E[(x - μ) f x] = v E[f' x] (integral_sub_mul_gaussianReal).
For v ≠ 0 this is integration by parts on the line against the density φ, whose derivative is
φ' x = -((x - μ) / v) φ x (hasDerivAt_gaussianPDFReal); for v = 0 both sides vanish. Every
polynomial is integrable under a real Gaussian (integrable_eval_gaussianReal), so the lemma
applies to all polynomials (integral_sub_mul_eval_gaussianReal); this is the computation behind
the Hermite polynomials of O'Donnell, §11.2.
Main results #
ProbabilityTheory.integrable_gaussianReal_iff_integrable_mul_gaussianPDFReal: integrability against a nondegenerate real Gaussian is Lebesgue integrability of the product with the density.ProbabilityTheory.hasDerivAt_gaussianPDFReal: the derivative of the Gaussian density.ProbabilityTheory.integral_sub_mul_gaussianReal: Stein's lemma.ProbabilityTheory.integrable_eval_gaussianReal,ProbabilityTheory.integral_sub_mul_eval_gaussianReal: polynomials are integrable, and Stein's lemma for polynomials.
References #
A function is integrable against a nondegenerate real Gaussian iff its product with the density is Lebesgue integrable.
The derivative of the density of N(μ, v) is φ' x = -((x - μ) / v) φ x. For v = 0 the
density is 0 and both sides vanish.
Stein's lemma (Gaussian integration by parts): for x ∼ N(μ, v) and a differentiable
f with f, (x - μ) f and f' integrable, E[(x - μ) f x] = v E[f' x].
Every polynomial is integrable under a real Gaussian, since its moment generating function is finite everywhere.
Stein's lemma for polynomials: for x ∼ N(μ, v) and a real polynomial p,
E[(x - μ) p x] = v E[p' x].