# Different $\mathbb{E}[x]$ depending on choice of substitution?

$\newcommand{\E}{\mathbb{E}}$When working through the derivation of $\E[x]$ in the case where $x$ is a log normal random variable, it seems to me that the result depends critically on what you choose to substitute when doing u-substitution in the expected value integral. If I substitute $\ln(x)=u+\mu$, which seems to be the conventional thing to do, I get $\E[x]=e^{\mu+\sigma^2/2}$. But if I substitute $\ln(x)=u\sigma+\mu$, then I get $\E[x]=\sigma e^{\mu+\sigma^2/2}$. Why is one substitution more valid than the other?

EDIT: Here is how I got $\E[x]=\sigma e^{\mu+\sigma^2/2}$. I very much appreciate it if someone could tell me where I went wrong.

$$\E[x]=\int_0^{\infty}xN(\ln(x);\mu,\sigma) \:d\ln(x)$$

Where

$$N(\ln(x);\mu,\sigma)=\frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{(\ln(x)-\mu)^2}{2\sigma^2}}$$

Making the substitution $u=\frac{\ln(x)-\mu}{\sigma}$ and thus also $d\ln(x)=\sigma du$:

$$\E[x]=\int_{-\infty}^{\infty}e^{u\sigma+\mu}N(u;0,1) \:\sigma du$$

The integrand then becomes:

$$\sigma e^{u\sigma+\mu}N(u;0,1)=\sigma e^{u\sigma+\mu}\frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{u^2}{2}}=\sigma \frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{u^2}{2}+u\sigma+\mu}$$

$$=\sigma \frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{1}{2}(u^2-2u\sigma-2\mu)}=\sigma \frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{1}{2}[(u-\sigma)^2-\sigma^2-2\mu]}$$

$$=\sigma \frac{1}{\sigma\sqrt{2\pi}}e^{-(u-\sigma)^2+\sigma^2/2+\mu}= \sigma e^{\mu+\sigma^2/2}N(u-\sigma;0,1)$$

So the integral then becomes

$$\E[x]=\sigma e^{\mu+\sigma^2/2}\int_{-\infty}^{\infty}N(u-\sigma;0,1)\:du$$

$$\E[x]=\sigma e^{\mu+\sigma^2/2}$$

• Because you made an error in calculation with the second one of them. – whuber Mar 19 '17 at 20:58
• @whuber I have made an edit to show my steps. Appreciate it if you could point out the error. – ben Mar 19 '17 at 21:45
• $du=dx/(x\sigma)$. – whuber Mar 20 '17 at 2:46
• @whuber Nope. See answer. – ben Mar 20 '17 at 15:59
• Your answer states exactly what I put in my comment. – whuber Mar 20 '17 at 16:28

$$N(\ln(q);\mu,\sigma) = \frac{1}{\sigma}N(u;0,1)$$
So in the 3rd displayed equation a $1/\sigma$ should be factored out of $N(u,1,0)$ which then cancels out the $\sigma$ attached to $du$.