Expectation of a log random variable

expected valuelogarithmstaylor expansion

I have an equation that requires taking the natural log of a random variable. When trying to figure out how to evaluate the expression, I came across this paper:

Y. W. Teh, D. Newman and M. Welling (2006), A Collapsed Variational Bayesian Inference Algorithm for Latent Dirichlet Allocation, NIPS 2006, 1353–1360.

They use a second order Taylor expansion around $𝑥_0=\mathbb{E}[x]$ to approximate $\mathbb{E}[\log(x)]$ to obtain

$$\mathbb{E}[\log(x)]\approx\log(\mathbb{E}[x])−\frac{\mathbb{V}[x]}{2\mathbb{E}[x]^2}$$

I can't seem to derive that equation and was wondering if someone might be able to help show that it is true? Also, does that result hold if instead we wanted to evaluate $\mathbb{E}[\log(-x)]$ where $x\in(-\infty,0)$?

Best Answer

A second order Taylor expansion around $\mathbb{E}(x)$ gives

$$log(x)\approx log(\mathbb{E}(x))+\frac{1}{\mathbb{E}(x)}\times(x-\mathbb{E}(x))-\frac{1}{2}\frac{1}{\mathbb{E}(x)^2}(x-\mathbb{E}(x))^2$$

Take expectations

$$\mathbb{E}(log(x))\approx \mathbb{E}(log(\mathbb{E}(x)))+\frac{1}{\mathbb{E}(x)}\times(\mathbb{E}(x)-\mathbb{E}(x))-\frac{1}{2}\frac{\mathbb{V}ar(x)}{\mathbb{E}(x)^2}$$

because the 2nd term vanishes and the expectation of a constant is the constant:

$$\mathbb{E}(log(x))\approx log(\mathbb{E}(x))-\frac{1}{2}\frac{\mathbb{V}ar(x)}{\mathbb{E}(x)^2}$$