Explore modules

Gaussian Stein Identity

Relate a Gaussian expectation to a derivative and expose the required centering and variance factor.

Free theory article

Relate a Gaussian expectation to a derivative and expose the required centering and variance factor.

Concept & interpretation

The Gaussian Stein Identity is a powerful theorem in probability and statistics that relates the expectation of a function multiplied by a centered Gaussian random variable to the expectation of the function's derivative. It provides a way to transform complex expectations into simpler derivative-based forms, which is extensively used in Stein's method for normal approximation, constructing score functions in machine learning, and exact calculations in stochastic calculus.

Experiment

Explore the Gaussian Stein Identity interactively in the Gaussian Stein Identity module.

  1. Set the Mean to 1 and the Standard deviation to 1.
  2. Select the Linear function. Observe that E[f'(X)] is exactly 1, since the derivative of x is 1. The centered product expectation is 1, and since variance is 1, both sides match.
  3. Change the Function to Quadratic. Now E[f'(X)] becomes 2, because f'(x) = 2x and the mean is 1. The identity holds with both sides evaluating to 2.
  4. Change the Function to Exponential and adjust the Exponent t. The interactive chart will immediately display the density-weighted integrands, and you can see that the identity residual always remains at exactly 0.
Read the full free theory article