# Stein's lemma

Jump to navigation Jump to search

Stein's lemma,[1] named in honor of Charles Stein, is a theorem of probability theory that is of interest primarily because of its applications to statistical inference — in particular, to James–Stein estimation and empirical Bayes methods — and its applications to portfolio choice theory. The theorem gives a formula for the covariance of one random variable with the value of a function of another, when the two random variables are jointly normally distributed.

## Statement of the lemma

Suppose X is a normally distributed random variable with expectation μ and variance σ2. Further suppose g is a function for which the two expectations E(g(X) (X − μ)) and E(g ′(X)) both exist. (The existence of the expectation of any random variable is equivalent to the finiteness of the expectation of its absolute value.) Then

${\displaystyle E{\bigl (}g(X)(X-\mu ){\bigr )}=\sigma ^{2}E{\bigl (}g'(X){\bigr )}.}$

In general, suppose X and Y are jointly normally distributed. Then

${\displaystyle \operatorname {Cov} (g(X),Y)=\operatorname {Cov} (X,Y)E(g'(X)).}$

## Proof

The univariate probability density function for the univariate normal distribution with expectation 0 and variance 1 is

${\displaystyle \varphi (x)={1 \over {\sqrt {2\pi }}}e^{-x^{2}/2}}$

Since ${\displaystyle \int x\exp(-x^{2}/2)=-\exp(-x^{2}/2)}$ we get from integration by parts:

${\displaystyle E[g(X)X]={\frac {1}{\sqrt {2\pi }}}\int g(x)x\exp(-x^{2}/2)dx={\frac {1}{\sqrt {2\pi }}}\int g'(x)\exp(-x^{2}/2)dx=E[g'(X)]}$.

The case of general variance ${\displaystyle \sigma ^{2}}$ follows by substitution.

## More general statement

Suppose X is in an exponential family, that is, X has the density

${\displaystyle f_{\eta }(x)=\exp(\eta 'T(x)-\Psi (\eta ))h(x).}$

Suppose this density has support ${\displaystyle (a,b)}$ where ${\displaystyle a,b}$ could be ${\displaystyle -\infty ,\infty }$ and as ${\displaystyle x\rightarrow a{\text{ or }}b}$, ${\displaystyle \exp(\eta 'T(x))h(x)g(x)\rightarrow 0}$ where ${\displaystyle g}$ is any differentiable function such that ${\displaystyle E|g'(X)|<\infty }$ or ${\displaystyle \exp(\eta 'T(x))h(x)\rightarrow 0}$ if ${\displaystyle a,b}$ finite. Then

${\displaystyle E((h'(X)/h(X)+\sum \eta _{i}T_{i}'(X))g(X))=-Eg'(X).}$

The derivation is same as the special case, namely, integration by parts.

If we only know ${\displaystyle X}$ has support ${\displaystyle \mathbb {R} }$, then it could be the case that ${\displaystyle E|g(X)|<\infty {\text{ and }}E|g'(X)|<\infty }$ but ${\displaystyle \lim _{x\rightarrow \infty }f_{\eta }(x)g(x)\not =0}$. To see this, simply put ${\displaystyle g(x)=1}$ and ${\displaystyle f_{\eta }(x)}$ with infinitely spikes towards infinity but still integrable. One such example could be adapted from ${\displaystyle f(x)={\begin{cases}1&x\in [n,n+2^{-n})\\0&{\text{otherwise}}\end{cases}}}$ so that ${\displaystyle f}$ is smooth.

Extensions to elliptically-contoured distributions also exist.[2][3][4]

## References

1. ^ Ingersoll, J., Theory of Financial Decision Making, Rowman and Littlefield, 1987: 13-14.
2. ^ Cellier, Dominique; Fourdrinier, Dominique; Robert, Christian (1989). "Robust shrinkage estimators of the location parameter for elliptically symmetric distributions". Journal of Multivariate Analysis. 29 (1): 39–52. doi:10.1016/0047-259X(89)90075-4.
3. ^ Hamada, Mahmoud; Valdez, Emiliano A. (2008). "CAPM and option pricing with elliptically contoured distributions". The Journal of Risk & Insurance. 75 (2): 387–409. CiteSeerX 10.1.1.573.4715. doi:10.1111/j.1539-6975.2008.00265.x.
4. ^ Landsman, Zinoviy; Nešlehová, Johanna (2008). "Stein's Lemma for elliptical random vectors". Journal of Multivariate Analysis. 99 (5): 912––927. doi:10.1016/j.jmva.2007.05.006.