# $\mathbb{E}[\mathbb{E}[e^{Yt} \mid X]]$

How do I get from the 2nd line to 3rd in the image below?

$$\mathbb{E}[\mathbb{E}[e^{Yt} \mid X]]=\mathbb{e^{Xt+(\sigma_1^2 t^2)/2}}$$

you made a typo in your question. you meant to take the expected value the RHS.

the formula you see is the first moment of the lognormal distribution. if you're curious about why it looks that way then you can derive it from principles using the density of the lognormal distribution.

since $X$ is normally distributed then we know that $e^X$ is lognormal and then we use the formula.

• Err, I just copied what I see in the image (lecture notes). But whats wrong? Err... lognormal is kind of unfamiliar to me ... – Jiew Meng Oct 22 '13 at 1:55

Since $Y|X\sim\mathcal{N}(X,\sigma_1^2)$, you just treat $E[e^{Yt}|X]$ as the MGF of the conditional distribution $Y|X$, which is $e^{Xt+\sigma_1^2t^2/2}$ where $X$ is treated as a constant temporarily.

• Err... sorry, but how do I get the MGF of a conditional distribution? I don't remember that in my lectures/lecture notes ... really sorry ... not exactly a maths major too ... – Jiew Meng Oct 22 '13 at 2:43

$$Y\mid X=x \sim N(x,\sigma_1^2),$$ so \begin{align} \mathbb E(e^{Yt} \mid X=x) & = \int_{-\infty}^\infty e^{yt} \frac{1}{\sqrt{2\pi}\ \sigma_1} \exp\left(\frac{-1}{2}\cdot\left(\frac{y-x}{\sigma_1}\right)^2\right) \, dy \\[10pt] & = \frac{1}{\sqrt{2\pi}\ \sigma_1} \int_{-\infty}^\infty \exp(\text{what?}) \, dy. \end{align}

The thing that appears where it says "what?" is \begin{align} & \phantom{={}}yt -\frac12\cdot\left(\frac{y-x}{\sigma_1}\right)^2 \\[10pt] & = \frac{y^2 -2(x-t)y + x^2}{2\sigma_1^2} \\[10pt] & = \frac{y^2 -2(x-t)y + (x-t)^2}{2\sigma_1^2} + \text{something not depending on y} \\[10pt] & = \frac{(y-(x-t))^2}{2\sigma_1^2} + \text{something not depending on y} \end{align} The "something not depending on $y$ is within the $\exp$ function, so it is a factor, i.e. on multiplies by $e^{\text{something not depending on$y$}}$, and since it doesn't depend on $y$, it can be pulled out of the integral. The value of that last integral should end up equal to $1$, for reasons you can think about.